home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Server: Improve comment description on dijkstra_map().
[plomrogue]
/
src
/
common
/
try_malloc.c
diff --git
a/src/common/try_malloc.c
b/src/common/try_malloc.c
index 70392be27618c8c3a0dba5c4cc40dd4118702721..81e75bf6bda6aa3f0ed5a86205f1b1dc93be6a9d 100644
(file)
--- a/
src/common/try_malloc.c
+++ b/
src/common/try_malloc.c
@@
-9,14
+9,14
@@
-extern void * try_malloc(size_t size, char * f)
+extern void * try_malloc(size_t size, c
onst c
har * f)
{
{
- char * prefix = "Trouble with malloc
()
in ";
+ char * prefix = "Trouble with malloc in ";
char * msg = malloc(strlen(prefix) + strlen(f) + 1 + 1);
exit_err(NULL == msg,
char * msg = malloc(strlen(prefix) + strlen(f) + 1 + 1);
exit_err(NULL == msg,
- "Trouble in try_malloc
() with malloc()
for error message string.");
+ "Trouble in try_malloc
with malloc
for error message string.");
int test = sprintf(msg, "%s%s.", prefix, f);
int test = sprintf(msg, "%s%s.", prefix, f);
- exit_err(test < 0, "Trouble in try_malloc
() with sprintf()
.");
+ exit_err(test < 0, "Trouble in try_malloc
with sprintf
.");
void * p = malloc(size);
exit_err(NULL == p, msg); /* Bypass exit_trouble() calling try_malloc(). */
free(msg);
void * p = malloc(size);
exit_err(NULL == p, msg); /* Bypass exit_trouble() calling try_malloc(). */
free(msg);