summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorF. Aragon <paco@voltanet.io>2018-11-21 12:58:48 +0100
committerF. Aragon <paco@voltanet.io>2018-11-21 14:45:42 +0100
commit48944eb65e1d1ced03d46121d923d9d613a480d5 (patch)
tree07ecea07b2591bdcceb6b642a371e4500a3dee98 /python
parentMerge pull request #3358 from opensourcerouting/libtool-cfg-warn (diff)
downloadfrr-48944eb65e1d1ced03d46121d923d9d613a480d5.tar.xz
frr-48944eb65e1d1ced03d46121d923d9d613a480d5.zip
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 <paco@voltanet.io>
Diffstat (limited to 'python')
-rw-r--r--python/clidef.py10
1 files changed, 5 insertions, 5 deletions
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 *'