Simplify, memset() with 0 rather than '\0'

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2019-10-24 10:44:47 +02:00
parent 6c23333feb
commit 773ee73214
3 changed files with 5 additions and 5 deletions

View File

@ -1243,7 +1243,7 @@ int main(int argc, char *argv[])
#else
if (FD_ISSET(fileno(stdin), &readfds)) {
logit("Message from stdin.\n");
memset(line, '\0', sizeof(line));
memset(line, 0, sizeof(line));
line[0] = '.';
parts[fileno(stdin)] = NULL;
i = read(fileno(stdin), line, MAXLINE);
@ -1535,7 +1535,7 @@ void printchopped(const char *hname, char *msg, size_t len, int fd)
else {
strcpy(parts[fd], p);
logit("Saving partial msg: %s\n", parts[fd]);
memset(p, '\0', ptlngth);
memset(p, 0, ptlngth);
}
}