]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Use do{}while(0) for no-op functions.
authorDarren Tucker <dtucker@zip.com.au>
Tue, 7 Apr 2015 00:48:04 +0000 (10:48 +1000)
committerDarren Tucker <dtucker@zip.com.au>
Tue, 7 Apr 2015 00:48:04 +0000 (10:48 +1000)
From FreeBSD.

openbsd-compat/bsd-misc.h

index 65c18ec2f061556b9d6750dc9778b1079aedb2f9..ff347a24b0eb598349a4b8ed9f92f38b4c1610a9 100644 (file)
@@ -111,7 +111,7 @@ pid_t getpgid(pid_t);
 #endif
 
 #ifndef HAVE_ENDGRENT
-# define endgrent() {}
+# define endgrent() do { } while(0)
 #endif
 
 #ifndef HAVE_KRB5_GET_ERROR_MESSAGE
@@ -119,7 +119,7 @@ pid_t getpgid(pid_t);
 #endif
 
 #ifndef HAVE_KRB5_FREE_ERROR_MESSAGE
-# define krb5_free_error_message(a,b) while(0)
+# define krb5_free_error_message(a,b) do { } while(0)
 #endif
 
 #endif /* _BSD_MISC_H */