]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Define and use macros for route addition status code
authorSelva Nair <selva.nair@gmail.com>
Sun, 15 Jan 2023 16:48:18 +0000 (11:48 -0500)
committerGert Doering <gert@greenie.muc.de>
Mon, 16 Jan 2023 09:32:51 +0000 (10:32 +0100)
commit39dd79d865daac679497d705b4bc18170d0746dc
tree8d1574364359728e5f7ced5663cfee74fedf82db
parent480ad2a84e2983e8a1b61d537cf82da5c5141853
Define and use macros for route addition status code

- Instead of 0, 1, 2 use RTA_ERROR, RTA_SUCCESS, RTA_EEXIST
  as the return code of route addition functions.

- Also fix a logging error: status -> (status == RTA_SUCCESS)

v2: fold long lines
    use "bool ret = .." pattern for android too
    fix two more lines where status was directly assigned to bool

Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20230115164818.1973210-1-selva.nair@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26041.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 328cc40c8368a9e1f9abc92eb4d34687470e3a92)
src/openvpn/route.c