Make sure bootlogd findpty() returns an error value when it fails to
[sysvinit.git] / src / bootlogd.c
index 924f50292669f5ac43f9a157e94cf2d9c7ea2a10..e2eb4d8a68faf635e1f9e7329b8d290834a05928 100644 (file)
@@ -198,7 +198,7 @@ int findpty(int *master, int *slave, char *name)
                }
                if (found) break;
        }
-       if (found < 0) return -1;
+       if (!found) return -1;
 
        if (name) strcpy(name, tty);