diff options
author | Maho Nakata <maho@FreeBSD.org> | 2016-04-18 11:28:17 +0000 |
---|---|---|
committer | Maho Nakata <maho@FreeBSD.org> | 2016-04-18 11:28:17 +0000 |
commit | f18cdd2f47e0ad8e2efa6320e4d798dca685c435 (patch) | |
tree | e4d96abb7da8fa9289f63ac31db0946d39c9c989 /math/spooles/files/patch-Utilities+MM.h | |
parent | Update to version 2.10 (diff) |
Cosmetic updates
- Clean up a malloc() call to get rid of some warnings.
- Pet portlint by using "makepatch" for the patches, added the license,
changed a tab after the WWW line.
PR: 208295
Submitted by: pfg@
Diffstat (limited to 'math/spooles/files/patch-Utilities+MM.h')
-rw-r--r-- | math/spooles/files/patch-Utilities+MM.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/math/spooles/files/patch-Utilities+MM.h b/math/spooles/files/patch-Utilities+MM.h new file mode 100644 index 000000000000..68989c02135b --- /dev/null +++ b/math/spooles/files/patch-Utilities+MM.h @@ -0,0 +1,28 @@ +--- Utilities/MM.h.orig 1998-05-30 22:45:00 UTC ++++ Utilities/MM.h +@@ -30,21 +30,21 @@ + */ + #define ALLOCATE(ptr, type, count) \ + if ( (count) > 0 ) { \ +- if ( (ptr = (type *)malloc((unsigned long)((count)*sizeof(type)))) \ ++ if ( (ptr = malloc((unsigned long)(count)*sizeof(type))) \ + == NULL ) {\ + fprintf(stderr, \ +- "\n ALLOCATE failure : bytes %d, line %d, file %s", \ ++ "\n ALLOCATE failure : bytes %lu, line %d, file %s", \ + (count)*sizeof(type), __LINE__, __FILE__) ; \ + exit(-1) ; } \ + else if ( MEMORY_DEBUG > 0 ) { \ + fprintf(stderr, \ +- "\n ALLOCATE : address %p, bytes %d, line %d, file %s", \ ++ "\n ALLOCATE : address %p, bytes %lu, line %d, file %s", \ + ptr, (count)*sizeof(type), __LINE__, __FILE__) ; } } \ + else if ( (count) == 0 ) { \ + ptr = NULL ; } \ + else { \ + fprintf(stderr, \ +- "\n ALLOCATE error : bytes %d, line %d, file %s", \ ++ "\n ALLOCATE error : bytes %lu, line %d, file %s", \ + (count)*sizeof(type), __LINE__, __FILE__) ; \ + exit(-1) ; } + /* |