File klibc-2.0.4-uname.patch of Package klibc

diff -Nurp klibc-2.0.4/usr/utils/uname.c klibc-2.0.4-uname/usr/utils/uname.c
--- klibc-2.0.4/usr/utils/uname.c	2014-07-26 03:15:07.000000000 +0300
+++ klibc-2.0.4-uname/usr/utils/uname.c	2014-09-22 05:49:26.523412842 +0300
@@ -51,18 +51,12 @@ static void usage(FILE *stream, const ch
 
 static char *make_hardware(const char *machine)
 {
-	char *hardware;
+	char *hardware = strdup(machine);
 
-	hardware = strdup(machine);
-	if (!hardware) {
+	if (!hardware)
 		fprintf(stderr, "strdup() failed: %s\n", strerror(errno));
-		goto end;
-	}
-	if (strlen(hardware) == 4
-	    && hardware[0] == 'i' && hardware[2] == '8' && hardware[3] == '6') {
+	else if (strlen(hardware) == 4 && hardware[0] == 'i' && hardware[2] == '8' && hardware[3] == '6')
 		hardware[1] = '3';
-	}
-end:
 	return hardware;
 }
 
@@ -136,15 +130,14 @@ int main(int argc, char *argv[])
 		}
 	}
 
-	for (nr_pr = 0, i = UN_SYSNAME; i < UN_NR_FIELDS; i++) {
-		if (!uname_fields[i])
-			continue;
-		if (nr_pr)
-			fputc(' ', stdout);
-		fputs(uname_fields[i], stdout);
-		nr_pr++;
-	}
-	fputc('\n', stdout);
+	for (nr_pr = 0, i = UN_SYSNAME; i < UN_NR_FIELDS; i++)
+		if (uname_fields[i]) {
+			if (nr_pr)
+				putchar(' ');
+			fputs(uname_fields[i], stdout);
+			nr_pr++;
+		}
+	putchar('\n');
 
 	ec = 0;
openSUSE Build Service is sponsored by