changeset 1194:1f2cfa0119aa

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 05 Mar 2015 15:58:12 +0200
parents b52905e2788e
children 4d27c4ec8d4d
files tools/xm2jss.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tools/xm2jss.c	Thu Mar 05 15:48:33 2015 +0200
+++ b/tools/xm2jss.c	Thu Mar 05 15:58:12 2015 +0200
@@ -195,7 +195,8 @@
     Uint8 tmp;
     if (note->note == jsetNotSet)
         tmp = 0;
-    else if (note->note == jsetNoteOff)
+    else
+    if (note->note == jsetNoteOff)
         tmp = 127;
     else
         tmp = note->note + 1;
@@ -364,12 +365,15 @@
     JSFOREACHNOTE1;
     if (note->note == jsetNotSet)
         tmp = 0;
-    else if (note->note == jsetNoteOff)
+    else
+    if (note->note == jsetNoteOff)
         tmp = 127;
     else
         tmp = note->note + 1;
+
     if (tmp > 0x7f)
         JSSERROR(DMERR_BOUNDS, DMERR_BOUNDS, "Note value out of bounds %d > 0x7f.\n", tmp);
+
     JSPUTBYTE(tmp);
     JSFOREACHNOTE2;
     
@@ -428,7 +432,7 @@
     if (m == NULL)
         JSSERROR(DMERR_NULLPTR, DMERR_NULLPTR, "Module pointer was NULL\n");
 
-    if ((m->nchannels < 1) || (m->npatterns < 1) || (m->norders < 1))
+    if (m->nchannels < 1 || m->npatterns < 1 || m->norders < 1)
         JSSERROR(DMERR_BOUNDS, DMERR_BOUNDS,
         "Module had invalid values (nchannels=%i, npatterns=%i, norders=%i)\n",
         m->nchannels, m->npatterns, m->norders);