From: Darren Tucker Date: Tue, 7 Apr 2015 00:48:04 +0000 (+1000) Subject: Use do{}while(0) for no-op functions. X-Git-Tag: V_6_9_P1~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7bf3a5eda6a1b02bef6096fed78527ee11e54cc;p=thirdparty%2Fopenssh-portable.git Use do{}while(0) for no-op functions. From FreeBSD. --- diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h index 65c18ec2f..ff347a24b 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 */