diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2018-06-27 19:38:35 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2018-06-27 19:38:35 +0000 |
commit | 593340c9442f41038b29c480f40b3a0f71d929ff (patch) | |
tree | 461d8d99d99a46dd9aeccbf4f1cb8bdb8614bb48 /lib/util/mallocvar.h | |
parent | 78a9fb3ee4c126b8d5c0834d41a7f8d430c4298c (diff) | |
download | netpbm-mirror-593340c9442f41038b29c480f40b3a0f71d929ff.tar.gz netpbm-mirror-593340c9442f41038b29c480f40b3a0f71d929ff.tar.xz netpbm-mirror-593340c9442f41038b29c480f40b3a0f71d929ff.zip |
whitespace
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3271 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/util/mallocvar.h')
-rw-r--r-- | lib/util/mallocvar.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/util/mallocvar.h b/lib/util/mallocvar.h index e92e3fe4..00ba6484 100644 --- a/lib/util/mallocvar.h +++ b/lib/util/mallocvar.h @@ -1,5 +1,5 @@ /* These are some dynamic memory allocation facilities. They are essentially - an extension to C, as they do allocations with a cognizance of C + an extension to C, as they do allocations with a cognizance of C variables. You can use them to make C read more like a high level language. @@ -23,7 +23,7 @@ extern "C" { #endif static __inline__ void -mallocProduct(void ** const resultP, +mallocProduct(void ** const resultP, unsigned int const factor1, unsigned int const factor2) { /*---------------------------------------------------------------------------- @@ -44,10 +44,10 @@ mallocProduct(void ** const resultP, if (factor1 == 0 || factor2 == 0) *resultP = malloc(1); else { - if (UINT_MAX / factor2 < factor1) + if (UINT_MAX / factor2 < factor1) *resultP = NULL; - else - *resultP = malloc(factor1 * factor2); + else + *resultP = malloc(factor1 * factor2); } } @@ -61,11 +61,11 @@ reallocProduct(void ** const blockP, void * const oldBlockP = *blockP; void * newBlockP; - - if (UINT_MAX / factor2 < factor1) + + if (UINT_MAX / factor2 < factor1) newBlockP = NULL; - else - newBlockP = realloc(oldBlockP, factor1 * factor2); + else + newBlockP = realloc(oldBlockP, factor1 * factor2); if (newBlockP) *blockP = newBlockP; |