Re: [PATCH 2/2] libblkid: reopen floppy without O_NONBLOCK

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

 



On Mon, Jan 17, 2022 at 06:46:17PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> > +{
> > +	ssize_t ssz;
> > +	char buf[PATH_MAX];
> > +	char fdpath[ sizeof(_PATH_PROC_FDDIR) +  sizeof(stringify_value(INT_MAX)) ];
> 
> Extra whitespace after '+'
> 
> Also, I think you should add +1 for '/' (you use it below), and +1 for finishing \0.

sizeof() counts also \0, it means there is space for '/' and '\0'.


Thanks, I'll fix the rest.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux