mirror of https://github.com/acidanthera/audk.git
StdLib: Fix possible compiler warnings when doing enumerate type comparison.
Signed-off-by: Sun Rui <rui.sun@intel.com> Reviewed-by: Gao Liming <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13695 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
7cb7e2a26d
commit
1ba76449b3
|
@ -1,21 +1,13 @@
|
||||||
/*
|
/** @file
|
||||||
* Copyright (c) 1996 by Internet Software Consortium.
|
Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
*
|
This program and the accompanying materials are licensed and made available under
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
The full text of the license may be found at
|
||||||
* copyright notice and this permission notice appear in all copies.
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
|
||||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
|
||||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Portions copyright (c) 1999, 2000
|
* Portions copyright (c) 1999, 2000
|
||||||
* Intel Corporation.
|
* Intel Corporation.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
@ -53,7 +45,21 @@
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (c) 1996 by Internet Software Consortium.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||||
|
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||||
|
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||||
|
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||||
|
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||||
|
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||||
|
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
|
* SOFTWARE.
|
||||||
|
**/
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
@ -160,7 +166,7 @@ ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) {
|
||||||
int b;
|
int b;
|
||||||
|
|
||||||
/* Make section right. */
|
/* Make section right. */
|
||||||
if (section < 0 || section >= ns_s_max)
|
if ((unsigned int)section >= ns_s_max)
|
||||||
goto enodev;
|
goto enodev;
|
||||||
if ((int)section != (int)handle->_sect) {
|
if ((int)section != (int)handle->_sect) {
|
||||||
handle->_sect = section;
|
handle->_sect = section;
|
||||||
|
|
Loading…
Reference in New Issue