[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] baroque code in gzsig, rogue



Index: games/rogue/machdep.c
===================================================================
RCS file: /cvs/src/games/rogue/machdep.c,v
retrieving revision 1.11
diff -u -p -r1.11 machdep.c
--- games/rogue/machdep.c	2006/03/08 09:44:35	1.11
+++ games/rogue/machdep.c	2006/04/02 23:58:26
@@ -313,11 +313,7 @@ md_sleep(int nsecs)
 char *
 md_getenv(const char *name)
 {
-	char *value;
-
-	value = getenv(name);
-
-	return(value);
+	return getenv(name);
 }
 
 /* md_malloc()
@@ -331,10 +327,7 @@ md_getenv(const char *name)
 char *
 md_malloc(int n)
 {
-	char *t;
-
-	t = malloc(n);
-	return(t);
+	return malloc(n);
 }
 
 /* md_gseed() (Get Seed)
Index: usr.bin/gzsig/key.c
===================================================================
RCS file: /cvs/src/usr.bin/gzsig/key.c,v
retrieving revision 1.4
diff -u -p -r1.4 key.c
--- usr.bin/gzsig/key.c	2006/04/01 19:57:32	1.4
+++ usr.bin/gzsig/key.c	2006/04/03 00:01:43
@@ -101,12 +101,7 @@ load_file(struct iovec *iov, char *filen
 struct key *
 key_new(void)
 {
-	struct key *k;
-
-	if ((k = calloc(sizeof(*k), 1)) == NULL)
-		return (NULL);
-
-	return (k);
+	return calloc(1, sizeof(struct key));
 }
 
 int



Visit your host, monkey.org