diff mbox series

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

Message ID 20190530085050.19061-1-mail@aparcar.org
State Superseded
Headers show
Series [OpenWrt-Devel] procd: fixup double negative docker detection | expand

Commit Message

Paul Spooren May 30, 2019, 8:50 a.m. UTC
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@aparcar.org>
---
 container.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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