]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ipntable: No need to check and assign to parms_rta
authorPhil Sutter <phil@nwl.cc>
Thu, 17 Aug 2017 17:09:26 +0000 (19:09 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 22 Aug 2017 00:12:21 +0000 (17:12 -0700)
This variable is initialized at declaration and nowhere else does any
assignment to it happen, so just drop the check.

Signed-off-by: Phil Sutter <phil@nwl.cc>
ip/ipntable.c

index 879626ee4f491bcdd88c3d88f7f6dd60796a51b5..1837909fa42e76947b98211ee38e3ab5eed4d3c3 100644 (file)
@@ -202,8 +202,6 @@ static int ipntable_modify(int cmd, int flags, int argc, char **argv)
                        if (get_u32(&queue, *argv, 0))
                                invarg("\"queue\" value is invalid", *argv);
 
-                       if (!parms_rta)
-                               parms_rta = (struct rtattr *)&parms_buf;
                        rta_addattr32(parms_rta, sizeof(parms_buf),
                                      NDTPA_QUEUE_LEN, queue);
                        parms_change = 1;