changeset 1239:2be42ba9fc39

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 06 Mar 2015 18:45:13 +0200
parents e8c99da451cd
children 22c71fa5698e
files minijss/jloadjss.c minijss/jloadxm.c
diffstat 2 files changed, 4 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/minijss/jloadjss.c	Fri Mar 06 18:14:03 2015 +0200
+++ b/minijss/jloadjss.c	Fri Mar 06 18:45:13 2015 +0200
@@ -340,13 +340,11 @@
     }
 
     // Allocate the module
-    module = jssAllocateModule();
-    if (module == NULL)
+    if ((*ppModule = module = jssAllocateModule()) == NULL)
     {
         JSSERROR(DMERR_MALLOC, DMERR_MALLOC,
         "Could not allocate memory for module structure.\n");
     }
-    *ppModule = module;
 
     // Copy header information
     module->defFlags        = jssH.defFlags;
--- a/minijss/jloadxm.c	Fri Mar 06 18:14:03 2015 +0200
+++ b/minijss/jloadxm.c	Fri Mar 06 18:45:13 2015 +0200
@@ -1009,18 +1009,14 @@
     if (probe)
         return DMERR_OK;
 
-    /* Okay, allocate a module structure
-     */
-    module = jssAllocateModule();
-    if (module == NULL)
+    // Okay, allocate a module structure
+    if ((*ppModule = module = jssAllocateModule()) == NULL)
     {
         JSSERROR(DMERR_MALLOC, DMERR_MALLOC,
         "Could not allocate memory for module structure.\n");
     }
-    *ppModule = module;
 
-
-    // Convert and check the header data
+    // Convert the module header data
     module->moduleType      = jmdtXM;
     module->intVersion      = xmH.version;
 #ifndef JSS_LIGHT