diff --git a/src/app/shared/commands/mem.c b/src/app/shared/commands/mem.c index 8ac10f447f7..aad09d4323a 100644 --- a/src/app/shared/commands/mem.c +++ b/src/app/shared/commands/mem.c @@ -20,7 +20,7 @@ reconstruct_topo( config_t * config, if( !topo_name[0] ) return; /* keep default action topo */ action_t const * selected = NULL; - for( action_t ** a=ACTIONS; a; a++ ) { + for( action_t ** a=ACTIONS; *a; a++ ) { action_t const * action = *a; if( 0==strcmp( action->name, topo_name ) ) { selected = action; diff --git a/src/app/shared/commands/metrics.c b/src/app/shared/commands/metrics.c index 3f175d2649c..883a689c6ec 100644 --- a/src/app/shared/commands/metrics.c +++ b/src/app/shared/commands/metrics.c @@ -27,7 +27,7 @@ reconstruct_topo( config_t * config, if( !topo_name[0] ) return; /* keep default action topo */ action_t const * selected = NULL; - for( action_t ** a=ACTIONS; a; a++ ) { + for( action_t ** a=ACTIONS; *a; a++ ) { action_t const * action = *a; if( 0==strcmp( action->name, topo_name ) ) { selected = action;