svn commit: r244608 - head/usr.sbin/pkg

Pawel Jakub Dawidek pjd at FreeBSD.org
Sun Dec 23 20:17:10 UTC 2012


On Sun, Dec 23, 2012 at 11:22:18AM +0000, Matthew Seaman wrote:
> Author: matthew (ports committer)
> Date: Sun Dec 23 11:22:18 2012
> New Revision: 244608
> URL: http://svnweb.freebsd.org/changeset/base/244608
> 
> Log:
>   Third time's the charm.  pkg -N output needs to go to stderr.
>   
>   Approved by:	bapt
>   MFC after:	2 weeks
> 
> Modified:
>   head/usr.sbin/pkg/pkg.c
> 
> Modified: head/usr.sbin/pkg/pkg.c
> ==============================================================================
> --- head/usr.sbin/pkg/pkg.c	Sun Dec 23 10:21:01 2012	(r244607)
> +++ head/usr.sbin/pkg/pkg.c	Sun Dec 23 11:22:18 2012	(r244608)
> @@ -457,10 +457,8 @@ main(__unused int argc, char *argv[])
>  		 * a system is configured to use pkg, don't bootstrap pkg
>  		 * when that argument is given as argv[1].
>  		 */
> -		if ( argv[1] != NULL && strcmp(argv[1], "-N") == 0) {
> -			printf("%s", "pkg is not installed\n");
> -			exit(EXIT_FAILURE);
> -		}
> +		if ( argv[1] != NULL && strcmp(argv[1], "-N") == 0)
> +			errx(EXIT_FAILURE, "pkg is not installed\n");

How about removing space after 'if (' and redundant '\n'?

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://tupytaj.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20121223/2bd03e10/attachment.sig>


More information about the svn-src-all mailing list