diff options
author | bapt <bapt@FreeBSD.org> | 2012-04-15 16:00:32 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2012-04-15 16:00:32 +0000 |
commit | 008e190698a06a7385b8e6dac0a867edc5166436 (patch) | |
tree | 5f0b26ee6b62313668be6edf43e93d664b137e9a /usr.sbin/pkg | |
parent | fd385cca509df6124120c2d2d2660bf4363f2720 (diff) | |
download | FreeBSD-src-008e190698a06a7385b8e6dac0a867edc5166436.zip FreeBSD-src-008e190698a06a7385b8e6dac0a867edc5166436.tar.gz |
Do not do double initialisation
style(9) says for (;;) not while (1)
Reported by: culot
Approved by: des
Diffstat (limited to 'usr.sbin/pkg')
-rw-r--r-- | usr.sbin/pkg/pkg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c index a7d11af..7208f83 100644 --- a/usr.sbin/pkg/pkg.c +++ b/usr.sbin/pkg/pkg.c @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); static const char * elf_corres_to_string(struct _elf_corres* m, int e) { - int i = 0; + int i; for (i = 0; m[i].string != NULL; i++) if (m[i].elf_nb == e) @@ -125,7 +125,7 @@ pkg_get_myabi(char *dest, size_t sz) data = elf_getdata(scn, NULL); src = data->d_buf; - while (1) { + for (;;) { memcpy(¬e, src, sizeof(Elf_Note)); src += sizeof(Elf_Note); if (note.n_type == NT_VERSION) |