projects
/
YACASL2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
異常終了時の返り値を0から1へ変更
[YACASL2.git]
/
src
/
cmem.c
diff --git
a/src/cmem.c
b/src/cmem.c
index
73ab512
..
b5f9033
100644
(file)
--- a/
src/cmem.c
+++ b/
src/cmem.c
@@
-15,7
+15,7
@@
void *malloc_chk(size_t size, char *tag)
if((p = malloc(size)) == NULL) {
fprintf(stderr, "%s: cannot allocate memory\n", tag);
if((p = malloc(size)) == NULL) {
fprintf(stderr, "%s: cannot allocate memory\n", tag);
- exit(
-
1);
+ exit(1);
}
return memset(p, 0, size);
}
}
return memset(p, 0, size);
}
@@
-30,7
+30,7
@@
void *calloc_chk(size_t nmemb, size_t size, char *tag)
if((p = calloc(nmemb, size)) == NULL) {
fprintf(stderr, "%s: cannot allocate memory\n", tag);
if((p = calloc(nmemb, size)) == NULL) {
fprintf(stderr, "%s: cannot allocate memory\n", tag);
- exit(
-
1);
+ exit(1);
}
return p;
}
}
return p;
}