=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/Attic/radix.c,v retrieving revision 1.17.2.4 retrieving revision 1.18 diff -u -r1.17.2.4 -r1.18 --- src/usr.bin/ssh/Attic/radix.c 2002/10/11 14:51:52 1.17.2.4 +++ src/usr.bin/ssh/Attic/radix.c 2002/04/20 09:17:19 1.18 @@ -26,7 +26,7 @@ #include "includes.h" #include "uuencode.h" -RCSID("$OpenBSD: radix.c,v 1.17.2.4 2002/10/11 14:51:52 miod Exp $"); +RCSID("$OpenBSD: radix.c,v 1.18 2002/04/20 09:17:19 markus Exp $"); #ifdef AFS #include @@ -65,7 +65,8 @@ buffer_put_short(&b, creds->kvno); /* 32 bit size + data */ - buffer_put_string(&b, creds->ticket_st.dat, creds->ticket_st.length); + buffer_put_string(&b, creds->ticket_st.dat, + sizeof(creds->ticket_st.length)); ret = uuencode(buffer_ptr(&b), buffer_len(&b), (char *)buf, buflen); @@ -75,17 +76,15 @@ #define GETSTRING(b, t, tlen) \ do { \ - int i, found = 0; \ + int i; \ for (i = 0; i < tlen; i++) { \ if (buffer_len(b) == 0) \ goto done; \ t[i] = buffer_get_char(b); \ - if (t[i] == '\0') { \ - found = 1; \ + if (t[i] == '\0') \ break; \ - } \ } \ - if (!found) \ + if (t[i] != '\0') \ goto done; \ } while(0) @@ -93,10 +92,9 @@ radix_to_creds(const char *buf, CREDENTIALS *creds) { Buffer b; - u_char *space; - char c, version, *p; - u_int endTime, len; - int blen, ret; + char c, version, *space, *p; + u_int endTime; + int len, blen, ret; ret = 0; blen = strlen(buf); @@ -149,7 +147,7 @@ goto done; memcpy(&creds->ticket_st.dat, p, len); creds->ticket_st.length = len; - + ret = 1; done: buffer_free(&b);