From: Bernhard Voelker Date: Wed, 16 Apr 2014 08:43:09 +0000 (+0200) Subject: maint: df: avoid sizeof(char**) static analysis warning X-Git-Tag: v8.23~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02807c611efa0d2052c4d2f852a84b22c49d9e52;p=thirdparty%2Fcoreutils.git maint: df: avoid sizeof(char**) static analysis warning * src/df.c (alloc_table_row): Use the size of char** to enlarge the table. Spotted by Coverity. --- diff --git a/src/df.c b/src/df.c index 3036c74ab6..e7639434e6 100644 --- a/src/df.c +++ b/src/df.c @@ -290,7 +290,7 @@ static void alloc_table_row (void) { nrows++; - table = xnrealloc (table, nrows, sizeof (char *)); + table = xnrealloc (table, nrows, sizeof (char **)); table[nrows - 1] = xnmalloc (ncolumns, sizeof (char *)); }