diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1994-09-20 06:24:56 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1994-09-20 06:24:56 +0000 |
| commit | d4daf998edd19ce80ef1d33b717df429020f8ba4 (patch) | |
| tree | 331c1fca4ef817a4bc201b59cd83d2157370968e /bin/mkdir | |
| parent | 1819efa6e7ea0e9533afc1936d8ba2598334108a (diff) | |
Notes
Diffstat (limited to 'bin/mkdir')
| -rw-r--r-- | bin/mkdir/mkdir.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/mkdir/mkdir.c b/bin/mkdir/mkdir.c index 458ec79d8636..083a2af79759 100644 --- a/bin/mkdir/mkdir.c +++ b/bin/mkdir/mkdir.c @@ -60,10 +60,10 @@ main(argc, argv) char *argv[]; { int ch, exitval, oct, omode, pflag; - mode_t *set; + mode_t *set = (mode_t *)NULL; char *ep, *mode; - pflag = 0; + omode = pflag = 0; mode = NULL; while ((ch = getopt(argc, argv, "m:p")) != EOF) switch(ch) { @@ -123,10 +123,11 @@ build(path) char *p; p = path; + oumask = (mode_t)NULL; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1;; ++p) { - if (p[0] == '\0' || p[0] == '/' && p[1] == '\0') + if (p[0] == '\0' || (p[0] == '/' && p[1] == '\0')) break; if (p[0] != '/') continue; |
