diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c index c1eb4aa6e..d0c4a4d89 100644 --- a/lib/cache/lvmetad.c +++ b/lib/cache/lvmetad.c @@ -124,7 +124,7 @@ void lvmetad_set_token(const struct dm_config_value *filter) filter = filter->next; } - if (!dm_asprintf(&_lvmetad_token, "filter:%u", ft)) + if (dm_asprintf(&_lvmetad_token, "filter:%u", ft) < 0) log_warn("WARNING: Failed to set lvmetad token. Out of memory?"); } diff --git a/tools/pvscan.c b/tools/pvscan.c index 4121c7b02..ac43295ab 100644 --- a/tools/pvscan.c +++ b/tools/pvscan.c @@ -166,7 +166,7 @@ static int _clear_dev_from_lvmetad_cache(dev_t devno, int32_t major, int32_t min { char *buf; - if (!dm_asprintf(&buf, "%" PRIi32 ":%" PRIi32, major, minor)) + if (dm_asprintf(&buf, "%" PRIi32 ":%" PRIi32, major, minor) < 0) stack; if (!lvmetad_pv_gone(devno, buf ? : "", handler)) { dm_free(buf);