eliminate potential trouble

dev
liuwei 2015-08-18 18:36:07 +08:00
parent 333f9b56e4
commit 8821594608
1 changed files with 3 additions and 3 deletions

View File

@ -46,12 +46,12 @@ void iniSetAnnotationCallBack(AnnotationMap *map, int count)
g_annotataionMap = (AnnotationMap *) malloc(bytes);
if (g_annotataionMap == NULL) {
logError("file: "__FILE__", line: %d, " \
"malloc fail, errno: %d, error info: %s", \
__LINE__, errno, STRERROR(errno));
"malloc (%d) fail, errno: %d, error info: %s", \
__LINE__, bytes, errno, STRERROR(errno));
return;
}
memcpy(g_annotataionMap, map, bytes);
memcpy(g_annotataionMap, map, sizeof(AnnotationMap) * count);
p = g_annotataionMap + count;
p->func_name = NULL;