changeset 1257:60dc14a2e4c5

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 09 Mar 2015 18:46:12 +0200
parents d88d5f88b77a
children 13c274d22a29
files minijss/jloadjss.c minijss/jloadxm.c
diffstat 2 files changed, 7 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/minijss/jloadjss.c	Mon Mar 09 17:43:09 2015 +0200
+++ b/minijss/jloadjss.c	Mon Mar 09 18:46:12 2015 +0200
@@ -426,7 +426,7 @@
         if (jssP.nrows == 0 || jssP.nrows > jsetMaxRows)
             JSSERROR(DMERR_INVALID_DATA, DMERR_INVALID_DATA,
             "Invalid number of rows in pattern #%d: %d.\n",
-            index, jssP.nrows
+            index, jssP.nrows);
 
         // Allocate pattern
         pattern = module->patterns[index] = jssAllocatePattern(jssP.nrows, module->nchannels);
--- a/minijss/jloadxm.c	Mon Mar 09 17:43:09 2015 +0200
+++ b/minijss/jloadxm.c	Mon Mar 09 18:46:12 2015 +0200
@@ -752,11 +752,13 @@
     }
 
     // Allocate instrument
+    JSSDEBUG("Allocating extended instrument #%d [%d]\n",
+        neinst, module->nextInstruments);
+
     if ((einst = jssAllocateExtInstrument()) == NULL)
-    {
         JSSERROR(DMERR_MALLOC, DMERR_MALLOC,
-        "Could not allocate extended instrument structure #%d\n", neinst);
-    }
+        "Could not allocate extended instrument #%d.\n",
+        neinst);
 
     module->extInstruments[neinst] = einst;
 
@@ -887,11 +889,9 @@
     XMHeader xmH;
     int index, ret = DMERR_OK;
 
-    assert(pmodule != NULL);
-    assert(inFile != NULL);
     *pmodule = NULL;
 
-    // Try to get the XM-header
+    // Try to read the XM header
     if (!dmf_read_str(inFile, &xmH.idMagic, sizeof(xmH.idMagic)) ||
         !dmf_read_str(inFile, &xmH.songName, sizeof(xmH.songName)) ||
         !dmf_read_byte(inFile, &xmH.unUsed1A) ||
@@ -908,7 +908,6 @@
         !dmf_read_le16(inFile, &xmH.defTempo))
         return DMERR_FREAD;
 
-
     // Check the fields, none of these are considered fatal
     if (strncmp(xmH.idMagic, "Extended Module: ", 17) != 0)
     {
@@ -1073,6 +1072,5 @@
     }
 
 out:
-
     return ret;
 }