Peter Maydell <peter.mayd...@linaro.org> wrote:
> On 16 March 2011 21:01, Juan Quintela <quint...@redhat.com> wrote:
>> -    ret = bind(fd, (struct sockaddr *)&saddr, sizeof(saddr));
>> +    ret = tcp_server_start(host_str, &fd);
>>     if (ret < 0) {
>> -        perror("bind");
>> +        perror("tcp_server_start");
>>         return -1;
>>     }
>
> It looks like tcp_server_start() returns an error code
> rather than setting errno, so isn't perror() wrong here?

You are right O:-)

I am not clear about what to do here.  Basically we have:
- migration code: uses DPRINTF()
- sockets: use perror() left and right.

Any good idea on what to do everywhere?

For this case, I will just put strerrno(), easy enough.

Thanks a lot, Juan.

Reply via email to