diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-01-20 23:09:58 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-01-22 01:14:52 -0500 |
commit | 3da7a50f847ce5ea6094927cb51bab7eb1818efd (patch) | |
tree | d242d8aa5e6d175061a94d4fb60cc64e26546f6a /src/shared/util.h | |
parent | 1fa2f38f0f011010bf57522b42fcc168856a7003 (diff) |
shared/cgroup-show: simplify show_pid_array()
int[] should not be used as pid_t[], even if happens to be same thing.
Also deduplicating in a quadratic loop right before sorting is unnecessary.
Remove custom greedy_realloc implementation.
Diffstat (limited to 'src/shared/util.h')
-rw-r--r-- | src/shared/util.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shared/util.h b/src/shared/util.h index 179c9615f9..bfa56335cd 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -45,12 +45,13 @@ #include <sys/inotify.h> #if SIZEOF_PID_T == 4 -# define PID_FMT "%" PRIi32 +# define PID_PRI PRIi32 #elif SIZEOF_PID_T == 2 -# define PID_FMT "%" PRIi16 +# define PID_PRI PRIi16 #else # error Unknown pid_t size #endif +#define PID_FMT "%" PID_PRI #if SIZEOF_UID_T == 4 # define UID_FMT "%" PRIu32 |