diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2015-04-02 17:53:21 +0100 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2015-04-02 17:53:21 +0100 |
commit | 55488db3f978dce56ed45836bb72cba827e095b6 (patch) | |
tree | 4e30ae0aca4004b5ff032275bc5819c33573d1c2 /runtime/klee-libc/calloc.c | |
parent | 8d7627bc4a7f86c361a843f5c9f2e95eb1b2b848 (diff) | |
download | klee-55488db3f978dce56ed45836bb72cba827e095b6.tar.gz |
Use C instead of C++ comments in C files to silence compiler warnings.
Diffstat (limited to 'runtime/klee-libc/calloc.c')
-rw-r--r-- | runtime/klee-libc/calloc.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/runtime/klee-libc/calloc.c b/runtime/klee-libc/calloc.c index 30b88b30..1466fc07 100644 --- a/runtime/klee-libc/calloc.c +++ b/runtime/klee-libc/calloc.c @@ -1,16 +1,16 @@ -//===-- calloc.c ----------------------------------------------------------===// +/*===-- calloc.c ----------------------------------------------------------===// // // The KLEE Symbolic Virtual Machine // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // -//===----------------------------------------------------------------------===// +//===----------------------------------------------------------------------===*/ #include <stdlib.h> #include <string.h> -// DWD - I prefer to be internal +/* DWD - I prefer to be internal */ #if 0 void *calloc(size_t nmemb, size_t size) { unsigned nbytes = nmemb * size; @@ -19,7 +19,8 @@ void *calloc(size_t nmemb, size_t size) { memset(addr, 0, nbytes); return addr; } -// Always reallocate. + +/* Always reallocate. */ void *realloc(void *ptr, size_t nbytes) { if(!ptr) return malloc(nbytes); @@ -30,14 +31,14 @@ void *realloc(void *ptr, size_t nbytes) { } unsigned copy_nbytes = klee_get_obj_size(ptr); - //printf("REALLOC: current object = %d bytes!\n", copy_nbytes); + /* printf("REALLOC: current object = %d bytes!\n", copy_nbytes); */ void *addr = malloc(nbytes); if(addr) { - // shrinking + /* shrinking */ if(copy_nbytes > nbytes) copy_nbytes = nbytes; - //printf("REALLOC: copying = %d bytes!\n", copy_nbytes); + /* printf("REALLOC: copying = %d bytes!\n", copy_nbytes); */ memcpy(addr, ptr, copy_nbytes); free(ptr); } |