#include "includes.h"
#include "uuencode.h"
-RCSID("$OpenBSD: radix.c,v 1.18 2002/04/20 09:17:19 markus Exp $");
+RCSID("$OpenBSD: radix.c,v 1.20 2002/04/23 12:58:26 markus Exp $");
#ifdef AFS
#include <krb.h>
buffer_put_short(&b, creds->kvno);
/* 32 bit size + data */
- buffer_put_string(&b, creds->ticket_st.dat,
- sizeof(creds->ticket_st.length));
+ buffer_put_string(&b, creds->ticket_st.dat, creds->ticket_st.length);
ret = uuencode(buffer_ptr(&b), buffer_len(&b), (char *)buf, buflen);
#define GETSTRING(b, t, tlen) \
do { \
- int i; \
+ int i, found = 0; \
for (i = 0; i < tlen; i++) { \
if (buffer_len(b) == 0) \
goto done; \
t[i] = buffer_get_char(b); \
- if (t[i] == '\0') \
+ if (t[i] == '\0') { \
+ found = 1; \
break; \
+ } \
} \
- if (t[i] != '\0') \
+ if (!found) \
goto done; \
} while(0)