Author: dim
Date: Sat Dec 17 21:37:21 2011
New Revision: 228663
URL: http://svn.freebsd.org/changeset/base/228663
Log:
In usr.sbin/lpr/filters/lpf.c, use a less obtuse way of clearing the
buffer, that also avoids warnings.
MFC after: 1 week
Modified:
head/usr.sbin/lpr/filters/lpf.c
Modified: head/usr.sbin/lpr/filters/lpf.c
==============================================================================
--- head/usr.sbin/lpr/filters/lpf.c Sat Dec 17 20:53:06 2011
(r228662)
+++ head/usr.sbin/lpr/filters/lpf.c Sat Dec 17 21:37:21 2011
(r228663)
@@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$");
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#define MAXWIDTH 132
#define MAXREP 10
@@ -115,7 +116,7 @@ main(int argc, char *argv[])
acctfile = cp;
}
- for (cp = buf[0], limit = buf[MAXREP]; cp < limit; *cp++ = ' ');
+ memset(buf, ' ', sizeof(buf));
done = 0;
while (!done) {
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"