diff options
author | Amar Tumballi <amar@gluster.com> | 2009-07-17 22:42:55 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-07-20 14:29:04 -0700 |
commit | 05211cdaff7ac117095c2213722b386c0f172ed0 (patch) | |
tree | ab86192265db09e4c7be662fae9fdc03ccc96207 | |
parent | d62362acd64a2d495431f6c4ff7dffc8d47856df (diff) |
fix build warnings in 'io-cache'
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 130 (build warnings)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=130
-rw-r--r-- | xlators/performance/io-cache/src/ioc-inode.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xlators/performance/io-cache/src/ioc-inode.c b/xlators/performance/io-cache/src/ioc-inode.c index c131a48f2b7..ab1d7b60074 100644 --- a/xlators/performance/io-cache/src/ioc-inode.c +++ b/xlators/performance/io-cache/src/ioc-inode.c @@ -48,8 +48,14 @@ str_to_ptr (char *string) char * ptr_to_str (void *ptr) { + int ret = 0; char *str = NULL; - asprintf (&str, "%p", ptr); + ret = asprintf (&str, "%p", ptr); + if (-1 == ret) { + gf_log ("ioc", GF_LOG_ERROR, + "asprintf failed while converting ptr to str"); + return NULL; + } return str; } |