diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2005-08-27 22:21:03 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2005-08-27 22:21:03 +0000 |
commit | c978fac6c1e81bbd634be1cfe03a2795f87923a4 (patch) | |
tree | 847b65246bd9f7a1c5fe77d5836d13311926d42f | |
parent | ac1d4ed85b003752bcfe8eb1375eec0817bb0838 (diff) | |
download | fetchmail-c978fac6c1e81bbd634be1cfe03a2795f87923a4.tar.gz fetchmail-c978fac6c1e81bbd634be1cfe03a2795f87923a4.tar.bz2 fetchmail-c978fac6c1e81bbd634be1cfe03a2795f87923a4.zip |
Fix some compiler warnings.
svn path=/trunk/; revision=4268
-rw-r--r-- | gssapi.c | 35 |
1 files changed, 19 insertions, 16 deletions
@@ -77,9 +77,9 @@ int do_gssauth(int sock, char *command, char *service, char *hostname, char *use /* upon receipt of the GSSAPI authentication request, server returns * null data ready response. */ - if (result = gen_recv(sock, buf1, sizeof buf1)) { - return result; - } + result = gen_recv(sock, buf1, sizeof buf1); + if (result) + return result; /* now start the security context initialisation loop... */ sec_token = GSS_C_NO_BUFFER; @@ -102,24 +102,26 @@ int do_gssauth(int sock, char *command, char *service, char *hostname, char *use &send_token, NULL, NULL); - if (maj_stat!=GSS_S_COMPLETE && maj_stat!=GSS_S_CONTINUE_NEEDED) { - report(stderr, GT_("Error exchanging credentials\n")); - gss_release_name(&min_stat, &target_name); - /* wake up server and await NO response */ - SockWrite(sock, "\r\n", 2); - if (result = gen_recv(sock, buf1, sizeof buf1)) - return result; - return PS_AUTHFAIL; - } - to64frombits(buf1, send_token.value, send_token.length); - gss_release_buffer(&min_stat, &send_token); + if (maj_stat!=GSS_S_COMPLETE && maj_stat!=GSS_S_CONTINUE_NEEDED) { + report(stderr, GT_("Error exchanging credentials\n")); + gss_release_name(&min_stat, &target_name); + /* wake up server and await NO response */ + SockWrite(sock, "\r\n", 2); + result = gen_recv(sock, buf1, sizeof buf1); + if (result) + return result; + return PS_AUTHFAIL; + } + to64frombits(buf1, send_token.value, send_token.length); + gss_release_buffer(&min_stat, &send_token); suppress_tags = TRUE; gen_send(sock, buf1, strlen(buf1)); suppress_tags = FALSE; if (maj_stat == GSS_S_CONTINUE_NEEDED) { - if (result = gen_recv(sock, buf1, sizeof buf1)) { + result = gen_recv(sock, buf1, sizeof buf1); + if (result) { gss_release_name(&min_stat, &target_name); return result; } @@ -134,7 +136,8 @@ int do_gssauth(int sock, char *command, char *service, char *hostname, char *use gss_release_name(&min_stat, &target_name); /* get security flags and buffer size */ - if (result = gen_recv(sock, buf1, sizeof buf1)) + result = gen_recv(sock, buf1, sizeof buf1); + if (result) return result; request_buf.length = from64tobits(buf2, buf1 + 2, sizeof(buf2)); |