]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
review #5: c is data[src_pos]
authorMatthijs Mekking <matje@NLnetLabs.nl>
Wed, 2 Mar 2011 11:26:19 +0000 (11:26 +0000)
committerMatthijs Mekking <matje@NLnetLabs.nl>
Wed, 2 Mar 2011 11:26:19 +0000 (11:26 +0000)
Accidently, the other review parts were committed on the review #2 commit:

review #3: Update changelog with create nsec3 fix
review #4: be consistent when printing ldns_calc_keytag() (made all %u and casted to (unsigned int))

host2str.c

index 75e3547a47faddd9d757fab4941120342c0a5829..6942f6aa3c93965d7c67551d7521999fcbd477f2 100644 (file)
@@ -279,9 +279,9 @@ ldns_rdf2buffer_str_dname(ldns_buffer *output, const ldns_rdf *dname)
                                   characters in dnames
                                */
                                c = (unsigned char) data[src_pos];
-                               if(data[src_pos]=='.' || data[src_pos]==';' ||
-                                  data[src_pos]=='(' || data[src_pos]==')' ||
-                                  data[src_pos]=='\\') {
+                               if(c == '.' || c == ';' ||
+                                  c == '(' || c == ')' ||
+                                  c == '\\') {
                                        ldns_buffer_printf(output, "\\%c",
                                                        data[src_pos]);
                                } else if (!(isascii(c) && isgraph(c))) {