[Midnightbsd-cvs] src [9832] trunk/usr.sbin/mport/mport.c: assign to null
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri May 11 18:11:42 EDT 2018
Revision: 9832
http://svnweb.midnightbsd.org/src/?rev=9832
Author: laffer1
Date: 2018-05-11 18:11:41 -0400 (Fri, 11 May 2018)
Log Message:
-----------
assign to null
Modified Paths:
--------------
trunk/usr.sbin/mport/mport.c
Modified: trunk/usr.sbin/mport/mport.c
===================================================================
--- trunk/usr.sbin/mport/mport.c 2018-05-11 22:01:09 UTC (rev 9831)
+++ trunk/usr.sbin/mport/mport.c 2018-05-11 22:11:41 UTC (rev 9832)
@@ -411,7 +411,7 @@
int
which(mportInstance *mport, const char *filePath) {
- mportPackageMeta *pack;
+ mportPackageMeta *pack = NULL;
if (filePath == NULL) {
warnx("%s", "Specify file path");
@@ -423,11 +423,9 @@
return (1);
}
- if (pack != NULL) {
+ if (pack != NULL && pack->origin != NULL) {
printf("%s was installed by package %s\n",
filePath, pack->origin);
- } else {
- puts("null?");
}
return (0);
More information about the Midnightbsd-cvs
mailing list