Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/usr.sbin/pkg_install/lib Pull up following revision(s) (r...
details: https://anonhg.NetBSD.org/src/rev/dc4d97d4a9c6
branches: netbsd-3
changeset: 577453:dc4d97d4a9c6
user: tron <tron%NetBSD.org@localhost>
date: Sun Nov 06 13:42:12 2005 +0000
description:
Pull up following revision(s) (requested by wiz in ticket #938):
usr.sbin/pkg_install/lib/var.c: revision 1.2
Make it compile on sparc/sparc64. Cast size_t to int for field precision.
diffstat:
usr.sbin/pkg_install/lib/var.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 2e844223f8dd -r dc4d97d4a9c6 usr.sbin/pkg_install/lib/var.c
--- a/usr.sbin/pkg_install/lib/var.c Sun Nov 06 13:41:32 2005 +0000
+++ b/usr.sbin/pkg_install/lib/var.c Sun Nov 06 13:42:12 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.3.2.2 2005/11/06 13:40:51 tron Exp $ */
+/* $NetBSD: var.c,v 1.3.2.3 2005/11/06 13:42:12 tron Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: var.c,v 1.3.2.2 2005/11/06 13:40:51 tron Exp $");
+__RCSID("$NetBSD: var.c,v 1.3.2.3 2005/11/06 13:42:12 tron Exp $");
#endif
#include <sys/stat.h>
@@ -87,7 +87,7 @@
else {
value = malloc(thislen+1);
}
- sprintf(value+valuelen, "%.*s", thislen, p);
+ sprintf(value+valuelen, "%.*s", (int)thislen, p);
valuelen += thislen;
}
(void) fclose(fp);
@@ -146,7 +146,7 @@
if (fp) {
while ((line = fgetln(fp, &len)) != (char *) NULL) {
if (var_cmp(line, len, variable, varlen) == NULL)
- fprintf(fout, "%.*s", len, line);
+ fprintf(fout, "%.*s", (int)len, line);
else {
if (!done && value) {
var_print(fout, variable, value);
@@ -230,7 +230,7 @@
while ((p=strchr(value, '\n')) != NULL) {
if (p != value)
- fprintf(f, "%s=%.*s\n", variable, p-value, value);
+ fprintf(f, "%s=%.*s\n", variable, (int)(p-value), value);
value = p+1;
}
Home |
Main Index |
Thread Index |
Old Index