summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1997-09-18 14:08:40 +0000
committerphk <phk@FreeBSD.org>1997-09-18 14:08:40 +0000
commitd8ac4091605cafeed429956439b3365036470356 (patch)
tree86f85152c10afe3de06afc06d7738c614a3210cb /usr.sbin/pkg_install
parent2d831c7d21d4e39820d9fe862e7ec818476c083b (diff)
downloadFreeBSD-src-d8ac4091605cafeed429956439b3365036470356.zip
FreeBSD-src-d8ac4091605cafeed429956439b3365036470356.tar.gz
Many places in the code NULL is used in integer context, where
plain 0 should be used. This happens to work because we #define NULL to 0, but is stylistically wrong and can cause problems for people trying to port bits of code to other environments. PR: 2752 Submitted by: Arne Henrik Juul <arnej@imf.unit.no>
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r--usr.sbin/pkg_install/add/main.c4
-rw-r--r--usr.sbin/pkg_install/delete/main.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pkg_install/add/main.c b/usr.sbin/pkg_install/add/main.c
index 9538d7f..9f23c98 100644
--- a/usr.sbin/pkg_install/add/main.c
+++ b/usr.sbin/pkg_install/add/main.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char *rcsid = "$Id: main.c,v 1.13 1997/02/22 16:09:18 peter Exp $";
+static char *rcsid = "$Id: main.c,v 1.14 1997/03/31 05:10:45 imp Exp $";
#endif
/*
@@ -133,7 +133,7 @@ main(int argc, char **argv)
usage(prog_name, "Missing package name(s)");
else if (ch > 1 && AddMode == MASTER)
usage(prog_name, "Only one package name may be specified with master mode");
- if ((err = pkg_perform(pkgs)) != NULL) {
+ if ((err = pkg_perform(pkgs)) != 0) {
if (Verbose)
fprintf(stderr, "%d package addition(s) failed.\n", err);
return err;
diff --git a/usr.sbin/pkg_install/delete/main.c b/usr.sbin/pkg_install/delete/main.c
index f9e9717..4541646 100644
--- a/usr.sbin/pkg_install/delete/main.c
+++ b/usr.sbin/pkg_install/delete/main.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char *rcsid = "$Id: main.c,v 1.8 1997/02/22 16:09:36 peter Exp $";
+static char *rcsid = "$Id: main.c,v 1.9 1997/03/31 05:10:48 imp Exp $";
#endif
/*
@@ -89,7 +89,7 @@ main(int argc, char **argv)
*pkgs = NULL;
if (!Fake && getuid() != 0)
errx(1, "You must be root to delete packages.");
- if ((error = pkg_perform(start)) != NULL) {
+ if ((error = pkg_perform(start)) != 0) {
if (Verbose)
fprintf(stderr, "%d package deletion(s) failed.\n", error);
return error;
OpenPOWER on IntegriCloud