summaryrefslogtreecommitdiff
path: root/lib/libc/gen/ftok.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/ftok.c')
-rw-r--r--lib/libc/gen/ftok.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/ftok.c b/lib/libc/gen/ftok.c
index 387b80f3450..ea1edf1afd9 100644
--- a/lib/libc/gen/ftok.c
+++ b/lib/libc/gen/ftok.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftok.c,v 1.8 2014/11/15 22:38:47 guenther Exp $ */
+/* $OpenBSD: ftok.c,v 1.9 2019/06/28 13:32:41 deraadt Exp $ */
/*
* Copyright (c) 1994 SigmaSoft, Th. Lockert <tholo@sigmasoft.com>
* All rights reserved.
@@ -34,7 +34,7 @@ ftok(const char *path, int id)
{
struct stat st;
- if (stat(path, &st) < 0)
+ if (stat(path, &st) == -1)
return (key_t)-1;
return (key_t)