libxt_recent: Remove ineffective checks for info->name 54/290854/1
authorPhil Sutter <phil@nwl.cc>
Fri, 20 Oct 2017 11:24:36 +0000 (13:24 +0200)
committerDongkyun Son <dongkyun.s@samsung.com>
Tue, 4 Apr 2023 08:00:18 +0000 (17:00 +0900)
commitef6405d1eb48e0b7f160d5ea1febf1c755592598
tree459bc9a67f5b75e4adf7cefd8fa2b8bcebe16509
parent8f18eb6b2230d2c7968fad3d62d966b54e1d434b
libxt_recent: Remove ineffective checks for info->name

In struct xt_recent_mtinfo{,_v1}, field 'name' is an array, not a
pointer. So there is no point in comparing it against NULL. Changing the
check to make sure it's content is not an empty string is pointless
either, since a non-empty default string is used and the argument parser
will refuse empty strings as --name argument. So simply get rid of the
checks altogether.

Backport commit:
https://git.netfilter.org/iptables/commit/?id=d0e3d95fa3442c6ff32f7fed3e0d2eeb2248ef9f

Change-Id: I59efe3f354b4235c976497c1cad85b01a73cd867
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
extensions/libxt_recent.c