Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jan 2019 20:14:28 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r343452 - head/sys/mips/nlm
Message-ID:  <201901252014.x0PKESHP097988@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gonzo
Date: Fri Jan 25 20:14:28 2019
New Revision: 343452
URL: https://svnweb.freebsd.org/changeset/base/343452

Log:
  [mips] Fix error condition check that always evaluates to false
  
  Use proper logical operand when checking the value of srcid
  
  PR:		200988
  Submitted by:	David Binderman <dcb314@hotmail.com>
  MFC after:	1 week

Modified:
  head/sys/mips/nlm/cms.c

Modified: head/sys/mips/nlm/cms.c
==============================================================================
--- head/sys/mips/nlm/cms.c	Fri Jan 25 20:13:28 2019	(r343451)
+++ head/sys/mips/nlm/cms.c	Fri Jan 25 20:14:28 2019	(r343452)
@@ -204,7 +204,7 @@ xlp_handle_msg_vc(u_int vcmask, int max_msgs)
 			nlm_restore_flags(mflags);
 			if (status != 0)	/*  no msg or error */
 				continue;
-			if (srcid < 0 && srcid >= 1024) {
+			if (srcid < 0 || srcid >= 1024) {
 				printf("[%s]: bad src id %d\n", __func__,
 				    srcid);
 				continue;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901252014.x0PKESHP097988>