static int
syscall_cmp(void *a, void *b)
{
- return strcmp(sysent[*((int *) a)].sys_name,
- sysent[*((int *) b)].sys_name);
+ const char *a_name = sysent[*((int *) a)].sys_name;
+ const char *b_name = sysent[*((int *) b)].sys_name;
+ return strcmp(a_name ? a_name : "", b_name ? b_name : "");
}
static int
else if (strcmp(sortby, "nothing") == 0)
sortfun = NULL;
else {
- error_msg_and_die("invalid sortby: '%s'", sortby);
+ error_msg_and_help("invalid sortby: '%s'", sortby);
}
}