summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-cache/src
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2009-07-17 22:42:55 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-07-20 14:29:04 -0700
commit05211cdaff7ac117095c2213722b386c0f172ed0 (patch)
treeab86192265db09e4c7be662fae9fdc03ccc96207 /xlators/performance/io-cache/src
parentd62362acd64a2d495431f6c4ff7dffc8d47856df (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
Diffstat (limited to 'xlators/performance/io-cache/src')
-rw-r--r--xlators/performance/io-cache/src/ioc-inode.c8
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;
}