diff options
author | kientzle <kientzle@FreeBSD.org> | 2008-12-06 05:55:46 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2008-12-06 05:55:46 +0000 |
commit | fa92961e897ddf24189345a47b7f38d457ea7197 (patch) | |
tree | 39a2e639fee203f835992e318c7a269b46b17ffd | |
parent | f7c489d836af10a828e5a3284edac0ee33bc4793 (diff) | |
download | FreeBSD-src-fa92961e897ddf24189345a47b7f38d457ea7197.zip FreeBSD-src-fa92961e897ddf24189345a47b7f38d457ea7197.tar.gz |
Minor portability: Declare 'r' only within the conditional
block where it's used; S_ISLNK is more portable than S_ISLINK.
-rw-r--r-- | lib/libarchive/archive_write_disk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libarchive/archive_write_disk.c b/lib/libarchive/archive_write_disk.c index 8035bbb..68da515 100644 --- a/lib/libarchive/archive_write_disk.c +++ b/lib/libarchive/archive_write_disk.c @@ -518,7 +518,6 @@ write_data_block(struct archive_write_disk *a, { ssize_t bytes_written = 0; ssize_t block_size = 0, bytes_to_write; - int r; if (a->filesize == 0 || a->fd < 0) { archive_set_error(&a->archive, 0, @@ -528,6 +527,7 @@ write_data_block(struct archive_write_disk *a, if (a->flags & ARCHIVE_EXTRACT_SPARSE) { #if HAVE_STRUCT_STAT_ST_BLKSIZE + int r; if ((r = _archive_write_disk_lazy_stat(a)) != ARCHIVE_OK) return (r); block_size = a->pst->st_blksize; @@ -1752,7 +1752,7 @@ set_time(int fd, int mode, const char *name, (void)mtime_nsec; /* UNUSED */ times.actime = atime; times.modtime = mtime; - if (S_ISLINK(mode)) + if (S_ISLNK(mode)) return (ARCHIVE_OK); return (utime(name, ×)); } |