Sync OpenBSD patchset 895:

POSIX only guarantees uname() will return a non-negative value on
success.

ok nicm@
This commit is contained in:
Tiago Cunha 2011-04-25 20:32:03 +00:00
parent 656a668473
commit d5150484d1

View File

@ -1,4 +1,4 @@
/* $Id: cmd-server-info.c,v 1.44 2011-02-15 15:20:03 tcunha Exp $ */ /* $Id: cmd-server-info.c,v 1.45 2011-04-25 20:32:03 tcunha Exp $ */
/* /*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@ -71,7 +71,7 @@ cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx)
"tmux " VERSION ", pid %ld, started %s", (long) getpid(), tim); "tmux " VERSION ", pid %ld, started %s", (long) getpid(), tim);
ctx->print( ctx->print(
ctx, "socket path %s, debug level %d", socket_path, debug_level); 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", ctx->print(ctx, "system is %s %s %s %s",
un.sysname, un.release, un.version, un.machine); un.sysname, un.release, un.version, un.machine);
} }