summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2017-04-05 10:16:15 +0200
committerAndreas Schneider <asn@cryptomilk.org>2017-04-05 10:16:15 +0200
commit71ea4830f9f69af92a23d9bd256eb3870765f510 (patch)
tree4bd83e9412a88e85e5f035eec5dcf4f7bfff8d01
parentfcad5ab7232a1b556580459e4f46e653ccef969b (diff)
downloadcmocka-71ea4830f9f69af92a23d9bd256eb3870765f510.tar.gz
cmocka-71ea4830f9f69af92a23d9bd256eb3870765f510.tar.bz2
cmocka-71ea4830f9f69af92a23d9bd256eb3870765f510.zip
src: Do not use C++ keywords as local variables
-rw-r--r--src/cmocka.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmocka.c b/src/cmocka.c
index 6efb4ec..d455710 100644
--- a/src/cmocka.c
+++ b/src/cmocka.c
@@ -1912,7 +1912,7 @@ void *_test_realloc(void *ptr,
MallocBlockInfo *block_info;
char *block = ptr;
size_t block_size = size;
- void *new;
+ void *new_block;
if (ptr == NULL) {
return _test_malloc(size, file, line);
@@ -1926,8 +1926,8 @@ void *_test_realloc(void *ptr,
block_info = (MallocBlockInfo*)(block - (MALLOC_GUARD_SIZE +
sizeof(*block_info)));
- new = _test_malloc(size, file, line);
- if (new == NULL) {
+ new_block = _test_malloc(size, file, line);
+ if (new_block == NULL) {
return NULL;
}
@@ -1935,12 +1935,12 @@ void *_test_realloc(void *ptr,
block_size = block_info->size;
}
- memcpy(new, ptr, block_size);
+ memcpy(new_block, ptr, block_size);
/* Free previous memory */
_test_free(ptr, file, line);
- return new;
+ return new_block;
}
#define realloc test_realloc