From: Junghwan Song Date: Fri, 24 Aug 2012 14:05:50 +0000 (+0900) Subject: sync with private git X-Git-Tag: 2.0_alpha~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ad6af0c9c4757a6f498c8501c5e707fd69da85e;p=platform%2Fcore%2Ftelephony%2Ftel-plugin-atmodem.git sync with private git --- diff --git a/packaging/tel-plugin-atmodem.spec b/packaging/tel-plugin-atmodem.spec index e6ffdb6..1797549 100644 --- a/packaging/tel-plugin-atmodem.spec +++ b/packaging/tel-plugin-atmodem.spec @@ -1,7 +1,7 @@ #sbs-git:slp/pkgs/t/tel-plugin-atmodem Name: tel-plugin-atmodem Summary: Telephony AT Modem library -Version: 0.1.15 +Version: 0.1.17 Release: 1 Group: System/Libraries License: Apache diff --git a/src/s_common.c b/src/s_common.c index 17037d4..290d20e 100644 --- a/src/s_common.c +++ b/src/s_common.c @@ -177,24 +177,23 @@ unsigned char util_hexCharToInt(char c) char * util_hexStringToBytes(char * s) { char * ret; - int i; - int sz; + int i; + int sz; - if(s == NULL) - return NULL; + if (s == NULL) + return NULL; - sz = strlen(s); + sz = strlen(s); - ret = malloc(sz /2); + ret = calloc((sz/2)+1, 1); - dbg("Convert String to Binary!!"); + dbg("Convert String to Binary!!"); - for(i = 0; i < sz; i += 2) - { - ret[i/2] = (char)((util_hexCharToInt(s[i]) << 4) | util_hexCharToInt(s[i + 1])); - dbg("[%02x]", ret[i/2]); - } + for (i = 0; i < sz; i += 2) { + ret[i / 2] = (char) ((util_hexCharToInt(s[i]) << 4) | util_hexCharToInt(s[i + 1])); + dbg("[%02x]", ret[i/2]); + } - return ret; + return ret; }