From 48944eb65e1d1ced03d46121d923d9d613a480d5 Mon Sep 17 00:00:00 2001 From: "F. Aragon" Date: Wed, 21 Nov 2018 12:58:48 +0100 Subject: isisd lib ospfd pbrd python: fix empty init ISO C forbids empty initializer braces. Empty initializers have been replaced with {0} Signed-off-by: F. Aragon --- python/clidef.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'python') diff --git a/python/clidef.py b/python/clidef.py index a140ce3d5..b6eb490b6 100644 --- a/python/clidef.py +++ b/python/clidef.py @@ -67,19 +67,19 @@ class PrefixBase(RenderHandler): deref = '&' class Prefix4Handler(PrefixBase): argtype = 'const struct prefix_ipv4 *' - decl = Template('struct prefix_ipv4 $varname = { };') + decl = Template('struct prefix_ipv4 $varname = {0};') code = Template('_fail = !str2prefix_ipv4(argv[_i]->arg, &$varname);') class Prefix6Handler(PrefixBase): argtype = 'const struct prefix_ipv6 *' - decl = Template('struct prefix_ipv6 $varname = { };') + decl = Template('struct prefix_ipv6 $varname = {0};') code = Template('_fail = !str2prefix_ipv6(argv[_i]->arg, &$varname);') class PrefixEthHandler(PrefixBase): argtype = 'struct prefix_eth *' - decl = Template('struct prefix_eth $varname = { };') + decl = Template('struct prefix_eth $varname = {0};') code = Template('_fail = !str2prefix_eth(argv[_i]->arg, &$varname);') class PrefixGenHandler(PrefixBase): argtype = 'const struct prefix *' - decl = Template('struct prefix $varname = { };') + decl = Template('struct prefix $varname = {0};') code = Template('_fail = !str2prefix(argv[_i]->arg, &$varname);') # same for IP addresses. result is union sockunion. @@ -96,7 +96,7 @@ class IP4Handler(IPBase): code = Template('_fail = !inet_aton(argv[_i]->arg, &$varname);') class IP6Handler(IPBase): argtype = 'struct in6_addr' - decl = Template('struct in6_addr $varname = {};') + decl = Template('struct in6_addr $varname = {0};') code = Template('_fail = !inet_pton(AF_INET6, argv[_i]->arg, &$varname);') class IPGenHandler(IPBase): argtype = 'const union sockunion *' -- cgit v1.2.3