sign-compare fix
This commit is contained in:
parent
e53a76c628
commit
a99197aa1c
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_lookup.c,v 1.5 2006/03/27 01:09:11 christos Exp $ */
|
||||
/* $NetBSD: citrus_lookup.c,v 1.6 2009/02/03 04:58:38 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: citrus_lookup.c,v 1.5 2006/03/27 01:09:11 christos Exp $");
|
||||
__RCSID("$NetBSD: citrus_lookup.c,v 1.6 2009/02/03 04:58:38 lukem Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
@ -193,7 +193,7 @@ retry:
|
||||
q = _bcs_skip_nonws_len(p, &len);
|
||||
if (p==q)
|
||||
goto retry;
|
||||
if (cl->cl_key && (q-p != cl->cl_keylen ||
|
||||
if (cl->cl_key && ((size_t)(q-p) != cl->cl_keylen ||
|
||||
memcmp(p, cl->cl_key, (size_t)(q-p)) != 0))
|
||||
goto retry;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: citrus_memstream.c,v 1.3 2008/02/09 14:56:20 junyoung Exp $ */
|
||||
/* $NetBSD: citrus_memstream.c,v 1.4 2009/02/03 05:02:12 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2003 Citrus Project,
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: citrus_memstream.c,v 1.3 2008/02/09 14:56:20 junyoung Exp $");
|
||||
__RCSID("$NetBSD: citrus_memstream.c,v 1.4 2009/02/03 05:02:12 lukem Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
@ -98,7 +98,7 @@ _citrus_memory_stream_matchline(struct _citrus_memory_stream * __restrict ms,
|
||||
p = _bcs_skip_ws_len(p, &len);
|
||||
q = _bcs_skip_nonws_len(p, &len);
|
||||
|
||||
if (q-p == keylen) {
|
||||
if ((size_t)(q-p) == keylen) {
|
||||
if (iscasesensitive) {
|
||||
if (memcmp(key, p, keylen) == 0)
|
||||
break; /* match */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: compat_statfs.c,v 1.4 2008/04/28 20:22:59 martin Exp $ */
|
||||
/* $NetBSD: compat_statfs.c,v 1.5 2009/02/03 05:04:52 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2004 The NetBSD Foundation, Inc.
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: compat_statfs.c,v 1.4 2008/04/28 20:22:59 martin Exp $");
|
||||
__RCSID("$NetBSD: compat_statfs.c,v 1.5 2009/02/03 05:04:52 lukem Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#define __LIBC12_SOURCE__
|
||||
@ -90,7 +90,7 @@ static const struct {
|
||||
static void
|
||||
vfs2fs(struct statfs12 *bfs, const struct statvfs *fs)
|
||||
{
|
||||
int i = 0;
|
||||
size_t i = 0;
|
||||
bfs->f_type = 0;
|
||||
bfs->f_oflags = (short)fs->f_flag;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user