An iconv patch
H.J. Lu
hjl@lucon.org
Sat Oct 24 17:56:00 GMT 1998
Hi,
cnt may be zero. We have to deal with it.
--
H.J. Lu (hjl@gnu.org)
---
Sat Oct 24 17:54:46 1998 H.J. Lu <hjl@gnu.org>
* iconv/gconv_db.c (__gconv_find_transform): Change do loop to
while loop.
Index: iconv/gconv_db.c
===================================================================
RCS file: /home/work/cvs/gnu/glibc/iconv/gconv_db.c,v
retrieving revision 1.1.1.11
diff -u -r1.1.1.11 gconv_db.c
--- gconv_db.c 1998/10/20 14:16:39 1.1.1.11
+++ gconv_db.c 1998/10/23 15:55:23
@@ -548,7 +548,7 @@
size_t cnt = *nsteps;
struct gconv_step *steps = *handle;
- do
+ while (cnt > 0)
if (steps[--cnt].counter++ == 0)
{
steps[cnt].shlib_handle =
@@ -563,7 +563,6 @@
break;
}
}
- while (cnt > 0);
}
#endif
More information about the Libc-hacker
mailing list