From: Alan Cox Date: Sun, 13 Nov 2016 00:09:40 +0000 (+0000) Subject: df: move big buffers off stack X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=171ed0ed4a26bfe5ce3eb94724ba33cf75ed24bf;p=FUZIX.git df: move big buffers off stack --- diff --git a/Applications/util/df.c b/Applications/util/df.c index 5ef983a6..d81bfa41 100644 --- a/Applications/util/df.c +++ b/Applications/util/df.c @@ -143,10 +143,11 @@ void df_all(void) const char *devname(dev_t devno) { - DIR dp; + static char namebuf[sizeof(DEV_PATH) + MAXNAMLEN + 2]; + static DIR dp; + struct dirent *entry; struct stat fstat; - static char namebuf[sizeof(DEV_PATH) + MAXNAMLEN + 2]; if (opendir_r(&dp, DEV_PATH) != (DIR *) NULL) { while ((entry = readdir(&dp)) != (struct dirent *) NULL) {