sv,svc: fix NOEXEC fallout

function                                             old     new   delta
svc_main                                             145     162     +17
sv                                                  1280    1297     +17
status                                               139     133      -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 34/-6)              Total: 28 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2017-08-06 21:23:03 +02:00
parent 184c738582
commit b9be780705
7 changed files with 18 additions and 18 deletions

View file

@ -193,7 +193,7 @@ struct globals {
/* "Bernstein" time format: unix + 0x400000000000000aULL */
uint64_t tstart, tnow;
svstatus_t svstatus;
unsigned islog;
smallint islog;
} FIX_ALIASING;
#define G (*(struct globals*)bb_common_bufsiz1)
#define acts (G.acts )
@ -203,7 +203,13 @@ struct globals {
#define tnow (G.tnow )
#define svstatus (G.svstatus )
#define islog (G.islog )
#define INIT_G() do { setup_common_bufsiz(); } while (0)
#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 */ \
} while (0)
#define str_equal(s,t) (strcmp((s), (t)) == 0)