diff options
author | John F. Carr <jfc@mit.edu> | 1991-06-20 10:24:54 +0000 |
---|---|---|
committer | John F. Carr <jfc@mit.edu> | 1991-06-20 10:24:54 +0000 |
commit | 081eb4ad3295ad292f839fb72bc930e9600193e6 (patch) | |
tree | a114b734315cca99d85c30cc2edff621151e1412 | |
parent | 3fe22e1276f026ed6f9617e13ee6b7e5f2270b51 (diff) |
Add register declaration and comment that malloc(0) is impossible.
-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); |