Fix reversed test.

This commit is contained in:
christos 2016-07-30 15:38:17 +00:00
parent 8628665eb6
commit b265873d52

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_sched.c,v 1.45 2016/07/07 06:55:43 msaitoh Exp $ */
/* $NetBSD: sys_sched.c,v 1.46 2016/07/30 15:38:17 christos Exp $ */
/*
* Copyright (c) 2008, 2011 Mindaugas Rasiukevicius <rmind at NetBSD org>
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sys_sched.c,v 1.45 2016/07/07 06:55:43 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: sys_sched.c,v 1.46 2016/07/30 15:38:17 christos Exp $");
#include <sys/param.h>
@ -570,7 +570,7 @@ sys__sched_protect(struct lwp *l,
}
} else if (pri < 0) {
/* Just retrieve the current value, for debugging */
if (l->l_protectprio != -1)
if (l->l_protectprio == -1)
error = ENOENT;
else
*retval = l->l_protectprio - PRI_USER_RT;