Re: [PATCH v2 02/21] clone: use xfopen() instead of fopen()

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

 



Hi Duy,

On Wed, 3 May 2017, Nguyễn Thái Ngọc Duy wrote:

> This code uses the result FILE pointer right away without the NULL
> check. Let's use xfopen() and die if we could not open the file. That's
> still better than crashing,
> 
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>

While funny to read, maybe it would be better to spell it out clearly:

	copy_alternates() called fopen() without handling errors. By
	switching to xfopen(), this bug is fixed.

Ciao,
Dscho

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]