[OpenWrt-Devel] [PATCH] procd: fixup double negative docker detection

Paul Spooren mail at aparcar.org
Thu May 30 01:50:51 PDT 2019


Double `!!` results in false positives, making the snapshot unusable as
procd won't mount essential things on *non virtial machines*.

Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 container.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/container.h b/container.h
index dd2e432..3c388ce 100644
--- a/container.h
+++ b/container.h
@@ -20,7 +20,7 @@
 
 static inline bool is_container() {
 	struct stat s;
-	return !!getenv("container") || !!stat("/.dockerenv", &s);
+	return !!getenv("container") || !stat("/.dockerenv", &s);
 }
 
 #endif
-- 
2.20.1




More information about the openwrt-devel mailing list