aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--resolv/tst-resolv-noaaaa.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/resolv/tst-resolv-noaaaa.c b/resolv/tst-resolv-noaaaa.c
index 56b25f8..6e0c6b6 100644
--- a/resolv/tst-resolv-noaaaa.c
+++ b/resolv/tst-resolv-noaaaa.c
@@ -71,14 +71,18 @@ response (const struct resolv_response_context *ctx,
switch (qtype)
{
case T_A:
- char ipv4[4] = {192, 0, 2, i + 1};
- resolv_response_add_data (b, &ipv4, sizeof (ipv4));
+ {
+ char ipv4[4] = {192, 0, 2, i + 1};
+ resolv_response_add_data (b, &ipv4, sizeof (ipv4));
+ }
break;
case T_PTR:
- char *name = xasprintf ("ptr-%d", i);
- resolv_response_add_name (b, name);
- free (name);
+ {
+ char *name = xasprintf ("ptr-%d", i);
+ resolv_response_add_name (b, name);
+ free (name);
+ }
break;
}
resolv_response_close_record (b);