diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2005-12-28 15:41:30 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2005-12-28 15:41:30 +0000 |
commit | f357c0bf5b346373915488436f15cadba4e98cab (patch) | |
tree | ef54381ae766a3ef88bf7af9e9cd2fddcb17a26b /usr.bin/uname/uname.c | |
parent | eabf01b47cdb300c95bf7839a93f0f9176fe1db7 (diff) |
Pass sysctl() the buffer, not a pointer to the buffer. From mpech@
Diffstat (limited to 'usr.bin/uname/uname.c')
-rw-r--r-- | usr.bin/uname/uname.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/uname/uname.c b/usr.bin/uname/uname.c index bed785a6b36..1ce191dd0ef 100644 --- a/usr.bin/uname/uname.c +++ b/usr.bin/uname/uname.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uname.c,v 1.8 2003/07/10 00:06:51 david Exp $ */ +/* $OpenBSD: uname.c,v 1.9 2005/12/28 15:41:29 millert Exp $ */ /* * Copyright (c) 1994 Winning Strategies, Inc. @@ -32,7 +32,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: uname.c,v 1.8 2003/07/10 00:06:51 david Exp $"; +static char rcsid[] = "$OpenBSD: uname.c,v 1.9 2005/12/28 15:41:29 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -136,7 +136,7 @@ main(int argc, char *argv[]) mib[0] = CTL_HW; mib[1] = HW_MODEL; len = sizeof(buf); - if (sysctl(mib, 2, &buf, &len, NULL, 0) == -1) + if (sysctl(mib, 2, buf, &len, NULL, 0) == -1) err(1, "sysctl"); printf("%.*s", (int)len, buf); } |