[openssh-commits] [openssh] 02/02: Use do{}while(0) for no-op functions.

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Apr 7 10:50:28 AEST 2015


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit e7bf3a5eda6a1b02bef6096fed78527ee11e54cc
Author: Darren Tucker <dtucker at zip.com.au>
Date:   Tue Apr 7 10:48:04 2015 +1000

    Use do{}while(0) for no-op functions.
    
    From FreeBSD.
---
 openbsd-compat/bsd-misc.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h
index 65c18ec..ff347a2 100644
--- a/openbsd-compat/bsd-misc.h
+++ b/openbsd-compat/bsd-misc.h
@@ -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 */

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list