aboutsummaryrefslogtreecommitdiff
path: root/src/lib/gssapi/generic/oid_ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/gssapi/generic/oid_ops.c')
-rw-r--r--src/lib/gssapi/generic/oid_ops.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/gssapi/generic/oid_ops.c b/src/lib/gssapi/generic/oid_ops.c
index 535fe57..7645efe 100644
--- a/src/lib/gssapi/generic/oid_ops.c
+++ b/src/lib/gssapi/generic/oid_ops.c
@@ -339,10 +339,10 @@ generic_gss_str_to_oid(OM_uint32 *minor_status,
if (sscanf((char *)bp, "%ld", &numbuf) != 1) {
return(GSS_S_FAILURE);
}
- while (numbuf) {
+ do {
nbytes++;
numbuf >>= 7;
- }
+ } while (numbuf);
while ((bp < &cp[oid_str->length]) && isdigit(*bp))
bp++;
while ((bp < &cp[oid_str->length]) &&
@@ -380,20 +380,20 @@ generic_gss_str_to_oid(OM_uint32 *minor_status,
nbytes = 0;
/* Have to fill in the bytes msb-first */
onumbuf = numbuf;
- while (numbuf) {
+ do {
nbytes++;
numbuf >>= 7;
- }
+ } while (numbuf);
numbuf = onumbuf;
op += nbytes;
i = -1;
- while (numbuf) {
+ do {
op[i] = (unsigned char) numbuf & 0x7f;
if (i != -1)
op[i] |= 0x80;
i--;
numbuf >>= 7;
- }
+ } while (numbuf);
while (isdigit(*bp))
bp++;
while (isspace(*bp) || *bp == '.')