]> 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 08:58:42 +0000 (09:58 +0100)
commit328cc40c8368a9e1f9abc92eb4d34687470e3a92
tree549a2428e2fa30347955297f848919ebb7ed7262
parentcf545d603ecd9fbacc6bd519efaa92d60f944287
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>
src/openvpn/route.c