From 845d247a3dbca437fd8a118a118328acb322e2c1 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 27 Jun 2018 15:46:43 +0900 Subject: [PATCH] tree-wide: use 'signed int' instead of 'int' for bit field variables Suggested by LGTM: https://lgtm.com/rules/1506024027114/ --- src/core/unit.h | 2 +- src/libsystemd/sd-event/sd-event.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/unit.h b/src/core/unit.h index b3131eba1b..a9de983152 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -352,7 +352,7 @@ typedef struct Unit { /* When writing transient unit files, stores which section we stored last. If < 0, we didn't write any yet. If * == 0 we are in the [Unit] section, if > 0 we are in the unit type-specific section. */ - int last_section_private:2; + signed int last_section_private:2; } Unit; typedef struct UnitStatusMessageFormats { diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index d53b9a7026..0ccd3edcae 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -92,7 +92,7 @@ struct sd_event_source { char *description; EventSourceType type:5; - int enabled:3; + signed int enabled:3; bool pending:1; bool dispatching:1; bool floating:1;