rosh: compact previous commit
authorGene Cumm <gene.cumm@gmail.com>
Sat, 2 Oct 2010 04:16:54 +0000 (00:16 -0400)
committerGene Cumm <gene.cumm@gmail.com>
Sat, 9 Oct 2010 11:33:07 +0000 (07:33 -0400)
com32/rosh/rosh.c

index 8d4b501..f5ed6cd 100644 (file)
@@ -778,8 +778,7 @@ void rosh_ls_arg(const char *filestr, const int *optarr)
     if (status == 0) {
        if (S_ISDIR(fdstat.st_mode)) {
            ROSH_DEBUG("PATH '%s' is a directory\n", filestr);
-           d = opendir(filestr);
-           if (d) {
+           if (d = opendir(filestr)) {
                rosh_ls_arg_dir(filestr, d, optarr);
            } else {
                rosh_error(errno, "ls", filestr);