summaryrefslogtreecommitdiff
path: root/usr/src/ucbcmd/printenv/printenv.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/ucbcmd/printenv/printenv.c')
-rw-r--r--usr/src/ucbcmd/printenv/printenv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/src/ucbcmd/printenv/printenv.c b/usr/src/ucbcmd/printenv/printenv.c
index c21579807b..74bf91e1db 100644
--- a/usr/src/ucbcmd/printenv/printenv.c
+++ b/usr/src/ucbcmd/printenv/printenv.c
@@ -19,6 +19,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -56,6 +57,7 @@ main(int argc, char *argv[])
int found = 0;
argc--, argv++;
+
if (environ)
for (ep = environ; *ep; ep++)
if (argc == 0 || prefix(argv[0], *ep)) {
@@ -73,7 +75,7 @@ main(int argc, char *argv[])
return (!found);
}
-int
+static int
prefix(char *cp, char *dp)
{