]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Remove tautological NULL checks in kdc_j_encode.c
authorRobbie Harwood <rharwood@redhat.com>
Mon, 10 Apr 2017 17:06:25 +0000 (13:06 -0400)
committerGreg Hudson <ghudson@mit.edu>
Fri, 14 Apr 2017 16:02:56 +0000 (12:02 -0400)
src/plugins/audit/kdc_j_encode.c

index e24f4d8510665458b279c9bf942d566505304b75..265e95bc4eab6d50d556ecb616e58f7bd11e3880 100755 (executable)
@@ -861,22 +861,19 @@ tkt_to_value(krb5_ticket *tkt, k5_json_object obj,
         ret = int32_to_value(part2->session->enctype, tmp, AU_SESS_ETYPE);
         if (ret)
             goto error;
-        if (&part2->times) {
-            ret = int32_to_value(part2->times.starttime, tmp, AU_START);
-            if (ret)
-                goto error;
-            ret = int32_to_value(part2->times.endtime, tmp, AU_END);
-            if (ret)
-                goto error;
-            ret = int32_to_value(part2->times.renew_till, tmp, AU_RENEW_TILL);
-            if (ret)
-                goto error;
-            ret = int32_to_value(part2->times.authtime, tmp, AU_AUTHTIME);
-            if (ret)
-                goto error;
-        }
-        if (&part2->transited && &part2->transited.tr_contents &&
-            part2->transited.tr_contents.length > 0) {
+        ret = int32_to_value(part2->times.starttime, tmp, AU_START);
+        if (ret)
+            goto error;
+        ret = int32_to_value(part2->times.endtime, tmp, AU_END);
+        if (ret)
+            goto error;
+        ret = int32_to_value(part2->times.renew_till, tmp, AU_RENEW_TILL);
+        if (ret)
+            goto error;
+        ret = int32_to_value(part2->times.authtime, tmp, AU_AUTHTIME);
+        if (ret)
+            goto error;
+        if (part2->transited.tr_contents.length > 0) {
             ret = data_to_value(&part2->transited.tr_contents,
                                tmp, AU_TR_CONTENTS);
             if (ret)