On 06/20/2012 05:20 AM, Barry deFreese wrote:
Hi again,

Here is a simple little patch to build pong2 (uses PATH_MAX).

Let me know if this looks sane.



Why not do this :

size = strlen(...) + 1;
filename = malloc(size);
#ifdef PATH_MAX
if (size > PATH_MAX)
    handle_error();
#endif
snprintf(filename, size, ...);

This avoids duplicating the whole "if (writer) ... else ..." thing, plus we do not check whether __GLIBC__ is defined. I think it would be more likely to be accepted upstream.

Cyril.


--
To UNSUBSCRIBE, email to debian-hurd-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4fe1be57.9050...@gmail.com

Reply via email to