Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/raidctl &stars[offset] -> stars+offset. It's shorter!
details: https://anonhg.NetBSD.org/src/rev/a2d2cd53834b
branches: trunk
changeset: 339077:a2d2cd53834b
user: pooka <pooka%NetBSD.org@localhost>
date: Fri Jun 26 01:16:54 2015 +0000
description:
&stars[offset] -> stars+offset. It's shorter!
Coincidentally, the change also works around a gcc 5.1 bug which causes
a segmentation fault when trying to compile the longer version (guess
the compiler got exhausted, or something).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66345
diffstat:
sbin/raidctl/raidctl.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r dcba829232a5 -r a2d2cd53834b sbin/raidctl/raidctl.c
--- a/sbin/raidctl/raidctl.c Fri Jun 26 00:50:39 2015 +0000
+++ b/sbin/raidctl/raidctl.c Fri Jun 26 01:16:54 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: raidctl.c,v 1.59 2015/05/27 17:55:23 christos Exp $ */
+/* $NetBSD: raidctl.c,v 1.60 2015/06/26 01:16:54 pooka Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: raidctl.c,v 1.59 2015/05/27 17:55:23 christos Exp $");
+__RCSID("$NetBSD: raidctl.c,v 1.60 2015/06/26 01:16:54 pooka Exp $");
#endif
@@ -1097,7 +1097,7 @@
(int)((percent * max_strlen)/ 100);
if (offset < 0)
offset = 0;
- snprintf(string,max_strlen,"%s",&stars[offset]);
+ snprintf(string,max_strlen,"%s",stars+offset);
}
static void
Home |
Main Index |
Thread Index |
Old Index