summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBernhard Voelker <mail@bernhard-voelker.de>2014-04-16 10:43:09 +0200
committerBernhard Voelker <mail@bernhard-voelker.de>2014-04-16 10:43:09 +0200
commit02807c611efa0d2052c4d2f852a84b22c49d9e52 (patch)
treedee0de445857ccaf064f50d373575636f993d122 /src
parent7c03fe2c9f498bad7e40d29f2eb4573d23e102d0 (diff)
downloadcoreutils-02807c611efa0d2052c4d2f852a84b22c49d9e52.tar.xz
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.
Diffstat (limited to 'src')
-rw-r--r--src/df.c2
1 files changed, 1 insertions, 1 deletions
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 *));
}