diff options
author | 2009-03-20 09:34:34 +0000 | |
---|---|---|
committer | 2009-03-20 09:34:34 +0000 | |
commit | 87bb4dab817ff0055287caafb2b61412afee45f8 (patch) | |
tree | 002bc5ef77b4de0c34a97b343986a19979e2533c | |
parent | Fetch rebuild status only for degraded or offline volumes. (diff) | |
download | wireguard-openbsd-87bb4dab817ff0055287caafb2b61412afee45f8.tar.xz wireguard-openbsd-87bb4dab817ff0055287caafb2b61412afee45f8.zip |
initialize variable before using it as a counter in a loop
spotted and fix by Matthew Haub <matthew.haub@alumni.adelaide.edu.au>
-rw-r--r-- | usr.sbin/smtpd/lka.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c index 96d61911218..96c86e3e7df 100644 --- a/usr.sbin/smtpd/lka.c +++ b/usr.sbin/smtpd/lka.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka.c,v 1.35 2009/03/11 11:11:08 pea Exp $ */ +/* $OpenBSD: lka.c,v 1.36 2009/03/20 09:34:34 gilles Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -1216,7 +1216,7 @@ lka_encode_credentials(char *dest, char *src) sizeof (buffer) - 1) return 0; - while (i++ < len) { + for (i = 0; i < len; ++i) { if (buffer[i] == ':') { buffer[i] = '\0'; break; |