From 37d14446486e1d383e94bcf44787d54e5bb0af92 Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Tue, 19 Apr 2011 20:12:48 +0000 Subject: POSIX only guarantees uname() will return a non-negative value on success. ok nicm@ --- usr.bin/tmux/cmd-server-info.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/tmux') diff --git a/usr.bin/tmux/cmd-server-info.c b/usr.bin/tmux/cmd-server-info.c index d9e7b747b05..f734129eade 100644 --- a/usr.bin/tmux/cmd-server-info.c +++ b/usr.bin/tmux/cmd-server-info.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-server-info.c,v 1.24 2011/01/26 01:54:56 nicm Exp $ */ +/* $OpenBSD: cmd-server-info.c,v 1.25 2011/04/19 20:12:47 matthew Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -71,7 +71,7 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx) ctx->print(ctx, "pid %ld, started %s", (long) getpid(), tim); ctx->print( ctx, "socket path %s, debug level %d", socket_path, debug_level); - if (uname(&un) == 0) { + if (uname(&un) >= 0) { ctx->print(ctx, "system is %s %s %s %s", un.sysname, un.release, un.version, un.machine); } -- cgit v1.2.3