From: Honggang Li <honli@xxxxxxxxxx> If endptr is not NULL, strtoul() stores the address of the first invalid character in *endptr. Fixes: 04d2a8be0305 ("osm_prtn_config.c: parse_group_flag log suspicious group flag value") Signed-off-by: Honggang Li <honli@xxxxxxxxxx> --- opensm/osm_prtn_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensm/osm_prtn_config.c b/opensm/osm_prtn_config.c index bbd5bcf6..a7293bcb 100644 --- a/opensm/osm_prtn_config.c +++ b/opensm/osm_prtn_config.c @@ -271,7 +271,7 @@ static unsigned long int verify_val(unsigned lineno, osm_log_t *p_log, { char *end; unsigned long int ret = strtoul(val, &end, 0); - if (val && end) + if (val && *end) OSM_LOG(p_log, OSM_LOG_VERBOSE, "PARSE WARN: line %d: " "suspicious val=(%s) detected. " -- 2.14.4