From: Michihiro NAKAJIMA Date: Sun, 17 Apr 2011 08:01:43 +0000 (-0400) Subject: Add "else" statement. it's not necessary but it should be. X-Git-Tag: v3.0.0a~437 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e47c21deffad6c819c0dfb8a68db4afd4a3524e4;p=thirdparty%2Flibarchive.git Add "else" statement. it's not necessary but it should be. SVN-Revision: 3249 --- diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c index 8f70afc27..695622465 100644 --- a/libarchive/archive_write_disk_posix.c +++ b/libarchive/archive_write_disk_posix.c @@ -1207,7 +1207,7 @@ create_filesystem_object(struct archive_write_disk *a) if (r == 0 && a->filesize <= 0) { a->todo = 0; a->deferred = 0; - } if (r == 0 && a->filesize > 0) { + } else if (r == 0 && a->filesize > 0) { a->fd = open(a->name, O_WRONLY | O_TRUNC | O_BINARY); if (a->fd < 0) r = errno; diff --git a/libarchive/archive_write_disk_windows.c b/libarchive/archive_write_disk_windows.c index 78ffb1670..36b412210 100644 --- a/libarchive/archive_write_disk_windows.c +++ b/libarchive/archive_write_disk_windows.c @@ -1464,7 +1464,7 @@ create_filesystem_object(struct archive_write_disk *a) if (r == 0 && a->filesize <= 0) { a->todo = 0; a->deferred = 0; - } if (r == 0 && a->filesize > 0) { + } else if (r == 0 && a->filesize > 0) { a->fh = CreateFileW(namefull, GENERIC_WRITE, 0, NULL, TRUNCATE_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (a->fh == INVALID_HANDLE_VALUE) {