Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libform We want size_t arguments, so just cast to size_t...
details: https://anonhg.NetBSD.org/src/rev/72d4585bc0ac
branches: trunk
changeset: 588092:72d4585bc0ac
user: wiz <wiz%NetBSD.org@localhost>
date: Tue Feb 07 20:07:42 2006 +0000
description:
We want size_t arguments, so just cast to size_t, instead of casting
to unsigned long and getting a warning on i386.
diffstat:
lib/libform/field.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (42 lines):
diff -r 2b11b004f201 -r 72d4585bc0ac lib/libform/field.c
--- a/lib/libform/field.c Tue Feb 07 19:40:51 2006 +0000
+++ b/lib/libform/field.c Tue Feb 07 20:07:42 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: field.c,v 1.23 2004/11/24 11:57:09 blymn Exp $ */
+/* $NetBSD: field.c,v 1.24 2006/02/07 20:07:42 wiz Exp $ */
/*-
* Copyright (c) 1998-1999 Brett Lymn
* (blymn%baea.com.au@localhost, brett_lymn%yahoo.com.au@localhost)
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: field.c,v 1.23 2004/11/24 11:57:09 blymn Exp $");
+__RCSID("$NetBSD: field.c,v 1.24 2006/02/07 20:07:42 wiz Exp $");
#include <stdlib.h>
#include <strings.h>
@@ -327,12 +327,12 @@
field->row_count = 1; /* must be at least one row XXX need to shift old rows (if any) to free list??? */
field->lines->length = len;
if ((newp = realloc(field->lines->string,
- (unsigned long) len + 1)) == NULL)
+ (size_t) len + 1)) == NULL)
return E_SYSTEM_ERROR;
field->lines->string = newp;
field->lines->allocated = len + 1;
strlcpy(field->lines->string, field->buffers[buffer].string,
- (unsigned long) len + 1);
+ (size_t) len + 1);
field->lines->expanded =
_formi_tab_expanded_length(field->lines->string,
0, field->lines->length);
@@ -515,7 +515,7 @@
{
if (linep->length != 0) {
strncpy(p, linep->string,
- (unsigned long) linep->length);
+ (size_t) linep->length);
p += linep->length;
}
Home |
Main Index |
Thread Index |
Old Index