tree-wide: Various coding style cleanups
This commit is contained in:
committed by
DaanDeMeyer
parent
143c5c1ad7
commit
18842be4be
@@ -38,4 +38,4 @@ int fs_type_from_string(const char *name, const statfs_f_type_t **ret);
|
||||
bool fs_in_group(const struct statfs *s, enum FilesystemGroups fs_group);
|
||||
|
||||
/* gperf prototypes */
|
||||
const struct FilesystemMagic* filesystems_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
|
||||
const struct FilesystemMagic* filesystems_gperf_lookup(const char *str, GPERF_LEN_TYPE length);
|
||||
|
||||
@@ -1135,17 +1135,17 @@ bool oom_score_adjust_is_valid(int oa) {
|
||||
return oa >= OOM_SCORE_ADJ_MIN && oa <= OOM_SCORE_ADJ_MAX;
|
||||
}
|
||||
|
||||
unsigned long personality_from_string(const char *p) {
|
||||
unsigned long personality_from_string(const char *s) {
|
||||
Architecture architecture;
|
||||
|
||||
if (!p)
|
||||
if (!s)
|
||||
return PERSONALITY_INVALID;
|
||||
|
||||
/* Parse a personality specifier. We use our own identifiers that indicate specific ABIs, rather than just
|
||||
* hints regarding the register size, since we want to keep things open for multiple locally supported ABIs for
|
||||
* the same register size. */
|
||||
|
||||
architecture = architecture_from_string(p);
|
||||
architecture = architecture_from_string(s);
|
||||
if (architecture < 0)
|
||||
return PERSONALITY_INVALID;
|
||||
|
||||
@@ -1247,8 +1247,8 @@ bool nice_is_valid(int n) {
|
||||
return n >= PRIO_MIN && n < PRIO_MAX;
|
||||
}
|
||||
|
||||
bool sched_policy_is_valid(int i) {
|
||||
return IN_SET(i, SCHED_OTHER, SCHED_BATCH, SCHED_IDLE, SCHED_FIFO, SCHED_RR, SCHED_EXT);
|
||||
bool sched_policy_is_valid(int policy) {
|
||||
return IN_SET(policy, SCHED_OTHER, SCHED_BATCH, SCHED_IDLE, SCHED_FIFO, SCHED_RR, SCHED_EXT);
|
||||
}
|
||||
|
||||
bool sched_policy_supported(int policy) {
|
||||
|
||||
@@ -101,8 +101,8 @@ bool oom_score_adjust_is_valid(int oa);
|
||||
* personality we're interested in. */
|
||||
#define OPINIONATED_PERSONALITY_MASK 0xFFUL
|
||||
|
||||
unsigned long personality_from_string(const char *p);
|
||||
const char* personality_to_string(unsigned long);
|
||||
unsigned long personality_from_string(const char *s);
|
||||
const char* personality_to_string(unsigned long p);
|
||||
|
||||
int safe_personality(unsigned long p);
|
||||
int opinionated_personality(unsigned long *ret);
|
||||
@@ -124,10 +124,10 @@ int pid_compare_func(const pid_t *a, const pid_t *b);
|
||||
|
||||
bool nice_is_valid(int n) _const_;
|
||||
|
||||
bool sched_policy_is_valid(int i) _const_;
|
||||
bool sched_policy_supported(int i);
|
||||
int sched_get_priority_min_safe(int i);
|
||||
int sched_get_priority_max_safe(int i);
|
||||
bool sched_policy_is_valid(int policy) _const_;
|
||||
bool sched_policy_supported(int policy);
|
||||
int sched_get_priority_min_safe(int policy);
|
||||
int sched_get_priority_max_safe(int policy);
|
||||
|
||||
#define PID_AUTOMATIC ((pid_t) INT_MIN) /* special value indicating "acquire pid from connection peer" */
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ bool terminal_is_dumb(void);
|
||||
bool dev_console_colors_enabled(void);
|
||||
|
||||
int get_ctty_devnr(pid_t pid, dev_t *ret);
|
||||
int get_ctty(pid_t, dev_t *ret_devnr, char **ret);
|
||||
int get_ctty(pid_t pid, dev_t *ret_devnr, char **ret);
|
||||
|
||||
int getttyname_malloc(int fd, char **ret);
|
||||
int getttyname_harder(int fd, char **ret);
|
||||
|
||||
@@ -173,7 +173,7 @@ char* save_timezone(void);
|
||||
|
||||
bool clock_supported(clockid_t clock);
|
||||
|
||||
usec_t usec_shift_clock(usec_t, clockid_t from, clockid_t to);
|
||||
usec_t usec_shift_clock(usec_t x, clockid_t from, clockid_t to);
|
||||
|
||||
int get_timezone(char **ret);
|
||||
const char* etc_localtime(void);
|
||||
|
||||
@@ -398,7 +398,7 @@ assert_cc(sizeof(long long) == sizeof(intmax_t));
|
||||
#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
|
||||
|
||||
DISABLE_WARNING_REDUNDANT_DECLS;
|
||||
void free(void *p);
|
||||
void free(void *p); /* NOLINT (readability-redundant-declaration) */
|
||||
REENABLE_WARNING;
|
||||
|
||||
#define mfree(memory) \
|
||||
|
||||
@@ -682,7 +682,7 @@ static int acquire_home(
|
||||
|
||||
if (FLAGS_SET(flags, ACQUIRE_MUST_AUTHENTICATE))
|
||||
pam_syslog(pamh, LOG_ERR, "Failed to prompt for password/prompt.");
|
||||
else if (debug)
|
||||
else
|
||||
pam_debug_syslog(pamh, debug, "Failed to prompt for password/prompt.");
|
||||
|
||||
return home_not_active || home_locked ? PAM_PERM_DENIED : PAM_CONV_ERR;
|
||||
|
||||
@@ -45,11 +45,11 @@ typedef struct JournalImporter {
|
||||
#define JOURNAL_IMPORTER_INIT(_fd) { .fd = (_fd), .iovw = {} }
|
||||
#define JOURNAL_IMPORTER_MAKE(_fd) (JournalImporter) JOURNAL_IMPORTER_INIT(_fd)
|
||||
|
||||
void journal_importer_cleanup(JournalImporter *);
|
||||
int journal_importer_process_data(JournalImporter *);
|
||||
int journal_importer_push_data(JournalImporter *, const char *data, size_t size);
|
||||
void journal_importer_drop_iovw(JournalImporter *);
|
||||
bool journal_importer_eof(const JournalImporter *);
|
||||
void journal_importer_cleanup(JournalImporter *imp);
|
||||
int journal_importer_process_data(JournalImporter *imp);
|
||||
int journal_importer_push_data(JournalImporter *imp, const char *data, size_t size);
|
||||
void journal_importer_drop_iovw(JournalImporter *imp);
|
||||
bool journal_importer_eof(const JournalImporter *imp);
|
||||
|
||||
static inline size_t journal_importer_bytes_remaining(const JournalImporter *imp) {
|
||||
return imp->filled;
|
||||
|
||||
Reference in New Issue
Block a user