diff options
author | dim <dim@FreeBSD.org> | 2011-12-17 21:37:21 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-12-17 21:37:21 +0000 |
commit | 05e60339a1cab76d063d6f88ed145b459357012f (patch) | |
tree | 44ad98e87b1690b7a41f645cce2f3954eeadef6e /usr.sbin | |
parent | 376711b828bc4a69825b73615ce5aeb5f4905eb4 (diff) | |
download | FreeBSD-src-05e60339a1cab76d063d6f88ed145b459357012f.zip FreeBSD-src-05e60339a1cab76d063d6f88ed145b459357012f.tar.gz |
In usr.sbin/lpr/filters/lpf.c, use a less obtuse way of clearing the
buffer, that also avoids warnings.
MFC after: 1 week
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/lpr/filters/lpf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/lpr/filters/lpf.c b/usr.sbin/lpr/filters/lpf.c index f88752a..b277d17 100644 --- a/usr.sbin/lpr/filters/lpf.c +++ b/usr.sbin/lpr/filters/lpf.c @@ -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) { |