From 02807c611efa0d2052c4d2f852a84b22c49d9e52 Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Wed, 16 Apr 2014 10:43:09 +0200 Subject: 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. --- src/df.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/df.c') diff --git a/src/df.c b/src/df.c index 3036c74ab..e7639434e 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 *)); } -- cgit v1.2.3-70-g09d2