From: Karel Zak Date: Mon, 6 Dec 2010 10:47:20 +0000 (+0100) Subject: libmount: minor fixes in cache.c X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60dafc19adb7b23403db53c511b5a8d080a81d00;p=util-linux libmount: minor fixes in cache.c Signed-off-by: Karel Zak --- diff --git a/shlibs/mount/src/cache.c b/shlibs/mount/src/cache.c index c8fd8e77..eceb2c0a 100644 --- a/shlibs/mount/src/cache.c +++ b/shlibs/mount/src/cache.c @@ -249,7 +249,8 @@ static int mnt_cache_get_probe(mnt_cache *cache, const char *devname, assert(devname); assert(res); - if (cache && cache->pr && strcmp(devname, cache->filename)) { + if (cache && cache->pr && (!cache->filename || + strcmp(devname, cache->filename))) { blkid_free_probe(cache->pr); free(cache->filename); cache->filename = NULL; @@ -405,7 +406,7 @@ char *mnt_cache_find_tag_value(mnt_cache *cache, * @ambi: returns TRUE if probing result is ambivalent (optional argument) * @cache: cache for results or NULL * - * Returns: fileststem type or NULL in case of error. The result has to be + * Returns: filesystem type or NULL in case of error. The result has to be * deallocated by free() if @cache is NULL. */ char *mnt_get_fstype(const char *devname, int *ambi, mnt_cache *cache)