Browse Source

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
OPENBSD_4_0
deraadt 18 years ago
parent
commit
d72bbf4be3
3 changed files with 6 additions and 6 deletions
  1. +2
    -2
      src/lib/libutil/getmaxpartitions.c
  2. +2
    -2
      src/lib/libutil/getrawpartition.c
  3. +2
    -2
      src/lib/libutil/passwd.c

+ 2
- 2
src/lib/libutil/getmaxpartitions.c View File

@ -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);


+ 2
- 2
src/lib/libutil/getrawpartition.c View File

@ -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);


+ 2
- 2
src/lib/libutil/passwd.c View File

@ -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);


Loading…
Cancel
Save