inetd: convert remaining bzero(3) to memset(3), NFC
This change is purely in the name of noise reduction from static analyzers that want to complain that bzero(3) is obsolete in favor of memset(3). With this, clang-analyze at least is now noise free. WARNS= 6 also appears to have been OK for some time now, so drop the current setting and opt for the default.
This commit is contained in:
parent
9b6286055a
commit
93e15ee75e
@ -9,7 +9,6 @@ MAN= inetd.8
|
||||
MLINKS= inetd.8 inetd.conf.5
|
||||
SRCS= inetd.c builtins.c
|
||||
|
||||
WARNS?= 3
|
||||
CFLAGS+= -DLOGIN_CAP
|
||||
#CFLAGS+= -DSANITY_CHECK
|
||||
|
||||
|
@ -410,7 +410,7 @@ main(int argc, char **argv)
|
||||
*/
|
||||
servname = (hostname == NULL) ? "0" /* dummy */ : NULL;
|
||||
|
||||
bzero(&hints, sizeof(struct addrinfo));
|
||||
memset(&hints, 0, sizeof(struct addrinfo));
|
||||
hints.ai_flags = AI_PASSIVE;
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_STREAM; /* dummy */
|
||||
@ -2293,7 +2293,7 @@ cpmip(const struct servtab *sep, int ctrl)
|
||||
if (chBest->ch_Service)
|
||||
free(chBest->ch_Service);
|
||||
chBest->ch_Service = strdup(sep->se_service);
|
||||
bzero(chBest->ch_Times, sizeof(chBest->ch_Times));
|
||||
memset(chBest->ch_Times, 0, sizeof(chBest->ch_Times));
|
||||
}
|
||||
#ifdef INET6
|
||||
if ((rss.ss_family == AF_INET6 &&
|
||||
@ -2307,7 +2307,7 @@ cpmip(const struct servtab *sep, int ctrl)
|
||||
if (chBest->ch_Service)
|
||||
free(chBest->ch_Service);
|
||||
chBest->ch_Service = strdup(sep->se_service);
|
||||
bzero(chBest->ch_Times, sizeof(chBest->ch_Times));
|
||||
memset(chBest->ch_Times, 0, sizeof(chBest->ch_Times));
|
||||
}
|
||||
#endif
|
||||
chBest->ch_LTime = t;
|
||||
|
Loading…
x
Reference in New Issue
Block a user