summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-08-06 21:29:51 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-06 21:29:51 +0200
commit7389662dbf54463222d66e555368e0151098ab38 (patch)
tree5fc19580e96195ad23f1b9c15a11f8171ed28f68
parentb9be78070569e69960ba2b3c4098c3dc3316b9bd (diff)
svc: remove superfluout INIT_G()
function old new delta sv 1297 1296 -1 svc_main 162 145 -17 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--runit/sv.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/runit/sv.c b/runit/sv.c
index 630f1f37e..477c1ac6e 100644
--- a/runit/sv.c
+++ b/runit/sv.c
@@ -205,10 +205,8 @@ struct globals {
#define islog (G.islog )
#define INIT_G() do { \
setup_common_bufsiz(); \
- /* need to zero out, we are NOEXEC */ \
- rc = EXIT_SUCCESS; \
- islog = 0; \
- /* other fields need not be zero */ \
+ /* need to zero out, svc calls sv() repeatedly */ \
+ memset(&G, 0, sizeof(G)); \
} while (0)
@@ -707,8 +705,6 @@ int svc_main(int argc UNUSED_PARAM, char **argv)
const char *optstring;
unsigned opts;
- INIT_G();
-
optstring = "udopchaitkx";
opts = getopt32(argv, optstring);
argv += optind;