PERFORCE change 178214 for review

Garrett Cooper gcooper at FreeBSD.org
Thu May 13 17:51:53 UTC 2010


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

Change 178214 by gcooper at starr-bastion on 2010/05/13 17:51:29

	Remove the do-while(0). It's not required as this block of code does not
	require this as it's already properly partitioned off with an
	if-statement. 

Affected files ...

.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/create/perform.c#23 edit

Differences ...

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/create/perform.c#23 (text+ko) ====

@@ -431,13 +431,11 @@
 make_dist(const char *homedir, const char *pkg, const char *suff, Package *plist)
 {
 
-#define ADD_FILE(SRCFILE, DESTFILE, OPEN_FLAGS)				\
-	do {								\
-		if (error == NULL) {					\
-			error = add_file(archive, SRCFILE, DESTFILE,	\
-			    OPEN_FLAGS);				\
-		}							\
-	} while (0)
+#define ADD_FILE(SRCFILE, DESTFILE, OPEN_FLAGS)			\
+	if (error == NULL) {					\
+		error = add_file(archive, SRCFILE, DESTFILE,	\
+		    OPEN_FLAGS);				\
+	}
 
 	PackingList p;
 	struct archive *archive = NULL;


More information about the p4-projects mailing list