diff options
Diffstat (limited to 'lib/loopdev.c')
-rw-r--r-- | lib/loopdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/loopdev.c b/lib/loopdev.c index 2488a6fdb..2a2a31782 100644 --- a/lib/loopdev.c +++ b/lib/loopdev.c @@ -238,7 +238,7 @@ void loopcxt_enable_debug(struct loopdev_cxt *lc, int enable) */ char *loopcxt_strdup_device(struct loopdev_cxt *lc) { - if (!lc || !lc->device || !*lc->device) + if (!lc || !*lc->device) return NULL; return strdup(lc->device); } @@ -250,7 +250,7 @@ char *loopcxt_strdup_device(struct loopdev_cxt *lc) */ const char *loopcxt_get_device(struct loopdev_cxt *lc) { - return lc && lc->device && *lc->device ? lc->device : NULL; + return lc && *lc->device ? lc->device : NULL; } /* |