- Moved file-deletion code into generator.c.
[rsync/rsync.git] / tls.c
diff --git a/tls.c b/tls.c
index 8c2a421..6c0466f 100644 (file)
--- a/tls.c
+++ b/tls.c
@@ -66,7 +66,7 @@ static void list_file(const char *fname)
        char datebuf[50];
        char linkbuf[4096];
 
-       if (do_lstat(fname, &buf) == -1)
+       if (do_lstat(fname, &buf) < 0)
                failed("stat", fname);
 
        /* The size of anything but a regular file is probably not
@@ -113,7 +113,7 @@ static void list_file(const char *fname)
        /* TODO: Perhaps escape special characters in fname? */
 
        printf("%s ", permbuf);
-       if (IS_DEVICE(buf.st_mode)) {
+       if (S_ISCHR(buf.st_mode) || S_ISBLK(buf.st_mode)) {
                printf("%5ld,%6ld",
                    (long)major(buf.st_rdev),
                    (long)minor(buf.st_rdev));