Removed some saber lint flames
authorTheodore Tso <tytso@mit.edu>
Thu, 24 Sep 1992 23:27:43 +0000 (23:27 +0000)
committerTheodore Tso <tytso@mit.edu>
Thu, 24 Sep 1992 23:27:43 +0000 (23:27 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2399 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/copy_tick.c
src/lib/krb5/krb/decrypt_tk.c
src/lib/krb5/krb/gc_frm_kdc.c

index bdb950d44db04e4c58e0ae0a104a71fe8df0b64d..6cdc5473d2f49f61a3e0c2c71d3932b823ab7189 100644 (file)
@@ -45,12 +45,14 @@ krb5_enc_tkt_part **partto;
     if (!(tempto = (krb5_enc_tkt_part *)malloc(sizeof(*tempto))))
        return ENOMEM;
     *tempto = *partfrom;
-    if (retval = krb5_copy_keyblock(partfrom->session,
-                                   &tempto->session)) {
+    retval = krb5_copy_keyblock(partfrom->session,
+                               &tempto->session);
+    if (retval) {
        xfree(tempto);
        return retval;
     }
-    if (retval = krb5_copy_principal(partfrom->client, &tempto->client)) {
+    retval = krb5_copy_principal(partfrom->client, &tempto->client);
+    if (retval) {
        krb5_free_keyblock(tempto->session);
        xfree(tempto);
        return retval;
@@ -72,7 +74,8 @@ krb5_enc_tkt_part **partto;
               partfrom->transited.tr_contents.length);
     }
 
-    if (retval = krb5_copy_addresses(partfrom->caddrs, &tempto->caddrs)) {
+    retval = krb5_copy_addresses(partfrom->caddrs, &tempto->caddrs);
+    if (retval) {
        xfree(tempto->transited.tr_contents.data);
        krb5_free_principal(tempto->client);
        krb5_free_keyblock(tempto->session);
@@ -80,8 +83,9 @@ krb5_enc_tkt_part **partto;
        return retval;
     }
     if (partfrom->authorization_data) {
-       if (retval = krb5_copy_authdata(partfrom->authorization_data,
-                                       &tempto->authorization_data)) {
+       retval = krb5_copy_authdata(partfrom->authorization_data,
+                                   &tempto->authorization_data);
+       if (retval) {
            krb5_free_addresses(tempto->caddrs);
            xfree(tempto->transited.tr_contents.data);
            krb5_free_principal(tempto->client);
@@ -106,16 +110,19 @@ krb5_ticket **pto;
     if (!(tempto = (krb5_ticket *)malloc(sizeof(*tempto))))
        return ENOMEM;
     *tempto = *from;
-    if (retval = krb5_copy_principal(from->server, &tempto->server))
+    retval = krb5_copy_principal(from->server, &tempto->server);
+    if (retval)
        return retval;
-    if (retval = krb5_copy_data(&from->enc_part.ciphertext, &scratch)) {
+    retval = krb5_copy_data(&from->enc_part.ciphertext, &scratch);
+    if (retval) {
        krb5_free_principal(tempto->server);
        xfree(tempto);
        return retval;
     }
     tempto->enc_part.ciphertext = *scratch;
     xfree(scratch);
-    if (retval = krb5_copy_enc_tkt_part(from->enc_part2, &tempto->enc_part2)) {
+    retval = krb5_copy_enc_tkt_part(from->enc_part2, &tempto->enc_part2);
+    if (retval) {
        xfree(tempto->enc_part.ciphertext.data);
        krb5_free_principal(tempto->server);
        xfree(tempto);
index 287973a8e4d0f6ebddba8e3e72362b438c88a938..a35f60981478899b7d5b82d2837d58a00adceea5 100644 (file)
@@ -67,28 +67,32 @@ register krb5_ticket *ticket;
        return(ENOMEM);
 
     /* do any necessary key pre-processing */
-    if (retval = krb5_process_key(&eblock, srv_key)) {
+    retval = krb5_process_key(&eblock, srv_key);
+    if (retval) {
        free(scratch.data);
        return(retval);
     }
 
     /* call the encryption routine */
-    if (retval = krb5_decrypt((krb5_pointer) ticket->enc_part.ciphertext.data,
-                             (krb5_pointer) scratch.data,
-                             scratch.length, &eblock, 0)) {
+    retval = krb5_decrypt((krb5_pointer) ticket->enc_part.ciphertext.data,
+                         (krb5_pointer) scratch.data,
+                         scratch.length, &eblock, 0);
+    if (retval) {
        (void) krb5_finish_key(&eblock);
        free(scratch.data);
        return retval;
     }
 #define clean_scratch() {memset(scratch.data, 0, scratch.length); \
 free(scratch.data);}
-    if (retval = krb5_finish_key(&eblock)) {
+    retval = krb5_finish_key(&eblock);
+    if (retval) {
 
        clean_scratch();
        return retval;
     }
     /*  now decode the decrypted stuff */
-    if (!(retval = decode_krb5_enc_tkt_part(&scratch, &dec_tkt_part))) {
+    retval = decode_krb5_enc_tkt_part(&scratch, &dec_tkt_part);
+    if (!retval) {
        ticket->enc_part2 = dec_tkt_part;
     }
     clean_scratch();
index 4aa8d9dea820ae58c102d63e8ae8ee6f2e29404f..1127ba7a32beab85ef35c4847dcb7c3c979bb5d7 100644 (file)
@@ -133,7 +133,8 @@ krb5_get_cred_from_kdc (ccache, cred, tgts)
        /* walk the list BACKWARDS until we find a cached
           TGT, then move forward obtaining TGTs until we get the last
           TGT needed */
-       for (next_server = tgs_list; *next_server; next_server++);
+       for (next_server = tgs_list; *next_server;)
+               next_server++;
        nservers = next_server - tgs_list;
        next_server--;
 
@@ -187,7 +188,6 @@ krb5_get_cred_from_kdc (ccache, cred, tgts)
                krb5_free_realm_tree(tgs_list);
                goto out;
            }
-           krb5_free_data(krb5_princ_realm(final_server));
            krb5_princ_set_realm(final_server, tmpdata);
            tgtq.server = final_server;