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:
Frantisek Sumsal
2022-02-10 21:00:22 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent 4ba5594390
commit da185cd04d
8 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -645,7 +645,7 @@ int get_process_environ(pid_t pid, char **ret) {
int get_process_ppid(pid_t pid, pid_t *ret) {
_cleanup_free_ char *line = NULL;
long unsigned ppid;
unsigned long ppid;
const char *p;
int r;
@@ -688,7 +688,7 @@ int get_process_ppid(pid_t pid, pid_t *ret) {
if (ppid == 0)
return -EADDRNOTAVAIL;
if ((pid_t) ppid < 0 || (long unsigned) (pid_t) ppid != ppid)
if ((pid_t) ppid < 0 || (unsigned long) (pid_t) ppid != ppid)
return -ERANGE;
if (ret)