summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2008-09-08 17:48:44 -0300
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2008-09-09 09:15:41 -0300
commit46636652b35778dfad6a1d55cb9900ef5c00da68 (patch)
treef85f8062961e55ecf8f2a3b042f6fa025758f090
parent957d01bac7a4c448bbe0a15de613af7927d1c7d0 (diff)
Removed warning: uninitialised value
-rw-r--r--src/storage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/storage.c b/src/storage.c
index c2450ba2..0690fc1a 100644
--- a/src/storage.c
+++ b/src/storage.c
@@ -769,7 +769,7 @@ int store_record(const gchar *src, const gchar *dst, sdp_record_t *rec)
sdp_record_t *fetch_record(const gchar *src, const gchar *dst, const uint32_t handle)
{
- char filename[PATH_MAX + 1], key[28], tmp[3],*str;
+ char filename[PATH_MAX + 1], key[28], tmp[3], *str;
sdp_record_t *rec;
int size, i, len;
uint8_t *pdata;
@@ -786,6 +786,7 @@ sdp_record_t *fetch_record(const gchar *src, const gchar *dst, const uint32_t ha
size = strlen(str) / 2;
pdata = g_malloc0(size);
+ memset(tmp, 0, sizeof(tmp));
for (i = 0; i < size; i++) {
memcpy(tmp, str + (i*2), 2);
pdata[i] = (uint8_t) strtol(tmp, NULL, 16);