[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJE-K+BrTdtXTF6VgRzen=YVmuUgU8ktu_36nXqc2vTF=u_vLw@mail.gmail.com>
Date: Tue, 30 Sep 2025 17:27:20 +0530
From: Sidharth Seela <sidharthseela@...il.com>
To: Antonio Quartulli <antonio@...nvpn.net>
Cc: sd@...asysnail.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, horms@...nel.org, shuah@...nel.org,
willemdebruijn.kernel@...il.com, kernelxing@...cent.com, nathan@...nel.org,
nick.desaulniers+lkml@...il.com, morbo@...gle.com, justinstitt@...gle.com,
netdev@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH net v4] selftest:net: Fix uninit return values
On Tue, Sep 30, 2025 at 4:50 PM Antonio Quartulli <antonio@...nvpn.net> wrote:
> Hi,
> Thanks a lot for fixing this - I hadn't see the warnings with gcc.
I am glad, thankyou.
> ret goes uninitialized only under the "if (!sock)" condition, therefore
> I'd rather assign ret a meaningful value instead of -1.
Yes, you are right.
> How about adding "err = -ENOMEM;" directly inside the if block?
> Same here.
> ret goes uninitialized only under the "CMD_INVALID" case.
> How about adding "ret = -EINVAL;" inside the affected case?
> Both values are returned by ovpn_run_cmd() and then printed as
> strerror(-ret).
> If we blindly use -1 we will get "Operation not permitted" which will
> confuse the user IMHO.
Alright, understood, Thank you.
Sending in the changes in v5.
--
Thanks,
Sidharth Seela
www.realtimedesign.org
Powered by blists - more mailing lists