shithub: sf2mid

Download patch

ref: e2d15ab5abfc62f4482136abdb0cca4a9764dc94
parent: f1d9f73efeabbe6629d0d0e0eebdf19a0ec90b86
author: Bernhard Schelling <14200249+schellingb@users.noreply.github.com>
date: Sun Nov 14 20:42:54 EST 2021

Fix C89 compatibility

--- a/tsf.h
+++ b/tsf.h
@@ -1287,11 +1287,8 @@
 
 TSFDEF tsf* tsf_copy(tsf* f)
 {
-	if (!f)
-		return TSF_NULL;
-
-	tsf* res = TSF_NULL;
-
+	struct tsf* res;
+	if (!f) return TSF_NULL;
 	res = (tsf*)TSF_MALLOC(sizeof(tsf));
 	memcpy(res, f, sizeof(tsf));
 	res->voices = TSF_NULL;
@@ -1300,7 +1297,6 @@
 	res->outputSamples = TSF_NULL;
 	res->outputSampleSize = 0;
 	++(*res->refCount);
-
 	return res;
 }