chiark / gitweb /
resolved: make sure we always initialize r when parsing TXT records
authorLennart Poettering <lennart@poettering.net>
Thu, 31 Jul 2014 16:02:42 +0000 (18:02 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 31 Jul 2014 16:23:34 +0000 (18:23 +0200)
src/resolve/resolved-dns-packet.c

index 5d4e097..05c62a4 100644 (file)
@@ -524,6 +524,7 @@ int dns_packet_append_rr(DnsPacket *p, const DnsResourceRecord *rr, size_t *star
                                 goto fail;
                 }
 
+                r = 0;
                 break;
         }
 
@@ -977,7 +978,9 @@ int dns_packet_read_rr(DnsPacket *p, DnsResourceRecord **ret, size_t *start) {
                         r = strv_consume(&rr->txt.strings, s);
                         if (r < 0)
                                 goto fail;
-                };
+                }
+
+                r = 0;
                 break;
         }