]> Zhao Yanbai Git Server - minix.git/commitdiff
VFS: resolve unused parameter if NOASSERTS="yes"
authorArne Welzel <arne.welzel@gmail.com>
Thu, 27 Sep 2012 20:22:06 +0000 (22:22 +0200)
committerBen Gras <ben@minix3.org>
Fri, 28 Sep 2012 12:57:32 +0000 (14:57 +0200)
If VFS is compiled with NOASSERTS="yes", ctty_opcl() does not
use the op parameter. Change to "non-assert()" sanity check.

servers/vfs/device.c

index 0d7d5da96fa65dcf12c5cffa8bc84a3723b07629..7461abc008b0ca9639059cd9534144d661067ab5 100644 (file)
@@ -623,7 +623,8 @@ int ctty_opcl(
  * /dev/tty, the magic device that translates to the controlling tty.
  */
 
-  assert(!IS_BDEV_RQ(op));
+  if (IS_BDEV_RQ(op))
+       panic("ctty_opcl() called for block device request?");
 
   return(fp->fp_tty == 0 ? ENXIO : OK);
 }