Blame SOURCES/strace-rh1044044.patch

2f474b
diff -Nrup a/count.c b/count.c
2f474b
--- a/count.c	2012-04-27 17:38:24.000000000 -0600
2f474b
+++ b/count.c	2013-12-18 09:23:32.823289640 -0700
2f474b
@@ -100,6 +100,16 @@ time_cmp(void *a, void *b)
2f474b
 static int
2f474b
 syscall_cmp(void *a, void *b)
2f474b
 {
2f474b
+	const char *name_a = sysent[*((int *) a)].sys_name;
2f474b
+	const char *name_b = sysent[*((int *) b)].sys_name;
2f474b
+
2f474b
+	if (name_a == name_b)
2f474b
+		return 0;
2f474b
+	if (!name_a)
2f474b
+		return -1;
2f474b
+	if (!name_b)
2f474b
+		return 1;
2f474b
+
2f474b
 	return strcmp(sysent[*((int *) a)].sys_name,
2f474b
 		      sysent[*((int *) b)].sys_name);
2f474b
 }