diff options
author | Jim Meyering <jim@meyering.net> | 2000-11-06 10:24:21 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-11-06 10:24:21 +0000 |
commit | 0e4c958fb8628ec65a3391a2e1f85a474b21deee (patch) | |
tree | 807f02064e82b80da6d73adfdd5aa0ce3f46cda3 | |
parent | 8b6603f08548702bc7ffe9ecf0f9794f3e8635cb (diff) | |
download | coreutils-0e4c958fb8628ec65a3391a2e1f85a474b21deee.tar.xz |
(skip): st_size is not defined for directories.
-rw-r--r-- | src/od.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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) { |