diff options
author | Lucien Van Elsen <lwvanels@mit.edu> | 1991-12-04 08:47:30 +0000 |
---|---|---|
committer | Lucien Van Elsen <lwvanels@mit.edu> | 1991-12-04 08:47:30 +0000 |
commit | dbafcd968ad1363f78dfde195848ca8e5e2089ad (patch) | |
tree | 0f1ccb105d27aa1539043989d399b3f11f9d081b /lib | |
parent | be4b0ac80fccc296b4b15dedaa21be21e222c87f (diff) |
Minor ANSI C fixes- (typecasts and nothing after #endif)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ZAsyncLocate.c | 10 | ||||
-rw-r--r-- | lib/ZCkIfNot.c | 2 | ||||
-rw-r--r-- | lib/ZCmpUIDP.c | 2 | ||||
-rw-r--r-- | lib/ZFlsLocs.c | 2 | ||||
-rw-r--r-- | lib/ZFmtList.c | 2 | ||||
-rw-r--r-- | lib/ZFmtNotice.c | 2 | ||||
-rw-r--r-- | lib/ZFmtRaw.c | 2 | ||||
-rw-r--r-- | lib/ZFmtRawLst.c | 4 | ||||
-rw-r--r-- | lib/ZFmtSmRLst.c | 2 | ||||
-rw-r--r-- | lib/ZFmtSmRaw.c | 2 | ||||
-rw-r--r-- | lib/ZFreeNot.c | 2 | ||||
-rw-r--r-- | lib/ZGetLocs.c | 2 | ||||
-rw-r--r-- | lib/ZGetSubs.c | 2 | ||||
-rw-r--r-- | lib/ZGetWGPort.c | 2 | ||||
-rw-r--r-- | lib/ZIfNotice.c | 4 | ||||
-rw-r--r-- | lib/ZLocateU.c | 2 | ||||
-rw-r--r-- | lib/ZOpenPort.c | 2 | ||||
-rw-r--r-- | lib/ZPeekIfNot.c | 4 | ||||
-rw-r--r-- | lib/ZPeekNot.c | 2 | ||||
-rw-r--r-- | lib/ZPeekPkt.c | 4 | ||||
-rw-r--r-- | lib/ZPending.c | 2 | ||||
-rw-r--r-- | lib/ZRecvNot.c | 4 | ||||
-rw-r--r-- | lib/ZRecvPkt.c | 2 | ||||
-rw-r--r-- | lib/ZSendList.c | 2 | ||||
-rw-r--r-- | lib/ZSendNot.c | 2 | ||||
-rw-r--r-- | lib/ZSendRLst.c | 2 | ||||
-rw-r--r-- | lib/ZSendRaw.c | 2 | ||||
-rw-r--r-- | lib/ZSetDest.c | 2 | ||||
-rw-r--r-- | lib/ZSetSrv.c | 2 | ||||
-rw-r--r-- | lib/ZVariables.c | 2 | ||||
-rw-r--r-- | lib/acl_files.c | 2 |
31 files changed, 40 insertions, 40 deletions
diff --git a/lib/ZAsyncLocate.c b/lib/ZAsyncLocate.c index a743350..deeac10 100644 --- a/lib/ZAsyncLocate.c +++ b/lib/ZAsyncLocate.c @@ -21,7 +21,7 @@ static char rcsid_ZAsyncLocate_c[] = "$Id$"; Code_t ZRequestLocations(user, zald, kind, auth) char *user; register ZAsyncLocateData_t *zald; - int kind; /* UNSAFE, UNACKED, or ACKED */ + ZNotice_Kind_t kind; /* UNSAFE, UNACKED, or ACKED */ Z_AuthProc auth; { int retval; @@ -66,7 +66,7 @@ Code_t ZParseLocations(notice,zald,nlocs,user) char **user; { char *ptr, *end; - int retval, i; + int i; ZFlushLocations(); /* This never fails (this function is part of the library, so it is allowed to know this). */ @@ -114,21 +114,21 @@ Code_t ZParseLocations(notice,zald,nlocs,user) unsigned int len; len = strlen (ptr) + 1; - __locate_list[i].host = malloc(len); + __locate_list[i].host = (char *) malloc(len); if (!__locate_list[i].host) return (ENOMEM); (void) strcpy(__locate_list[i].host, ptr); ptr += len; len = strlen (ptr) + 1; - __locate_list[i].time = malloc(len); + __locate_list[i].time = (char *) malloc(len); if (!__locate_list[i].time) return (ENOMEM); (void) strcpy(__locate_list[i].time, ptr); ptr += len; len = strlen (ptr) + 1; - __locate_list[i].tty = malloc(len); + __locate_list[i].tty = (char *) malloc(len); if (!__locate_list[i].tty) return (ENOMEM); (void) strcpy(__locate_list[i].tty, ptr); diff --git a/lib/ZCkIfNot.c b/lib/ZCkIfNot.c index ffdde65..103f7e2 100644 --- a/lib/ZCkIfNot.c +++ b/lib/ZCkIfNot.c @@ -39,7 +39,7 @@ Code_t ZCheckIfNotice(notice, from, predicate, args) &tmpnotice)) != ZERR_NONE) return (retval); if ((*predicate)(&tmpnotice, args)) { - if (!(buffer = malloc((unsigned) qptr->packet_len))) + if (!(buffer = (char *) malloc((unsigned) qptr->packet_len))) return (ENOMEM); bcopy(qptr->packet, buffer, qptr->packet_len); if (from) diff --git a/lib/ZCmpUIDP.c b/lib/ZCmpUIDP.c index 17669e2..29bb69b 100644 --- a/lib/ZCmpUIDP.c +++ b/lib/ZCmpUIDP.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZCompareUIDPred_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZFlsLocs.c b/lib/ZFlsLocs.c index f2b018e..b5110f8 100644 --- a/lib/ZFlsLocs.c +++ b/lib/ZFlsLocs.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZFlushLocations_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZFmtList.c b/lib/ZFmtList.c index 95e5e52..53aa356 100644 --- a/lib/ZFmtList.c +++ b/lib/ZFmtList.c @@ -45,7 +45,7 @@ Code_t ZFormatNoticeList(notice, list, nitems, buffer, ret_len, *ret_len = hdrlen+size; /* *ret_len can never be zero here, no need to worry about malloc(0). */ - if (!(*buffer = malloc((unsigned)*ret_len))) + if (!(*buffer = (char *) malloc((unsigned)*ret_len))) return (ENOMEM); bcopy(header, *buffer, hdrlen); diff --git a/lib/ZFmtNotice.c b/lib/ZFmtNotice.c index 14e2f86..b56f6ee 100644 --- a/lib/ZFmtNotice.c +++ b/lib/ZFmtNotice.c @@ -35,7 +35,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))) + if (!(*buffer = (char *) malloc((unsigned)*ret_len))) return (ENOMEM); bcopy(header, *buffer, hdrlen); diff --git a/lib/ZFmtRaw.c b/lib/ZFmtRaw.c index 05b230b..e5da26b 100644 --- a/lib/ZFmtRaw.c +++ b/lib/ZFmtRaw.c @@ -34,7 +34,7 @@ Code_t ZFormatRawNotice(notice, buffer, ret_len) *ret_len = hdrlen+notice->z_message_len; /* *ret_len is never 0, don't have to worry about malloc(0) */ - if (!(*buffer = malloc((unsigned) *ret_len))) + if (!(*buffer = (char *) malloc((unsigned) *ret_len))) return (ENOMEM); bcopy(header, *buffer, hdrlen); diff --git a/lib/ZFmtRawLst.c b/lib/ZFmtRawLst.c index 9f70708..7ac49e3 100644 --- a/lib/ZFmtRawLst.c +++ b/lib/ZFmtRawLst.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZFormatRawNoticeList_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> @@ -42,7 +42,7 @@ Code_t ZFormatRawNoticeList(notice, list, nitems, buffer, ret_len) *ret_len = hdrlen+size; - if (!(*buffer = malloc((unsigned) *ret_len))) + if (!(*buffer = (char *) malloc((unsigned) *ret_len))) return (ENOMEM); bcopy(header, *buffer, hdrlen); diff --git a/lib/ZFmtSmRLst.c b/lib/ZFmtSmRLst.c index 95cae5f..8032909 100644 --- a/lib/ZFmtSmRLst.c +++ b/lib/ZFmtSmRLst.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZFormatRawNoticeList_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZFmtSmRaw.c b/lib/ZFmtSmRaw.c index ab0cd38..e3eb1da 100644 --- a/lib/ZFmtSmRaw.c +++ b/lib/ZFmtSmRaw.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZFormatRawNotice_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZFreeNot.c b/lib/ZFreeNot.c index 97502fc..02622eb 100644 --- a/lib/ZFreeNot.c +++ b/lib/ZFreeNot.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZFreeNotice_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZGetLocs.c b/lib/ZGetLocs.c index 6e795a2..57e5842 100644 --- a/lib/ZGetLocs.c +++ b/lib/ZGetLocs.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZGetLocations_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZGetSubs.c b/lib/ZGetSubs.c index 6b75454..5dd92c7 100644 --- a/lib/ZGetSubs.c +++ b/lib/ZGetSubs.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZGetSubscriptions_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZGetWGPort.c b/lib/ZGetWGPort.c index c2d28e8..9605098 100644 --- a/lib/ZGetWGPort.c +++ b/lib/ZGetWGPort.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZGetWGPort_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZIfNotice.c b/lib/ZIfNotice.c index 32b6b83..c578de5 100644 --- a/lib/ZIfNotice.c +++ b/lib/ZIfNotice.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZIfNotice_c[] = "$Id$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> @@ -42,7 +42,7 @@ Code_t ZIfNotice(notice, from, predicate, args) &tmpnotice)) != ZERR_NONE) return (retval); if ((*predicate)(&tmpnotice, args)) { - if (!(buffer = malloc((unsigned) qptr->packet_len))) + if (!(buffer = (char *) malloc((unsigned) qptr->packet_len))) return (ENOMEM); bcopy(qptr->packet, buffer, qptr->packet_len); if (from) diff --git a/lib/ZLocateU.c b/lib/ZLocateU.c index 69ed9ab..6b10ccd 100644 --- a/lib/ZLocateU.c +++ b/lib/ZLocateU.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZLocateUser_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZOpenPort.c b/lib/ZOpenPort.c index 5d8056a..88d2d9f 100644 --- a/lib/ZOpenPort.c +++ b/lib/ZOpenPort.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZOpenPort_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZPeekIfNot.c b/lib/ZPeekIfNot.c index e1c560a..263d6a3 100644 --- a/lib/ZPeekIfNot.c +++ b/lib/ZPeekIfNot.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZPeekIfNotice_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> @@ -41,7 +41,7 @@ Code_t ZPeekIfNotice(notice, from, predicate, args) &tmpnotice)) != ZERR_NONE) return (retval); if ((*predicate)(&tmpnotice, args)) { - if (!(buffer = malloc((unsigned) qptr->packet_len))) + if (!(buffer = (char *) malloc((unsigned) qptr->packet_len))) return (ENOMEM); bcopy(qptr->packet, buffer, qptr->packet_len); if (from) diff --git a/lib/ZPeekNot.c b/lib/ZPeekNot.c index 8e6f857..f789ee1 100644 --- a/lib/ZPeekNot.c +++ b/lib/ZPeekNot.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZPeekNotice_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZPeekPkt.c b/lib/ZPeekPkt.c index 7a806cb..e960409 100644 --- a/lib/ZPeekPkt.c +++ b/lib/ZPeekPkt.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZPeekPacket_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> @@ -35,7 +35,7 @@ Code_t ZPeekPacket(buffer, ret_len, from) *ret_len = nextq->packet_len; - if (!(*buffer = malloc((unsigned) *ret_len))) + if (!(*buffer = (char *) malloc((unsigned) *ret_len))) return (ENOMEM); bcopy(nextq->packet, *buffer, *ret_len); diff --git a/lib/ZPending.c b/lib/ZPending.c index cb1e3b2..03cc8c7 100644 --- a/lib/ZPending.c +++ b/lib/ZPending.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZPending_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZRecvNot.c b/lib/ZRecvNot.c index 9178af3..e84e7cd 100644 --- a/lib/ZRecvNot.c +++ b/lib/ZRecvNot.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZReceiveNotice_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> @@ -36,7 +36,7 @@ Code_t ZReceiveNotice(notice, from) len = nextq->packet_len; - if (!(buffer = malloc((unsigned) len))) + if (!(buffer = (char *) malloc((unsigned) len))) return (ENOMEM); if (from) diff --git a/lib/ZRecvPkt.c b/lib/ZRecvPkt.c index e198530..93dea4c 100644 --- a/lib/ZRecvPkt.c +++ b/lib/ZRecvPkt.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZReceivePacket_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZSendList.c b/lib/ZSendList.c index cd1bc6a..bdfec14 100644 --- a/lib/ZSendList.c +++ b/lib/ZSendList.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZSendList_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZSendNot.c b/lib/ZSendNot.c index e5fb1a3..0889290 100644 --- a/lib/ZSendNot.c +++ b/lib/ZSendNot.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZSendNotice_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZSendRLst.c b/lib/ZSendRLst.c index a85dc49..02049f6 100644 --- a/lib/ZSendRLst.c +++ b/lib/ZSendRLst.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZSendRawList_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZSendRaw.c b/lib/ZSendRaw.c index da6d93e..25a07fd 100644 --- a/lib/ZSendRaw.c +++ b/lib/ZSendRaw.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZSendRawNotice_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZSetDest.c b/lib/ZSetDest.c index adffc89..dd16436 100644 --- a/lib/ZSetDest.c +++ b/lib/ZSetDest.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZSetDestAddr_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZSetSrv.c b/lib/ZSetSrv.c index 937536d..bc15016 100644 --- a/lib/ZSetSrv.c +++ b/lib/ZSetSrv.c @@ -14,7 +14,7 @@ #ifndef lint static char rcsid_ZSetServerState_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/ZVariables.c b/lib/ZVariables.c index f7f5648..ffa918d 100644 --- a/lib/ZVariables.c +++ b/lib/ZVariables.c @@ -15,7 +15,7 @@ #ifndef lint static char rcsid_ZVariables_c[] = "$Header$"; -#endif lint +#endif #include <zephyr/mit-copyright.h> diff --git a/lib/acl_files.c b/lib/acl_files.c index e0e8367..bbecff0 100644 --- a/lib/acl_files.c +++ b/lib/acl_files.c @@ -378,7 +378,7 @@ static int acl_cache_next = 0; int acl_load(name) char *name; { - int i,fd; + int i; FILE *f; char buf[MAX_PRINCIPAL_SIZE]; char canon[MAX_PRINCIPAL_SIZE]; |