From 904bd4ea7c20786dbea3b1727bc860aebe4e447d Mon Sep 17 00:00:00 2001 From: "John F. Carr" Date: Thu, 20 Jun 1991 05:01:28 +0000 Subject: Add zsub_ prefix to fields of subscription structure. --- lib/ZSubs.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'lib/ZSubs.c') diff --git a/lib/ZSubs.c b/lib/ZSubs.c index 8f006f5..ab313d4 100644 --- a/lib/ZSubs.c +++ b/lib/ZSubs.c @@ -14,10 +14,8 @@ /* $Header$ */ #ifndef lint -static char rcsid_ZSubscriptions_c[] = "$Header$"; -#endif lint - -#include +static char rcsid_ZSubscriptions_c[] = "$Id$"; +#endif #include @@ -62,7 +60,7 @@ static Code_t subscr_sendoff(); */ Z_Subscriptions(sublist, nitems, port, opcode, authit) - ZSubscription_t *sublist; + register ZSubscription_t *sublist; int nitems; u_short port; char *opcode; @@ -78,6 +76,9 @@ Z_Subscriptions(sublist, nitems, port, opcode, authit) adjusted below */ int size, start, numok; + if (!nitems) + return ZERR_NONE; + list = (char **)malloc((unsigned)nitems*3*sizeof(char *)); if (!list) return (ENOMEM); @@ -109,10 +110,10 @@ Z_Subscriptions(sublist, nitems, port, opcode, authit) /* assemble subs into an array of pointers */ for (i=0;i