[EMAIL PROTECTED] wrote:
Hi,
On Tue, Aug 19, 2008 at 03:27:06PM +0200, zhengda wrote:
- socket_t server;
+ socket_t server = MACH_PORT_NULL;
As I already said, this is unnecessary -- it will be assigned
unconditionally.
It's necessary here. If __asprintf() returns -1, the function jumps to
out, cleans up and returns. If 'server' is not initialized, it can have
any value, unless 'server' is allowed to be any value.
+ if (__asprintf (&name, "%s/%d", sock_servs, domain) < 0)
+ goto out;
Indentation seems wrong here.
(I hope this is not another tab confusion or something, but I don't
think so...)
ah, sorry.
if (domain <= max_domain)
- servers[domain] = server;
+ servers[domain] = server;
I'm not sure about this, but I think it is usually better to avoid
changing the indentation of code you haven't otherwise touched -- even
if it was wrong before...
As I remember, you asked me to fix the indentation problem...
Zheng Da