projects
/
crypto.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
96a7718
)
Better error message.
author
Pekka Riikonen
<priikone@silcnet.org>
Fri, 13 Jul 2007 20:07:59 +0000
(20:07 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Fri, 13 Jul 2007 20:07:59 +0000
(20:07 +0000)
lib/silcutil/silcmemory.c
patch
|
blob
|
history
diff --git
a/lib/silcutil/silcmemory.c
b/lib/silcutil/silcmemory.c
index 62a861659071a3c4f1faf767530cd0adb98f081d..067cf1a38da069755112078a6d059a84287e876f 100644
(file)
--- a/
lib/silcutil/silcmemory.c
+++ b/
lib/silcutil/silcmemory.c
@@
-28,7
+28,7
@@
void *silc_malloc(size_t size)
{
void *addr;
if (silc_unlikely(size <= 0 || size >= SILC_MAX_ALLOC)) {
{
void *addr;
if (silc_unlikely(size <= 0 || size >= SILC_MAX_ALLOC)) {
- SILC_LOG_ERROR(("Invalid memory allocation
"
));
+ SILC_LOG_ERROR(("Invalid memory allocation
, allocation by %x", size
));
return NULL;
}
addr = malloc(size);
return NULL;
}
addr = malloc(size);
@@
-41,7
+41,7
@@
void *silc_calloc(size_t items, size_t size)
{
void *addr;
if (silc_unlikely(size * items <= 0 || size * items >= SILC_MAX_ALLOC)) {
{
void *addr;
if (silc_unlikely(size * items <= 0 || size * items >= SILC_MAX_ALLOC)) {
- SILC_LOG_ERROR(("Invalid memory allocation
"
));
+ SILC_LOG_ERROR(("Invalid memory allocation
, allocation by %x", size
));
return NULL;
}
addr = calloc(items, size);
return NULL;
}
addr = calloc(items, size);
@@
-54,7
+54,7
@@
void *silc_realloc(void *ptr, size_t size)
{
void *addr;
if (silc_unlikely(size <= 0 || size >= SILC_MAX_ALLOC)) {
{
void *addr;
if (silc_unlikely(size <= 0 || size >= SILC_MAX_ALLOC)) {
- SILC_LOG_ERROR(("Invalid memory allocation
"
));
+ SILC_LOG_ERROR(("Invalid memory allocation
, allocation by %x", size
));
return NULL;
}
addr = realloc(ptr, size);
return NULL;
}
addr = realloc(ptr, size);