#define CMP_NS(NAME, ID) \
static int sr_ ## NAME (const proc_t* P, const proc_t* Q) { \
- if (P->ns[ID] < Q->ns[ID]) return -1; \
- if (P->ns[ID] > Q->ns[ID]) return 1; \
+ if ((unsigned long)P->ns[ID] < (unsigned long)Q->ns[ID]) return -1; \
+ if ((unsigned long)P->ns[ID] > (unsigned long)Q->ns[ID]) return 1; \
return 0; \
}
#define _pr_ns(NAME, ID)\
static int pr_##NAME(char *restrict const outbuf, const proc_t *restrict const pp) {\
if (pp->ns[ID])\
- return snprintf(outbuf, COLWID, "%li", pp->ns[ID]);\
+ return snprintf(outbuf, COLWID, "%lu", (unsigned long)pp->ns[ID]);\
else\
return snprintf(outbuf, COLWID, "-");\
}