]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
coverity: #1425735
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 6 Dec 2017 20:22:03 +0000 (21:22 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 17 Dec 2017 15:25:18 +0000 (16:25 +0100)
use correct inequality comparison

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index e1a9b771051cd08a1c4a594b7ce7571e1d347e66..4c7df358ae334e00206c78dbec7969487116ec34 100644 (file)
@@ -1361,7 +1361,7 @@ again:
                ret = snprintf(offset, 5, "-%d", idx);
                if (ret < 0 || (size_t)ret >= 5) {
                        FILE *f = fopen("/dev/null", "w");
-                       if (f >= 0) {
+                       if (f) {
                                fprintf(f, "Workaround for GCC7 bug: "
                                           "https://gcc.gnu.org/bugzilla/"
                                           "show_bug.cgi?id=78969");