&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
This commit is contained in:
parent
1ca558252d
commit
8da4f44455
@ -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.
|
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||||
@ -39,7 +39,7 @@
|
|||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
#ifndef lint
|
#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
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -1097,7 +1097,7 @@ get_bar(char *string, double percent, int max_strlen)
|
|||||||
(int)((percent * max_strlen)/ 100);
|
(int)((percent * max_strlen)/ 100);
|
||||||
if (offset < 0)
|
if (offset < 0)
|
||||||
offset = 0;
|
offset = 0;
|
||||||
snprintf(string,max_strlen,"%s",&stars[offset]);
|
snprintf(string,max_strlen,"%s",stars+offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user