diff options
Diffstat (limited to 'lib/ZFmtNotice.c')
-rw-r--r-- | lib/ZFmtNotice.c | 9 |
1 files changed, 4 insertions, 5 deletions
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 <zephyr/mit-copyright.h> +static char rcsid_ZFormatNotice_c[] = "$Id$"; +#endif #include <zephyr/zephyr_internal.h> 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); |