]> diplodocus.org Git - nmh/commitdiff
Don't cast zero to char for storing at pointer to char.
authorRalph Corderoy <ralph@inputplus.co.uk>
Mon, 28 Aug 2017 16:52:12 +0000 (17:52 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 28 Aug 2017 16:52:12 +0000 (17:52 +0100)
sbr/makedir.c

index ad48109..9d5e12e 100644 (file)
@@ -44,7 +44,7 @@ makedir (const char *dir)
     c = strncpy(path, dir, sizeof(path));
 
     while (!had_an_error && (c = strchr((c + 1), '/')) != NULL) {
     c = strncpy(path, dir, sizeof(path));
 
     while (!had_an_error && (c = strchr((c + 1), '/')) != NULL) {
-        *c = (char)0;
+        *c = '\0';
         if (access(path, X_OK)) {
             if (errno != ENOENT){
                 advise (dir, "unable to create directory");
         if (access(path, X_OK)) {
             if (errno != ENOENT){
                 advise (dir, "unable to create directory");