diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-09-11 07:01:04 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-09-11 07:01:04 +0000 |
commit | db867d624fcedeeddf26df3c7d38ed238f154bd7 (patch) | |
tree | 16ad9b145a9c711b6cb27fd16d7324e33966acdf /usr.bin | |
parent | 1bd7ac786eaa1979348c418ba2c0e2f992f3e960 (diff) |
Correctly NUL-terminate the cpu view array. Fix a segfault on powerpc
and probably others.
ok reyk@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/systat/cpu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/systat/cpu.c b/usr.bin/systat/cpu.c index 716f1478019..5d10bf8e50c 100644 --- a/usr.bin/systat/cpu.c +++ b/usr.bin/systat/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.1 2013/09/07 11:43:49 reyk Exp $ */ +/* $OpenBSD: cpu.c,v 1.2 2013/09/11 07:01:03 mpi Exp $ */ /* * Copyright (c) 2013 Reyk Floeter <reyk@openbsd.org> @@ -82,7 +82,7 @@ field_def fields_cpu[] = { /* Define views */ field_def *view_cpu_0[] = { FLD_CPU_CPU, - FLD_CPU_INT, FLD_CPU_SYS, FLD_CPU_USR, FLD_CPU_NIC, FLD_CPU_IDLE + FLD_CPU_INT, FLD_CPU_SYS, FLD_CPU_USR, FLD_CPU_NIC, FLD_CPU_IDLE, NULL }; /* Define view managers */ |