shithub: sox

Download patch

ref: 1ab655ae05210ce2681cf48a1d7265876b653440
parent: 45a11abfa1e178d12504e8868566811ce8bce76e
author: rrt <rrt>
date: Wed Dec 13 09:50:16 EST 2006

Simplify code.

--- a/src/libgsm/gsm_create.c
+++ b/src/libgsm/gsm_create.c
@@ -13,13 +13,10 @@
 
 gsm gsm_create ()
 {
-	gsm  r;
+	gsm = (gsm)calloc(sizeof(struct gsm_state));
 
-	r = (gsm)malloc(sizeof(struct gsm_state));
-	if (!r) return r;
-
-	memset((char *)r, 0, sizeof(*r));
-	r->nrp = 40;
+        if (r)
+          r->nrp = 40;
 
 	return r;
 }