From: Ivan Maidanski Date: Fri, 31 Aug 2018 16:06:27 +0000 (+0300) Subject: Eliminate 'comparison is always false' code defect in get_maps X-Git-Tag: v8.0.0~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b3eee14;p=gc Eliminate 'comparison is always false' code defect in get_maps In case of a single-threaded build, the comparison is always false because maps_size>=0 and old_maps_size<=0. * os_dep.c [NEED_PROC_MAPS] (GC_get_maps): Do not evaluate maps_size= maps_buf_sz || maps_size < old_maps_size); - /* In the single-threaded case, the second clause is false. */ + } while (maps_size >= maps_buf_sz +# ifdef THREADS + || maps_size < old_maps_size +# endif + ); maps_buf[maps_size] = '\0'; return maps_buf; }