From 081eb4ad3295ad292f839fb72bc930e9600193e6 Mon Sep 17 00:00:00 2001 From: "John F. Carr" Date: Thu, 20 Jun 1991 10:24:54 +0000 Subject: Add register declaration and comment that malloc(0) is impossible. --- lib/ZFmtNotice.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/ZFmtNotice.c') diff --git a/lib/ZFmtNotice.c b/lib/ZFmtNotice.c index 254d127..14e2f86 100644 --- a/lib/ZFmtNotice.c +++ b/lib/ZFmtNotice.c @@ -13,15 +13,13 @@ /* $Header$ */ #ifndef lint -static char rcsid_ZFormatNotice_c[] = "$Header$"; -#endif lint - -#include +static char rcsid_ZFormatNotice_c[] = "$Id$"; +#endif #include Code_t ZFormatNotice(notice, buffer, ret_len, cert_routine) - ZNotice_t *notice; + register ZNotice_t *notice; char **buffer; int *ret_len; Z_AuthProc cert_routine; @@ -36,6 +34,7 @@ Code_t ZFormatNotice(notice, buffer, ret_len, cert_routine) *ret_len = hdrlen+notice->z_message_len; + /* Length can never be zero, don't have to worry about malloc(0). */ if (!(*buffer = malloc((unsigned)*ret_len))) return (ENOMEM); -- cgit v1.2.3