Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc add a couple of casts.
details: https://anonhg.NetBSD.org/src/rev/595dec41ab27
branches: trunk
changeset: 335992:595dec41ab27
user: christos <christos%NetBSD.org@localhost>
date: Thu Feb 05 16:05:20 2015 +0000
description:
add a couple of casts.
diffstat:
lib/libc/gen/sysctl.c | 6 +++---
lib/libc/stdio/gettemp.c | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diffs (61 lines):
diff -r eb773047884b -r 595dec41ab27 lib/libc/gen/sysctl.c
--- a/lib/libc/gen/sysctl.c Thu Feb 05 16:04:35 2015 +0000
+++ b/lib/libc/gen/sysctl.c Thu Feb 05 16:05:20 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysctl.c,v 1.34 2014/05/16 12:22:32 martin Exp $ */
+/* $NetBSD: sysctl.c,v 1.35 2015/02/05 16:05:20 christos Exp $ */
/*-
* Copyright (c) 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)sysctl.c 8.2 (Berkeley) 1/4/94";
#else
-__RCSID("$NetBSD: sysctl.c,v 1.34 2014/05/16 12:22:32 martin Exp $");
+__RCSID("$NetBSD: sysctl.c,v 1.35 2015/02/05 16:05:20 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -313,7 +313,7 @@
if (d2 != NULL)
memcpy(d2, d1, d);
sz += d;
- d2 = (struct sysctldesc *)((char *)d2 + d);
+ d2 = (struct sysctldesc *)(void *)((char *)d2 + d);
if (node != NULL)
break;
}
diff -r eb773047884b -r 595dec41ab27 lib/libc/stdio/gettemp.c
--- a/lib/libc/stdio/gettemp.c Thu Feb 05 16:04:35 2015 +0000
+++ b/lib/libc/stdio/gettemp.c Thu Feb 05 16:05:20 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gettemp.c,v 1.19 2014/06/19 05:31:15 msaitoh Exp $ */
+/* $NetBSD: gettemp.c,v 1.20 2015/02/05 16:05:20 christos Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: gettemp.c,v 1.19 2014/06/19 05:31:15 msaitoh Exp $");
+__RCSID("$NetBSD: gettemp.c,v 1.20 2015/02/05 16:05:20 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -85,13 +85,13 @@
/* Fill space with random characters */
while (trv >= path && *trv == 'X') {
- r = arc4random_uniform(sizeof(padchar) - 1);
+ r = arc4random_uniform((unsigned int)(sizeof(padchar) - 1));
*trv-- = padchar[r];
}
start = trv + 1;
/* save first combination of random characters */
- memcpy(carrybuf, start, suffp - start);
+ memcpy(carrybuf, start, (size_t)(suffp - start));
/*
* check the target directory.
Home |
Main Index |
Thread Index |
Old Index