du: sort if and bracketing
authorAlan Cox <alan@linux.intel.com>
Thu, 8 Feb 2018 22:33:40 +0000 (22:33 +0000)
committerAlan Cox <alan@linux.intel.com>
Thu, 8 Feb 2018 22:33:40 +0000 (22:33 +0000)
Applications/util/du.c

index 4d841ad..3fbead9 100644 (file)
@@ -155,7 +155,7 @@ long dodir(char *d, int thislev, dev_t dev)
         * directory should not already have been done.
         */
        maybe_print = !silent;
-       if (dir = opendir(d) == NULL) break;
+       if ((dir = opendir(d)) == NULL) break;
        while ((entry = readdir(dir)) != NULL) {
            if (strcmp(entry->d_name, ".") == 0 ||
                strcmp(entry->d_name, "..") == 0)