Module Name:    src
Committed By:   pooka
Date:           Fri Jun 26 01:16:54 UTC 2015

Modified Files:
        src/sbin/raidctl: raidctl.c

Log Message:
&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


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sbin/raidctl/raidctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/raidctl/raidctl.c
diff -u src/sbin/raidctl/raidctl.c:1.59 src/sbin/raidctl/raidctl.c:1.60
--- src/sbin/raidctl/raidctl.c:1.59	Wed May 27 17:55:23 2015
+++ src/sbin/raidctl/raidctl.c	Fri Jun 26 01:16:54 2015
@@ -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 @@ get_bar(char *string, double percent, in
 		(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

Reply via email to