<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40028 >

Jason Short wrote:
> Here is a quick and partial fix.  I assume that strerror() is one of the
> most common offending functions, so I quickly went through and converted
> all mystrerror users in client/ and server/ directories to use the
> newly-written L_(). 

Now, I find this irritating on a number of levels.

1) This ticket was already patched and resolved.  Another new ticket would
be better.  I'll open one.

2) Madeline reported the problem was in mystrerror(), so that's a good
target, but the solution would be to patch mystrerror(), not repeatedly
patch every invocation....  This is *all* users!

3) By definition, mystrerror() can only be called once, so there's no
technical reason to use a dynamic buffer.

4) I really hate L_() hiding a simple single function.  There's no excuse.
This makes the code harder to read and harder to grep.

5) The parameter order doesn't match either cat_snprintf() or strlcat(),
or any standard C invocation.  By convention, the destination buffer is
always the first parameter.

Freeciv-dev mailing list

Reply via email to