summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2011-04-19 23:54:01 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2011-04-19 23:54:01 +0000
commit3feeeda802b50bd03c9f2fb8fe3325afccb3d5c0 (patch)
tree94486b53caa92eddc205057db65bef251b44a83f /usr.bin
parenta9ca12def7c5e35b00ba23c9447854f2a00728e7 (diff)
Should check uname() >= 0 to detect success, not == 0.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/bgplg/misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/bgplg/misc.c b/usr.bin/bgplg/misc.c
index aaba4223d8b..8d3777f9721 100644
--- a/usr.bin/bgplg/misc.c
+++ b/usr.bin/bgplg/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.3 2009/05/01 22:27:23 sthen Exp $ */
+/* $OpenBSD: misc.c,v 1.4 2011/04/19 23:54:00 matthew Exp $ */
/*
* Copyright (c) 2005, 2006 Reyk Floeter <reyk@vantronix.net>
@@ -39,7 +39,7 @@ int
lg_show_version(struct cmd *cmds, char **argv)
{
struct utsname uts;
- if (uname(&uts) == 0)
+ if (uname(&uts) >= 0)
printf("%s %s (%s)\n\n", uts.sysname, uts.release, uts.machine);
printf("%s - %s\n", NAME, BRIEF);
return (0);