diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2018-12-01 16:49:45 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2018-12-01 16:49:45 +0100 |
commit | 3e30070331b8a6f8173895a074d342c9ebf07a25 (patch) | |
tree | 886c0c61fcb7c6d81e681f3d7b7a0f14e62d9741 /python | |
parent | Merge pull request #3405 from LabNConsulting/working/master/fix-vrf (diff) | |
download | frr-3e30070331b8a6f8173895a074d342c9ebf07a25.tar.xz frr-3e30070331b8a6f8173895a074d342c9ebf07a25.zip |
Revert "isisd lib ospfd pbrd python: fix empty init"
This reverts commit 48944eb65e1d1ced03d46121d923d9d613a480d5.
We're using GNU C, not ISO C - and this commit triggers new (real)
warnings about {0} instead of bogus ones about {}.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'python')
-rw-r--r-- | python/clidef.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/python/clidef.py b/python/clidef.py index b6eb490b6..a140ce3d5 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 = {0};') + decl = Template('struct prefix_ipv4 $varname = { };') code = Template('_fail = !str2prefix_ipv4(argv[_i]->arg, &$varname);') class Prefix6Handler(PrefixBase): argtype = 'const struct prefix_ipv6 *' - decl = Template('struct prefix_ipv6 $varname = {0};') + decl = Template('struct prefix_ipv6 $varname = { };') code = Template('_fail = !str2prefix_ipv6(argv[_i]->arg, &$varname);') class PrefixEthHandler(PrefixBase): argtype = 'struct prefix_eth *' - decl = Template('struct prefix_eth $varname = {0};') + decl = Template('struct prefix_eth $varname = { };') code = Template('_fail = !str2prefix_eth(argv[_i]->arg, &$varname);') class PrefixGenHandler(PrefixBase): argtype = 'const struct prefix *' - decl = Template('struct prefix $varname = {0};') + decl = Template('struct prefix $varname = { };') 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 = {0};') + decl = Template('struct in6_addr $varname = {};') code = Template('_fail = !inet_pton(AF_INET6, argv[_i]->arg, &$varname);') class IPGenHandler(IPBase): argtype = 'const union sockunion *' |