projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ANSI C; sprintf now returns an int.
[unix-history]
/
usr
/
src
/
usr.sbin
/
inetd
/
inetd.c
diff --git
a/usr/src/usr.sbin/inetd/inetd.c
b/usr/src/usr.sbin/inetd/inetd.c
index
6548aaa
..
f6e09d9
100644
(file)
--- a/
usr/src/usr.sbin/inetd/inetd.c
+++ b/
usr/src/usr.sbin/inetd/inetd.c
@@
-11,7
+11,7
@@
char copyright[] =
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)inetd.c 5.1
0
(Berkeley) %G%";
+static char sccsid[] = "@(#)inetd.c 5.1
1
(Berkeley) %G%";
#endif not lint
/*
#endif not lint
/*
@@
-696,9
+696,9
@@
setproctitle(a, s)
cp = Argv[0];
size = sizeof(sin);
if (getpeername(s, &sin, &size) == 0)
cp = Argv[0];
size = sizeof(sin);
if (getpeername(s, &sin, &size) == 0)
- sprintf(buf, "-%s [%s]", a, inet_ntoa(sin.sin_addr));
+
(void)
sprintf(buf, "-%s [%s]", a, inet_ntoa(sin.sin_addr));
else
else
- sprintf(buf, "-%s", a);
+
(void)
sprintf(buf, "-%s", a);
strncpy(cp, buf, LastArg - cp);
cp += strlen(cp);
while (cp < LastArg)
strncpy(cp, buf, LastArg - cp);
cp += strlen(cp);
while (cp < LastArg)
@@
-905,7
+905,7
@@
daytime_stream(s, sep) /* Return human-readable time of day */
clock = time((time_t *) 0);
clock = time((time_t *) 0);
- sprintf(buffer, "%.24s\r\n", ctime(&clock));
+
(void)
sprintf(buffer, "%.24s\r\n", ctime(&clock));
(void) write(s, buffer, strlen(buffer));
}
(void) write(s, buffer, strlen(buffer));
}
@@
-925,7
+925,7
@@
daytime_dg(s, sep) /* Return human-readable time of day */
size = sizeof(sa);
if (recvfrom(s, buffer, sizeof(buffer), 0, &sa, &size) < 0)
return;
size = sizeof(sa);
if (recvfrom(s, buffer, sizeof(buffer), 0, &sa, &size) < 0)
return;
- sprintf(buffer, "%.24s\r\n", ctime(&clock));
+
(void)
sprintf(buffer, "%.24s\r\n", ctime(&clock));
(void) sendto(s, buffer, strlen(buffer), 0, &sa, sizeof(sa));
}
(void) sendto(s, buffer, strlen(buffer), 0, &sa, sizeof(sa));
}