Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Dec 2011 23:44:40 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r228663 - head/usr.sbin/lpr/filters
Message-ID:  <20111217214440.GB50300@deviant.kiev.zoral.com.ua>
In-Reply-To: <201112172137.pBHLbMAo077674@svn.freebsd.org>
References:  <201112172137.pBHLbMAo077674@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--hjFJOZjrGMhmIgO+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Dec 17, 2011 at 09:37:22PM +0000, Dimitry Andric wrote:
> Author: dim
> Date: Sat Dec 17 21:37:21 2011
> New Revision: 228663
> URL: http://svn.freebsd.org/changeset/base/228663
>=20
> Log:
>   In usr.sbin/lpr/filters/lpf.c, use a less obtuse way of clearing the
>   buffer, that also avoids warnings.
>  =20
>   MFC after:	1 week
>=20
> Modified:
>   head/usr.sbin/lpr/filters/lpf.c
>=20
> Modified: head/usr.sbin/lpr/filters/lpf.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- 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>
> =20
>  #define MAXWIDTH  132
>  #define MAXREP    10
> @@ -115,7 +116,7 @@ main(int argc, char *argv[])
>  			acctfile =3D cp;
>  	}
> =20
> -	for (cp =3D buf[0], limit =3D buf[MAXREP]; cp < limit; *cp++ =3D ' ');
> +	memset(buf, ' ', sizeof(buf));
>  	done =3D 0;
buf is two-dimensional array. This change looks wrong.

> =20
>  	while (!done) {

--hjFJOZjrGMhmIgO+
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEYEARECAAYFAk7tDUgACgkQC3+MBN1Mb4hDeACfTMLTK2w88UwQVbonsFMGh9up
UHkAnAmvsitP7yzHuo7O3opwmADgKf/P
=xkOO
-----END PGP SIGNATURE-----

--hjFJOZjrGMhmIgO+--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111217214440.GB50300>