> @@ -1,5 +1,12 @@ > 2010-11-22 Mats Erik Andersson <[email protected]> > =20 > + Partially revert changes introduced in fd64a202. > > Alas, the has says nothing for the person reading the ChangeLog.
Good point. This is for the commit. A slip! No worries; keep up the good work. > @@ -158,9 +160,7 @@ parse_opt (int key, char *arg, struct argp_state *state) > =20 > case ARGP_KEY_ARG: > host_is_given =3D true; > - host =3D gethostbyname (arg); > - if (host =3D=3D NULL) > - error (EXIT_FAILURE, 0, "unknown host"); > + hostname =3D xstrdup(arg); > > It would be useful to say what the unknown was here, i.e. use ARG in > the error message; same in the rest of the code. Space after opening > parenthesis. I do not understand the comment on "unknown". (Space _before_ parenthesis.) Eech, yes... Sorry, I'm kinda half sleeping. :-) What I meant was that: + if ((hostname =3D=3D NULL) || (*hostname =3D=3D '\0') + || getaddrinfo (hostname, NULL, &hints, &res)) + error (EXIT_FAILURE, 0, "unknown host"); should mention the "unknown" hostname (yes, it is a bug in the old code too), i.e. something like (ARG points to the string supplied): error (EXIT_FAILURE, 0, "%s: unknown host", arg); PS. Would it be possible for you to send the patches as inline-text instead of MIME attachments? I recall Simon wanting MIME attachments, but I prefer inlined-text. If it would be hard to do this, then no worries.
