mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
sysupdate: fix return types according to style guide
This commit is contained in:
parent
21aa180b4a
commit
22b414f185
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user