summaryrefslogtreecommitdiff
path: root/src/bin/evas
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-01-13 11:44:21 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-01-14 14:23:04 +0900
commitf1aa32a4a45cdce9994d0c8bbcf1c0860f892657 (patch)
tree2dfaf4adb1cb9122ac4db6dccb13572ef46c5841 /src/bin/evas
parenta279e13ecd8a9b7570ed49e02440b9edeba1f3d2 (diff)
Evas/cserve2: Use calloc instead of malloc
This will silence some warnings from valgrind (and add some safety as well...)
Diffstat (limited to 'src/bin/evas')
-rw-r--r--src/bin/evas/evas_cserve2_cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/evas/evas_cserve2_cache.c b/src/bin/evas/evas_cserve2_cache.c
index 3b04245137..bc12fed505 100644
--- a/src/bin/evas/evas_cserve2_cache.c
+++ b/src/bin/evas/evas_cserve2_cache.c
@@ -1889,7 +1889,7 @@ _glyphs_loaded_msg_create(Glyphs_Request *req, int *resp_size)
1889 size += shmname_size + idxname_size; 1889 size += shmname_size + idxname_size;
1890 size += req->nanswer * 10 * sizeof(int); 1890 size += req->nanswer * 10 * sizeof(int);
1891 1891
1892 response = malloc(size); 1892 response = calloc(1, size);
1893 if (!response) return NULL; 1893 if (!response) return NULL;
1894 msg = (Msg_Font_Glyphs_Loaded *) response; 1894 msg = (Msg_Font_Glyphs_Loaded *) response;
1895 buf = response + sizeof(Msg_Font_Glyphs_Loaded); 1895 buf = response + sizeof(Msg_Font_Glyphs_Loaded);
@@ -1979,7 +1979,7 @@ _file_path_join(const char *path, const char *end)
1979 len = strlen(path); 1979 len = strlen(path);
1980 len += strlen(end); 1980 len += strlen(end);
1981 len += strlen(EVAS_PATH_SEPARATOR); 1981 len += strlen(EVAS_PATH_SEPARATOR);
1982 res = malloc(len + 1); 1982 res = calloc(1, len + 1);
1983 if (!res) return NULL; 1983 if (!res) return NULL;
1984 strcpy(res, path); 1984 strcpy(res, path);
1985 strcat(res, EVAS_PATH_SEPARATOR); 1985 strcat(res, EVAS_PATH_SEPARATOR);
@@ -2056,7 +2056,7 @@ _glyphs_load_request_prepare(Glyphs_Request *req)
2056 2056
2057 // Won't render more than this number of glyphs 2057 // Won't render more than this number of glyphs
2058 max = req->nglyphs - req->nanswer; 2058 max = req->nglyphs - req->nanswer;
2059 req->render = malloc(sizeof(*req->render) * max); 2059 req->render = calloc(max, sizeof(*req->render));
2060 2060
2061 for (i = req->current; i < req->nglyphs; i++) 2061 for (i = req->current; i < req->nglyphs; i++)
2062 { 2062 {