mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-25 01:47:38 +00:00
Removed unused variable in release mode
This commit is contained in:
parent
b4fc26f5e8
commit
93c1bff53c
@ -514,7 +514,6 @@ void *xcalloc(size_t count, size_t bytes) {
|
|||||||
|
|
||||||
void *xrealloc(void *pointer, size_t bytes) {
|
void *xrealloc(void *pointer, size_t bytes) {
|
||||||
char *temp;
|
char *temp;
|
||||||
int old_size;
|
|
||||||
|
|
||||||
/* Align buffer on 4 byte boundery for HP UX and other 64 bit systems to prevent Bus error (core dump) */
|
/* Align buffer on 4 byte boundery for HP UX and other 64 bit systems to prevent Bus error (core dump) */
|
||||||
if (bytes & 3)
|
if (bytes & 3)
|
||||||
@ -526,8 +525,7 @@ void *xrealloc(void *pointer, size_t bytes) {
|
|||||||
/* check old magic number */
|
/* check old magic number */
|
||||||
temp = (char *)pointer;
|
temp = (char *)pointer;
|
||||||
assert(*((unsigned int *) (temp - 4)) == 0xdeadc0de);
|
assert(*((unsigned int *) (temp - 4)) == 0xdeadc0de);
|
||||||
old_size = *((unsigned int *) (temp - 8));
|
assert(*((unsigned int *) (temp + (*((unsigned int *) (temp - 8))))) == 0xdeadc0de);
|
||||||
assert(*((unsigned int *) (temp + old_size)) == 0xdeadc0de);
|
|
||||||
|
|
||||||
temp = (char *) realloc(temp - 8, bytes + 12);
|
temp = (char *) realloc(temp - 8, bytes + 12);
|
||||||
|
|
||||||
@ -544,7 +542,6 @@ void *xrealloc(void *pointer, size_t bytes) {
|
|||||||
|
|
||||||
void xfree(void *pointer) {
|
void xfree(void *pointer) {
|
||||||
char *temp;
|
char *temp;
|
||||||
int old_size;
|
|
||||||
|
|
||||||
if (!pointer)
|
if (!pointer)
|
||||||
return;
|
return;
|
||||||
@ -552,8 +549,7 @@ void xfree(void *pointer) {
|
|||||||
/* check for magic byte */
|
/* check for magic byte */
|
||||||
temp = (char *)pointer;
|
temp = (char *)pointer;
|
||||||
assert(*((unsigned int *) (temp - 4)) == 0xdeadc0de);
|
assert(*((unsigned int *) (temp - 4)) == 0xdeadc0de);
|
||||||
old_size = *((unsigned int *) (temp - 8));
|
assert(*((unsigned int *) (temp + (*((unsigned int *) (temp - 8))))) == 0xdeadc0de);
|
||||||
assert(*((unsigned int *) (temp + old_size)) == 0xdeadc0de);
|
|
||||||
|
|
||||||
free(temp - 8);
|
free(temp - 8);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user