diff options
author | Abderrahim Kitouni <abderrahim.kitouni@codethink.co.uk> | 2024-07-14 10:29:34 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-07-15 10:18:41 +0200 |
commit | 22b414f185827e905c81949ae8a30a7d8d3ae17c (patch) | |
tree | 6a88b2c127d9480a272a2c59589aa454916979ef /src/sysupdate | |
parent | fstab-generator: add x-systemd.wants (diff) | |
download | systemd-22b414f185827e905c81949ae8a30a7d8d3ae17c.tar.xz systemd-22b414f185827e905c81949ae8a30a7d8d3ae17c.zip |
sysupdate: fix return types according to style guide
Diffstat (limited to 'src/sysupdate')
-rw-r--r-- | src/sysupdate/sysupdate-transfer.c | 4 | ||||
-rw-r--r-- | src/sysupdate/sysupdate-transfer.h | 4 | ||||
-rw-r--r-- | src/sysupdate/sysupdate-update-set-flags.c | 6 | ||||
-rw-r--r-- | src/sysupdate/sysupdate-update-set-flags.h | 6 | ||||
-rw-r--r-- | src/sysupdate/sysupdate-update-set.c | 2 | ||||
-rw-r--r-- | src/sysupdate/sysupdate-update-set.h | 2 | ||||
-rw-r--r-- | src/sysupdate/sysupdate.c | 6 |
7 files changed, 15 insertions, 15 deletions
diff --git a/src/sysupdate/sysupdate-transfer.c b/src/sysupdate/sysupdate-transfer.c index b1b3c662f6..69bba00cab 100644 --- a/src/sysupdate/sysupdate-transfer.c +++ b/src/sysupdate/sysupdate-transfer.c @@ -38,7 +38,7 @@ /* Default value for InstancesMax= for fs object targets */ #define DEFAULT_FILE_INSTANCES_MAX 3 -Transfer *transfer_free(Transfer *t) { +Transfer* transfer_free(Transfer *t) { if (!t) return NULL; @@ -61,7 +61,7 @@ Transfer *transfer_free(Transfer *t) { return mfree(t); } -Transfer *transfer_new(Context *ctx) { +Transfer* transfer_new(Context *ctx) { Transfer *t; t = new(Transfer, 1); diff --git a/src/sysupdate/sysupdate-transfer.h b/src/sysupdate/sysupdate-transfer.h index c28b68cc92..497cdccd7c 100644 --- a/src/sysupdate/sysupdate-transfer.h +++ b/src/sysupdate/sysupdate-transfer.h @@ -54,9 +54,9 @@ struct Transfer { typedef int (*TransferProgress)(const Transfer *t, const Instance *inst, unsigned percentage); -Transfer *transfer_new(Context *ctx); +Transfer* transfer_new(Context *ctx); -Transfer *transfer_free(Transfer *t); +Transfer* transfer_free(Transfer *t); DEFINE_TRIVIAL_CLEANUP_FUNC(Transfer*, transfer_free); int transfer_read_definition(Transfer *t, const char *path); diff --git a/src/sysupdate/sysupdate-update-set-flags.c b/src/sysupdate/sysupdate-update-set-flags.c index 1aade456db..66b3d340bb 100644 --- a/src/sysupdate/sysupdate-update-set-flags.c +++ b/src/sysupdate/sysupdate-update-set-flags.c @@ -4,7 +4,7 @@ #include "sysupdate-update-set-flags.h" #include "terminal-util.h" -const char *update_set_flags_to_color(UpdateSetFlags flags) { +const char* update_set_flags_to_color(UpdateSetFlags flags) { if (flags == 0 || (flags & UPDATE_OBSOLETE)) return (flags & UPDATE_NEWEST) ? ansi_highlight_grey() : ansi_grey(); @@ -21,7 +21,7 @@ const char *update_set_flags_to_color(UpdateSetFlags flags) { return NULL; } -const char *update_set_flags_to_glyph(UpdateSetFlags flags) { +const char* update_set_flags_to_glyph(UpdateSetFlags flags) { if (flags == 0 || (flags & UPDATE_OBSOLETE)) return special_glyph(SPECIAL_GLYPH_MULTIPLICATION_SIGN); @@ -38,7 +38,7 @@ const char *update_set_flags_to_glyph(UpdateSetFlags flags) { return " "; } -const char *update_set_flags_to_string(UpdateSetFlags flags) { +const char* update_set_flags_to_string(UpdateSetFlags flags) { switch ((unsigned) flags) { diff --git a/src/sysupdate/sysupdate-update-set-flags.h b/src/sysupdate/sysupdate-update-set-flags.h index 6f954d7c22..49ac5e1835 100644 --- a/src/sysupdate/sysupdate-update-set-flags.h +++ b/src/sysupdate/sysupdate-update-set-flags.h @@ -9,6 +9,6 @@ typedef enum UpdateSetFlags { UPDATE_PROTECTED = 1 << 4, } UpdateSetFlags; -const char *update_set_flags_to_color(UpdateSetFlags flags); -const char *update_set_flags_to_glyph(UpdateSetFlags flags); -const char *update_set_flags_to_string(UpdateSetFlags flags); +const char* update_set_flags_to_color(UpdateSetFlags flags); +const char* update_set_flags_to_glyph(UpdateSetFlags flags); +const char* update_set_flags_to_string(UpdateSetFlags flags); diff --git a/src/sysupdate/sysupdate-update-set.c b/src/sysupdate/sysupdate-update-set.c index 5682102d61..53bcc5d965 100644 --- a/src/sysupdate/sysupdate-update-set.c +++ b/src/sysupdate/sysupdate-update-set.c @@ -4,7 +4,7 @@ #include "string-util.h" #include "sysupdate-update-set.h" -UpdateSet *update_set_free(UpdateSet *us) { +UpdateSet* update_set_free(UpdateSet *us) { if (!us) return NULL; diff --git a/src/sysupdate/sysupdate-update-set.h b/src/sysupdate/sysupdate-update-set.h index 0b9bbfbe67..ed01202581 100644 --- a/src/sysupdate/sysupdate-update-set.h +++ b/src/sysupdate/sysupdate-update-set.h @@ -17,5 +17,5 @@ struct UpdateSet { size_t n_instances; }; -UpdateSet *update_set_free(UpdateSet *us); +UpdateSet* update_set_free(UpdateSet *us); int update_set_cmp(UpdateSet *const*a, UpdateSet *const*b); diff --git a/src/sysupdate/sysupdate.c b/src/sysupdate/sysupdate.c index fcf8c10080..3fcb2839d0 100644 --- a/src/sysupdate/sysupdate.c +++ b/src/sysupdate/sysupdate.c @@ -67,7 +67,7 @@ typedef struct Context { Hashmap *web_cache; /* Cache for downloaded resources, keyed by URL */ } Context; -static Context *context_free(Context *c) { +static Context* context_free(Context *c) { if (!c) return NULL; @@ -86,7 +86,7 @@ static Context *context_free(Context *c) { DEFINE_TRIVIAL_CLEANUP_FUNC(Context*, context_free); -static Context *context_new(void) { +static Context* context_new(void) { /* For now, no fields to initialize non-zero */ return new0(Context, 1); } @@ -411,7 +411,7 @@ static int context_show_table(Context *c) { return table_print_with_pager(t, arg_json_format_flags, arg_pager_flags, arg_legend); } -static UpdateSet *context_update_set_by_version(Context *c, const char *version) { +static UpdateSet* context_update_set_by_version(Context *c, const char *version) { assert(c); assert(version); |