From 3da7a50f847ce5ea6094927cb51bab7eb1818efd Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Tue, 20 Jan 2015 23:09:58 -0500 Subject: 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. --- src/shared/util.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/shared/util.h') 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 #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 -- cgit v1.2.3-54-g00ecf