bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] tar-1.31/lib/stdopen.c:63]: (style) Suspicious condition


From: David Binderman
Subject: Re: [Bug-tar] tar-1.31/lib/stdopen.c:63]: (style) Suspicious condition
Date: Thu, 3 Jan 2019 16:43:08 +0000

Hello there,



>That's changing the written meaning. 

Indeed. Deliberately.

The code isn't clear, so I guessed at what the code was trying to do.
I might be wrong.

As currently written, new_fd isn't a new file descriptor, it is a boolean value, even though it's type is int.
If all the code wanted was a boolean value, why bother with an int ?

I suggest looking at the code again, with a view to re-work to make it's intention clear.
Brackets and appropriate types for local variables can help make the code more close
to the original intention.

Regards

David Binderman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]