]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: use 'signed int' instead of 'int' for bit field variables
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 27 Jun 2018 06:46:43 +0000 (15:46 +0900)
committerLennart Poettering <lennart@poettering.net>
Thu, 28 Jun 2018 08:16:51 +0000 (10:16 +0200)
Suggested by LGTM: https://lgtm.com/rules/1506024027114/

src/core/unit.h
src/libsystemd/sd-event/sd-event.c

index b3131eba1bf38c75bd1915aea5b233b6a58777c5..a9de983152f8a956b869adf8bbdec553022d5ca3 100644 (file)
@@ -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 {
index d53b9a70267a062108745a0c0af0c52f88184b96..0ccd3edcae5f2220cca496f72d638cee00a61b5e 100644 (file)
@@ -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;