From: Jim Meyering Date: Mon, 6 Nov 2000 10:24:21 +0000 (+0000) Subject: (skip): st_size is not defined for directories. X-Git-Tag: FILEUTILS-4_0_32~64 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=0e4c958fb8628ec65a3391a2e1f85a474b21deee;p=thirdparty%2Fcoreutils.git (skip): st_size is not defined for directories. --- diff --git a/src/od.c b/src/od.c index 5493abfe08..381ba6e6fb 100644 --- a/src/od.c +++ b/src/od.c @@ -1003,12 +1003,12 @@ skip (off_t n_skip) continue; } - /* The st_size field is valid only for regular files and - directories. FIXME: is the preceding true? + /* The st_size field is valid only for regular files + (and for symbolic links, which cannot occur here). If the number of bytes left to skip is at least as large as the size of the current file, we can decrement n_skip and go on to the next file. */ - if (S_ISREG (file_stats.st_mode) || S_ISDIR (file_stats.st_mode)) + if (S_ISREG (file_stats.st_mode)) { if (n_skip >= file_stats.st_size) {