Get rid of duplicate const declaration specifier warning in tst-resolv-qtypes.c.
Commit Message
On Thu, Sep 7, 2017 at 12:51 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:
> H.J. Lu wrote:
>>>
>>> Why not:
>>>
>>> static const char domain[] = "www.example.com";
>>>
>>> instead, before you backport? It's simpler and less confusing.
>
>
>> If we want to do this, it should go into master branch first and
>> backport it 2.26 branch before putting in 2.25 branch. Should
>> we do it?
>
>
> Yes, that's the idea.
Here is the patch. Tested with GCC 7 on x86-64.
OK for master and 2.25/2.26 branches?
Thanks.
Comments
H.J. Lu wrote:
> OK for master and 2.25/2.26 branches?
Thanks, it looks good.
From cb99c41d24dbba967974ac6ed3d1a23dc7f66cfd Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Thu, 7 Sep 2017 13:02:36 -0700
Subject: [PATCH] Use "static const char domain[] ="
* resolv/tst-resolv-qtypes.c (domain): Changed to
"const char domain[] =".
---
resolv/tst-resolv-qtypes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -50,7 +50,7 @@ response (const struct resolv_response_context *ctx,
resolv_response_close_record (b);
}
-static const char * const domain = "www.example.com";
+static const char domain[] = "www.example.com";
static int
wrap_res_query (int type, unsigned char *answer, int answer_length)
--
2.13.5