summaryrefslogtreecommitdiff
path: root/sys/compat/hpux
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2006-09-25 07:12:58 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2006-09-25 07:12:58 +0000
commit9ba56d1a50d0bdaf1d098ede270a50539a5580d6 (patch)
tree173996c0a96a8f2d4b3b2f4766508630b584eb67 /sys/compat/hpux
parentb7ef4259e62c4af01f36b0141bfbc4f31ce79f55 (diff)
Use S_IS* macros insted of masking with S_IF* flags. The latter may
have multiple bits set, which lead to surprising results. Spotted by from Paul Stoeber, more to come. ok miod@
Diffstat (limited to 'sys/compat/hpux')
-rw-r--r--sys/compat/hpux/hpux_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/hpux/hpux_file.c b/sys/compat/hpux/hpux_file.c
index b83eced4dcb..63daf9ed6fc 100644
--- a/sys/compat/hpux/hpux_file.c
+++ b/sys/compat/hpux/hpux_file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hpux_file.c,v 1.16 2005/02/15 21:12:44 aaron Exp $ */
+/* $OpenBSD: hpux_file.c,v 1.17 2006/09/25 07:12:57 otto Exp $ */
/* $NetBSD: hpux_file.c,v 1.5 1997/04/27 21:40:48 thorpej Exp $ */
/*
@@ -703,7 +703,7 @@ hpux_sys_mknod(p, v, retval)
/*
* BSD handles FIFOs separately.
*/
- if (SCARG(uap, mode) & S_IFIFO) {
+ if (S_ISFIFO(SCARG(uap, mode))) {
SCARG(&bma, path) = SCARG(uap, path);
SCARG(&bma, mode) = SCARG(uap, mode);
return (sys_mkfifo(p, uap, retval));