You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.5 KiB
48 lines
1.5 KiB
Index: src/knot/zone/zone-dump-text.c |
|
--- src/knot/zone/zone-dump-text.c.orig 2012-04-17 21:31:32.000000000 +0200 |
|
+++ src/knot/zone/zone-dump-text.c 2012-04-21 10:18:01.000000000 +0200 |
|
@@ -570,7 +570,7 @@ |
|
} |
|
} |
|
|
|
-char *hex_to_string(const uint8_t *data, size_t size) |
|
+static char *my_hex_to_string(const uint8_t *data, size_t size) |
|
{ |
|
static const char hexdigits[] = { |
|
'0', '1', '2', '3', '4', '5', '6', '7', |
|
@@ -593,7 +593,7 @@ |
|
|
|
char *rdata_hex_to_string(knot_rdata_item_t item) |
|
{ |
|
- return hex_to_string(rdata_item_data(item), rdata_item_size(item)); |
|
+ return my_hex_to_string(rdata_item_data(item), rdata_item_size(item)); |
|
} |
|
|
|
char *rdata_hexlen_to_string(knot_rdata_item_t item) |
|
@@ -605,7 +605,7 @@ |
|
ret[1] = '\0'; |
|
return ret; |
|
} else { |
|
- return hex_to_string(rdata_item_data(item) + 1, |
|
+ return my_hex_to_string(rdata_item_data(item) + 1, |
|
rdata_item_size(item) - 1); |
|
} |
|
} |
|
@@ -622,7 +622,7 @@ |
|
|
|
/* String is already terminated. */ |
|
memcpy(ret, "0x", strlen("0x")); |
|
- char *converted = hex_to_string(rdata_item_data(item), |
|
+ char *converted = my_hex_to_string(rdata_item_data(item), |
|
rdata_item_size(item)); |
|
if (converted == NULL) { |
|
return NULL; |
|
@@ -912,7 +912,7 @@ |
|
snprintf(ret + strlen("\\# "), |
|
strlen("\\# ") + U16_MAX_STR_LEN + 1, "%lu ", |
|
(unsigned long) size); |
|
- char *converted = hex_to_string(rdata_item_data(item), size); |
|
+ char *converted = my_hex_to_string(rdata_item_data(item), size); |
|
strncat(ret, converted, size * 2 + 1); |
|
free(converted); |
|
return ret;
|
|
|