mirror of https://github.com/nealey/irc-bot
Merge branch 'master' of /home/neale/projects/bot into client
This commit is contained in:
commit
3a19166e28
|
@ -48,7 +48,7 @@ dispatch(const char *buf,
|
||||||
char text[512];
|
char text[512];
|
||||||
|
|
||||||
if (buflen > sizeof(text)) {
|
if (buflen > sizeof(text)) {
|
||||||
fprintf(stderr, "Ignoring message: too long (%d bytes)\n", buflen);
|
fprintf(stderr, "Ignoring message: too long (%u bytes)\n", (unsigned int)buflen);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
memcpy(text, buf, buflen-1); /* omit newline */
|
memcpy(text, buf, buflen-1); /* omit newline */
|
||||||
|
@ -223,8 +223,8 @@ handle_subproc(struct subproc *s)
|
||||||
/* Recycle this subproc unless something was read */
|
/* Recycle this subproc unless something was read */
|
||||||
if (0 >= len) {
|
if (0 >= len) {
|
||||||
if (s->buflen) {
|
if (s->buflen) {
|
||||||
fprintf(stderr, "warning: discarding %d characters from subprocess buffer\n",
|
fprintf(stderr, "warning: discarding %u characters from subprocess buffer\n",
|
||||||
s->buflen);
|
(unsigned int)s->buflen);
|
||||||
}
|
}
|
||||||
close(s->fd);
|
close(s->fd);
|
||||||
s->fd = 0;
|
s->fd = 0;
|
||||||
|
|
Loading…
Reference in New Issue