12 Oct 2010 15:36
[sysvinit-devel] [PATCH] fix counting message lines in wall.c
Petr Lautrbach <plautrba <at> redhat.com>
2010-10-12 13:36:01 GMT
2010-10-12 13:36:01 GMT
Hello, the wall(1) man page says that message is limited to 20 lines but in reality it's 22 for now. This patch fixes that. Regards, Petr -- -- Petr Lautrbach, Red Hat, Inc.
Index: sysvinit/trunk/src/wall.c
===================================================================
--- sysvinit/trunk/src/wall.c (revision 95)
+++ sysvinit/trunk/src/wall.c (working copy)
<at> <at> -102,7 +102,7 <at> <at>
i = 0;
for (p = buf; *p; p++) {
- if (*p == '\n' && i++ > MAXLINES) {
+ if (*p == '\n' && ++i >= MAXLINES) {
*++p = 0;
break;
}
RSS Feed