summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-04-02 02:10:36 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-04-02 02:10:36 +0000
commit6ee1521df40177d7f4cfbc7762e470b94e1b540b (patch)
treea375c8f31cc4bbe15fbab9fb24428eb17efb5c97 /lib
parent3c01c37065fdafbaa46e4fb69a2cda30da6d4a2b (diff)
getting to the bottom of the issues. sprinkle a few casts that will
actually help us find bugs later (with lint, not cc), if they get introduced
Diffstat (limited to 'lib')
-rw-r--r--lib/libutil/getmaxpartitions.c4
-rw-r--r--lib/libutil/getrawpartition.c4
-rw-r--r--lib/libutil/passwd.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/libutil/getmaxpartitions.c b/lib/libutil/getmaxpartitions.c
index d6a5ced3325..99cca80a75c 100644
--- a/lib/libutil/getmaxpartitions.c
+++ b/lib/libutil/getmaxpartitions.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getmaxpartitions.c,v 1.5 2005/08/02 21:46:23 espie Exp $ */
+/* $OpenBSD: getmaxpartitions.c,v 1.6 2006/04/02 02:10:35 deraadt Exp $ */
/* $NetBSD: getmaxpartitions.c,v 1.1 1996/05/16 07:03:31 thorpej Exp $ */
/*-
@@ -51,7 +51,7 @@ getmaxpartitions(void)
mib[0] = CTL_KERN;
mib[1] = KERN_MAXPARTITIONS;
varlen = sizeof(maxpart);
- if (sysctl(mib, 2, &maxpart, &varlen, NULL, 0) < 0)
+ if (sysctl(mib, 2, &maxpart, &varlen, NULL, (size_t)0) < 0)
return (-1);
return (maxpart);
diff --git a/lib/libutil/getrawpartition.c b/lib/libutil/getrawpartition.c
index c94173f9525..6543b35bd97 100644
--- a/lib/libutil/getrawpartition.c
+++ b/lib/libutil/getrawpartition.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getrawpartition.c,v 1.5 2005/08/02 21:46:23 espie Exp $ */
+/* $OpenBSD: getrawpartition.c,v 1.6 2006/04/02 02:10:35 deraadt Exp $ */
/* $NetBSD: getrawpartition.c,v 1.1 1996/05/16 07:03:33 thorpej Exp $ */
/*-
@@ -51,7 +51,7 @@ getrawpartition(void)
mib[0] = CTL_KERN;
mib[1] = KERN_RAWPARTITION;
varlen = sizeof(rawpart);
- if (sysctl(mib, 2, &rawpart, &varlen, NULL, 0) < 0)
+ if (sysctl(mib, 2, &rawpart, &varlen, NULL, (size_t)0) < 0)
return (-1);
return (rawpart);
diff --git a/lib/libutil/passwd.c b/lib/libutil/passwd.c
index b176234dcf5..c3dc4ece8bf 100644
--- a/lib/libutil/passwd.c
+++ b/lib/libutil/passwd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: passwd.c,v 1.46 2005/08/02 21:46:23 espie Exp $ */
+/* $OpenBSD: passwd.c,v 1.47 2006/04/02 02:10:35 deraadt Exp $ */
/*
* Copyright (c) 1987, 1993, 1994, 1995
@@ -312,7 +312,7 @@ pw_copy(int ffd, int tfd, const struct passwd *pw, const struct passwd *opw)
if (!(to = fdopen(tfd, "w")))
pw_error(pw_lck ? pw_lck : NULL, pw_lck ? 1 : 0, 1);
- for (done = 0; fgets(buf, sizeof(buf), from);) {
+ for (done = 0; fgets(buf, (int)sizeof(buf), from);) {
if ((ep = strchr(buf, '\n')) == NULL) {
warnx("%s: line too long", master);
pw_error(NULL, 0, 1);