From: Karel Zak Date: Tue, 3 Mar 2009 15:06:52 +0000 (+0100) Subject: blkid: fix gcc warning in blkid_get_cache_filename() X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30fce928380e03b05aab9d51c444e38dfe976cb8;p=util-linux blkid: fix gcc warning in blkid_get_cache_filename() cache.c: In function `blkid_get_cache_filename': cache.c:113 warning: return makes pointer from integer without a cast Signed-off-by: Karel Zak --- diff --git a/libs/blkid/src/cache.c b/libs/blkid/src/cache.c index 3dd40d09..d2b54f23 100644 --- a/libs/blkid/src/cache.c +++ b/libs/blkid/src/cache.c @@ -110,10 +110,12 @@ char *blkid_get_cache_filename(struct blkid_config *conf) else { struct blkid_config *c = blkid_read_config(NULL); if (!c) - return -BLKID_ERR_PARAM; - filename = c->cachefile; /* already allocated */ - c->cachefile = NULL; - blkid_free_config(c); + filename = blkid_strdup(BLKID_CONFIG_FILE); + else { + filename = c->cachefile; /* already allocated */ + c->cachefile = NULL; + blkid_free_config(c); + } } return filename; }