]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
splint
authorMiek Gieben <miekg@NLnetLabs.nl>
Wed, 22 Dec 2004 12:44:12 +0000 (12:44 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Wed, 22 Dec 2004 12:44:12 +0000 (12:44 +0000)
run-test1.c
str2host.c

index 9bda66bc9e642dcc85903b6ac16c6dd989477a75..9852d15c2ec6b724cf1eeddab6f161d2806218a5 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "util.h"
 
+#if 0
 static const uint8_t wire[] = {
        0xd0, 0x0e, 0x81, 0x80, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00,
        0x02, 0x03, 0x77, 0x77, 0x77, 0x0b, 0x6b, 0x61, 0x6e, 0x61, 0x72,
@@ -23,6 +24,7 @@ static const uint8_t wire[] = {
        0x00, 0x04, 0xd5, 0x85, 0x27, 0xcb, 0xc0, 0x41, 0x00, 0x01, 0x00,
        0x01, 0x00, 0x00, 0xfb, 0x2c, 0x00, 0x04, 0xd4, 0xcc, 0xdb, 0x5b
 };
+#endif 
 
 int
 main(void)
index deb8342901517e6320af82408090351fa17e07c3..e57d6447b723ca9672c0194cf13d5d161b189308 100644 (file)
@@ -70,6 +70,48 @@ zparser_conv_time(ldns_rdf *rd, const char *time)
        return LDNS_STATUS_OK;
 }
 
+#if 0
+ldns_status 
+zparser_conv_long(ldns_rdf *rd, const char *longstr)
+{
+       char *end;      /* Used to parse longs, ttls, etc.  */
+       uint16_t *r = NULL;
+       uint32_t l;
+
+       r = (uint16_t *) region_alloc(region,
+                                     sizeof(uint16_t) + sizeof(uint32_t));
+       l = htonl((uint32_t)strtol(longstr, &end, 0));
+
+       if(*end != 0) {
+               error_prev_line("Long decimal value is expected");
+        } else {
+               memcpy(r + 1, &l, sizeof(uint32_t));
+               *r = sizeof(uint32_t);
+       }
+       return r;
+}
+
+ldns_status
+zparser_conv_byte(ldns_rdf *rd, const char *bytestr)
+{
+
+       /* convert a byte value to wireformat */
+       char *end;      /* Used to parse longs, ttls, etc.  */
+       uint16_t *r = NULL;
+        r = (uint16_t *) region_alloc(region,
+                                     sizeof(uint16_t) + sizeof(uint8_t));
+
+        *((uint8_t *)(r+1)) = (uint8_t)strtol(bytestr, &end, 0);
+
+        if(*end != 0) {
+               error_prev_line("Decimal value is expected");
+        } else {
+               *r = sizeof(uint8_t);
+        }
+       return r;
+}
+
 #if 0
 
 /**
@@ -223,47 +265,6 @@ zparser_conv_period(region_type *region, const char *periodstr)
 }
 
 
-uint16_t *
-zparser_conv_long(region_type *region, const char *longstr)
-{
-       char *end;      /* Used to parse longs, ttls, etc.  */
-       uint16_t *r = NULL;
-       uint32_t l;
-
-       r = (uint16_t *) region_alloc(region,
-                                     sizeof(uint16_t) + sizeof(uint32_t));
-       l = htonl((uint32_t)strtol(longstr, &end, 0));
-
-       if(*end != 0) {
-               error_prev_line("Long decimal value is expected");
-        } else {
-               memcpy(r + 1, &l, sizeof(uint32_t));
-               *r = sizeof(uint32_t);
-       }
-       return r;
-}
-
-uint16_t *
-zparser_conv_byte(region_type *region, const char *bytestr)
-{
-
-       /* convert a byte value to wireformat */
-       char *end;      /* Used to parse longs, ttls, etc.  */
-       uint16_t *r = NULL;
-        r = (uint16_t *) region_alloc(region,
-                                     sizeof(uint16_t) + sizeof(uint8_t));
-
-        *((uint8_t *)(r+1)) = (uint8_t)strtol(bytestr, &end, 0);
-
-        if(*end != 0) {
-               error_prev_line("Decimal value is expected");
-        } else {
-               *r = sizeof(uint8_t);
-        }
-       return r;
-}
-
 uint16_t *
 zparser_conv_algorithm(region_type *region, const char *algstr)
 {