PERFORCE change 178872 for review

Garrett Cooper gcooper at FreeBSD.org
Thu May 27 10:49:40 UTC 2010


http://p4web.freebsd.org/@@178872?ac=10

Change 178872 by gcooper at gcooper-bayonetta on 2010/05/27 10:49:22

	Fix some bass ackwards return code checks (== 0 vs != NULL).

Affected files ...

.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libpkg/pen.c#5 edit

Differences ...

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

@@ -105,13 +105,13 @@
 	char cwd[FILENAME_MAX];
 	const char *pen_location = NULL;
 
-	if (find_play_pen(pen, sz) != NULL && mkdtemp(pen) == 0) {
+	if (find_play_pen(pen, sz) != NULL && mkdtemp(pen) != NULL) {
 
 		if (min_free(pen) < sz) {
 			rmdir(pen);
 			errno = ENOSPC;
 		}
-		else if (getcwd(cwd, FILENAME_MAX) == 0 && chdir(pen) == 0) {
+		else if (getcwd(cwd, FILENAME_MAX) != NULL && chdir(pen) == 0) {
 			strcpy(PenLocation, pen);
 			pen_location = pushPen(cwd);
 		}


More information about the p4-projects mailing list