tree-wide: move unsigned to the start of type declaration
Even though ISO C11 doesn't mandate in which order the type specifiers should appear, having `unsigned` at the beginning of each type declaration feels more natural and, more importantly, it unbreaks Coccinelle, which has a hard time parsing `long unsigned` and others: ``` init_defs_builtins: /usr/lib64/coccinelle/standard.h init_defs: /home/mrc0mmand/repos/systemd/coccinelle/macros.h HANDLING: src/shared/mount-util.c : 1: strange type1, maybe because of weird order: long unsigned ``` Most of the codebase already "complies", so let's fix the remaining "offenders".
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
4ba5594390
commit
da185cd04d
@@ -592,9 +592,9 @@ int mode_to_inaccessible_node(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mount_flags_to_string(long unsigned flags, char **ret) {
|
||||
int mount_flags_to_string(unsigned long flags, char **ret) {
|
||||
static const struct {
|
||||
long unsigned flag;
|
||||
unsigned long flag;
|
||||
const char *name;
|
||||
} map[] = {
|
||||
{ .flag = MS_RDONLY, .name = "MS_RDONLY", },
|
||||
|
||||
@@ -94,7 +94,7 @@ int mount_option_mangle(
|
||||
char **ret_remaining_options);
|
||||
|
||||
int mode_to_inaccessible_node(const char *runtime_dir, mode_t mode, char **dest);
|
||||
int mount_flags_to_string(long unsigned flags, char **ret);
|
||||
int mount_flags_to_string(unsigned long flags, char **ret);
|
||||
|
||||
/* Useful for usage with _cleanup_(), unmounts, removes a directory and frees the pointer */
|
||||
static inline char* umount_and_rmdir_and_free(char *p) {
|
||||
|
||||
Reference in New Issue
Block a user