From d7161f3b5150d217c8cbbf16a5d567885679b7b8 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Sat, 12 Jul 2008 20:28:38 +1000 Subject: [PATCH] Fix fd comparison in Incremental fd==0 is theoretically possible... --- Incremental.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Incremental.c b/Incremental.c index 712f2bdb..266111ae 100644 --- a/Incremental.c +++ b/Incremental.c @@ -727,7 +727,7 @@ static char *container2devname(char *devname) int fd = open(devname, O_RDONLY); char *mdname = NULL; - if (fd > 0) { + if (fd >= 0) { mdname = devnum2devname(fd2devnum(fd)); close(fd); } -- 2.39.2