чт, 13 февр. 2020 г. в 01:26, William Dauchy <w.dau...@criteo.com>:
> we check ns variable but we don't use it later > we "use" it. depending on true/false we either return -1 or not > > Signed-off-by: William Dauchy <w.dau...@criteo.com> > --- > src/namespace.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/namespace.c b/src/namespace.c > index 89a968e36..3536629bc 100644 > --- a/src/namespace.c > +++ b/src/namespace.c > @@ -120,7 +120,7 @@ int my_socketat(const struct netns_entry *ns, int > domain, int type, int protocol > > sock = socket(domain, type, protocol); > > - if (default_namespace >= 0 && ns && setns(default_namespace, > CLONE_NEWNET) == -1) { > + if (default_namespace >= 0 && setns(default_namespace, > CLONE_NEWNET) == -1) { > if (sock >= 0) > close(sock); > return -1; > -- > 2.25.0 > > >