# HG changeset patch # User Matti Hamalainen # Date 1425660313 -7200 # Node ID 2be42ba9fc394cf09534e62ae743b059265c8a82 # Parent e8c99da451cd9efdfb40c5b3665fa4d3579db5d4 Cosmetics. diff -r e8c99da451cd -r 2be42ba9fc39 minijss/jloadjss.c --- 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; diff -r e8c99da451cd -r 2be42ba9fc39 minijss/jloadxm.c --- 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