diff options
author | Eric Andersen | 2001-04-26 18:43:36 +0000 |
---|---|---|
committer | Eric Andersen | 2001-04-26 18:43:36 +0000 |
commit | ca85cdbe4c414f5892b57a3c0fb2439f3061496c (patch) | |
tree | 75795176aceee4a9c91a2a924676180436f05cde /chmod.c | |
parent | 468f504fd79a590e632193fc0ecf999b86ae5cba (diff) | |
download | busybox-ca85cdbe4c414f5892b57a3c0fb2439f3061496c.zip busybox-ca85cdbe4c414f5892b57a3c0fb2439f3061496c.tar.gz |
Doh. I never allocated storate for the struct stat I am using.
There was just a never initialized pointer.
-Erik
Diffstat (limited to 'chmod.c')
-rw-r--r-- | chmod.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -30,12 +30,12 @@ #include "busybox.h" -struct stat *theMode; +struct stat theMode; static int fileAction(const char *fileName, struct stat *statbuf, void* junk) { - if (chmod(fileName, theMode->st_mode) == 0) + if (chmod(fileName, theMode.st_mode) == 0) return (TRUE); perror(fileName); return (FALSE); @@ -59,7 +59,7 @@ int chmod_main(int argc, char **argv) if (argc > optind && argc > 2 && argv[optind]) { /* Parse the specified mode */ - if (parse_mode(argv[optind], &(theMode->st_mode)) == FALSE) { + if (parse_mode(argv[optind], &(theMode.st_mode)) == FALSE) { error_msg_and_die( "unknown mode: %s", argv[optind]); } } else { |