diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-01-07 01:01:12 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-01-07 01:01:12 +0000 |
commit | 83615d2e68c73b2d01d643572c7477b9c505df26 (patch) | |
tree | 92c861ecbaee8fad94f245b57eaad581df7f2cab /lib | |
parent | 35ad21b5e737da2b55fb78b49c692c85c144b6a6 (diff) |
use a size_t instead of an int to avoid signed compare
spotted by Ilja Van Sprundel
ok millert
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/getpwent.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index a9d4b8540c5..f8b1e51258e 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getpwent.c,v 1.43 2011/09/05 03:52:24 guenther Exp $ */ +/* $OpenBSD: getpwent.c,v 1.44 2013/01/07 01:01:11 deraadt Exp $ */ /* * Copyright (c) 2008 Theo de Raadt * Copyright (c) 1988, 1993 @@ -668,8 +668,9 @@ _pwhashbyname(const char *name, char *buf, size_t buflen, struct passwd *pw, int *flagsp) { char bf[1 + _PW_NAME_LEN]; - int len, r; + size_t len; DBT key; + int r; len = strlen(name); if (len > _PW_NAME_LEN) |