Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 May 2010 11:15:08 GMT
From:      Garrett Cooper <gcooper@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 178874 for review
Message-ID:  <201005271115.o4RBF8mi029855@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@178874?ac=10

Change 178874 by gcooper@gcooper-bayonetta on 2010/05/27 11:15:08

	Fix inverted logic with the file descriptor value.

Affected files ...

.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libpkg/file.c#17 edit

Differences ...

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libpkg/file.c#17 (text+ko) ====

@@ -428,7 +428,7 @@
 	}
 
 	/* The initial open failed or archive(3) failed to open the file. */
-	if (archive_fd != -1 || archive == NULL) ;
+	if (archive_fd == -1 || archive == NULL) ;
 	/* archive(3) failed to open the file descriptor. */
 	else if (archive_read_open_fd(archive, archive_fd,
 	    ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK)
@@ -515,7 +515,7 @@
 	}
 
 	/* The initial open failed or archive(3) failed to open the file. */
-	if (archive_fd != -1 || archive == NULL) ;
+	if (archive_fd == -1 || archive == NULL) ;
 	/* archive(3) failed to open the file descriptor. */
 	else if (archive_read_open_fd(archive, archive_fd,
 	    ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005271115.o4RBF8mi029855>