network: avoid temporary variables for parsing, use TAKE_PTR (#9166)
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 3 Jun 2018 02:18:23 +0000 (04:18 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 3 Jun 2018 02:18:23 +0000 (11:18 +0900)
commitaff443013640ba783c89c9032ebd5a557f2fc11e
tree44f0c03115d15efd97957979e6ce823906f47797
parent4dae3ef6c0afebcfd06d1125a18faa06f516841f
network: avoid temporary variables for parsing, use TAKE_PTR (#9166)

We don't need a temporary variable when parsing just one number, because
our parsing functions do not touch the output variable on error.

TAKE_PTR is more expressive than 'n = NULL'.
src/network/networkd-route.c