]> granicus.if.org Git - yasm/commitdiff
Splint cleanups on memory allocation routines.
authorPeter Johnson <peter@tortall.net>
Mon, 22 Apr 2002 01:37:54 +0000 (01:37 -0000)
committerPeter Johnson <peter@tortall.net>
Mon, 22 Apr 2002 01:37:54 +0000 (01:37 -0000)
svn path=/trunk/yasm/; revision=593

libyasm/util.h
src/util.h
util.h

index 3ec1970c46eba3d97231e2ef2a818448f4163988..a4fc61e74fcb2bd5e4e8f97299033a49fddf88b7 100644 (file)
@@ -129,9 +129,10 @@ int strncasecmp(const char *s1, const char *s2, size_t n);
 
 /* Error-checking memory allocation routines in xmalloc.c. */
 /*@only@*/ /*@out@*/ void *xmalloc(size_t size);
-/*@only@*/ /*@out@*/ void *xcalloc(size_t nelem, size_t elsize);
-/*@out@*/ void *xrealloc(/*@returned@*/ /*@null@*/ void *oldmem, size_t size);
-void xfree(/*@only@*/ /*@out@*/ /*@null@*/ void *p);
+/*@only@*/ void *xcalloc(size_t nelem, size_t elsize);
+/*@only@*/ void *xrealloc(/*@only@*/ /*@out@*/ /*@returned@*/ /*@null@*/
+                         void *oldmem, size_t size) /*@modifies oldmem@*/;
+void xfree(/*@only@*/ /*@out@*/ /*@null@*/ void *p) /*@modifies p@*/;
 #endif
 
 /* Bit-counting: used primarily by HAMT but also in a few other places. */
index 3ec1970c46eba3d97231e2ef2a818448f4163988..a4fc61e74fcb2bd5e4e8f97299033a49fddf88b7 100644 (file)
@@ -129,9 +129,10 @@ int strncasecmp(const char *s1, const char *s2, size_t n);
 
 /* Error-checking memory allocation routines in xmalloc.c. */
 /*@only@*/ /*@out@*/ void *xmalloc(size_t size);
-/*@only@*/ /*@out@*/ void *xcalloc(size_t nelem, size_t elsize);
-/*@out@*/ void *xrealloc(/*@returned@*/ /*@null@*/ void *oldmem, size_t size);
-void xfree(/*@only@*/ /*@out@*/ /*@null@*/ void *p);
+/*@only@*/ void *xcalloc(size_t nelem, size_t elsize);
+/*@only@*/ void *xrealloc(/*@only@*/ /*@out@*/ /*@returned@*/ /*@null@*/
+                         void *oldmem, size_t size) /*@modifies oldmem@*/;
+void xfree(/*@only@*/ /*@out@*/ /*@null@*/ void *p) /*@modifies p@*/;
 #endif
 
 /* Bit-counting: used primarily by HAMT but also in a few other places. */
diff --git a/util.h b/util.h
index 3ec1970c46eba3d97231e2ef2a818448f4163988..a4fc61e74fcb2bd5e4e8f97299033a49fddf88b7 100644 (file)
--- a/util.h
+++ b/util.h
@@ -129,9 +129,10 @@ int strncasecmp(const char *s1, const char *s2, size_t n);
 
 /* Error-checking memory allocation routines in xmalloc.c. */
 /*@only@*/ /*@out@*/ void *xmalloc(size_t size);
-/*@only@*/ /*@out@*/ void *xcalloc(size_t nelem, size_t elsize);
-/*@out@*/ void *xrealloc(/*@returned@*/ /*@null@*/ void *oldmem, size_t size);
-void xfree(/*@only@*/ /*@out@*/ /*@null@*/ void *p);
+/*@only@*/ void *xcalloc(size_t nelem, size_t elsize);
+/*@only@*/ void *xrealloc(/*@only@*/ /*@out@*/ /*@returned@*/ /*@null@*/
+                         void *oldmem, size_t size) /*@modifies oldmem@*/;
+void xfree(/*@only@*/ /*@out@*/ /*@null@*/ void *p) /*@modifies p@*/;
 #endif
 
 /* Bit-counting: used primarily by HAMT but also in a few other places. */