Re: [PATCH 1/1] RDMA/rtrs: Fix the problem of variable not initialized fully

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 20, 2023 at 02:16:20AM +0000, Zhijian Li (Fujitsu) wrote:
> 
> 
> On 19/09/2023 17:30, Leon Romanovsky wrote:
> > On Tue, Sep 19, 2023 at 04:26:54PM +0800, Zhu Yanjun wrote:
> >>
> >> 在 2023/9/19 16:17, Leon Romanovsky 写道:
> >>> On Tue, Sep 19, 2023 at 10:08:06AM +0800, Zhu Yanjun wrote:
> >>>> From: Zhu Yanjun <yanjun.zhu@xxxxxxxxx>
> >>>>
> >>>> No functionality change. The variable which is not initialized fully
> >>>> will introduce potential risks.
> >>> Are you sure about not being initialized?
> >>
> >> About this problem, I think we discussed it previously in RDMA maillist.
> >>
> >> And at that time, IIRC, you shared a link with me. The link is as below.
> >>
> >> https://www.ex-parrot.com/~chris/random/initialise.html
> >>
> >>  From what we discussed and the above link, I think it is not initialized
> >> fully.
> > 
> > I remember that discussion and it was about slightly different thing:
> > {} vs {0} in Linux kernel.
> 
> 
> Well, in my mind, I thought they are the same. see: https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html#Initializing-Structure-Members

It is GCC specific implementation, the original discussion was about C-standard.

Thanks



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux