In article <[EMAIL PROTECTED]> (at Fri, 22 Jul 2005 23:09:13 +0200), Petr Baudis <[EMAIL PROTECTED]> says:
> > -} > > +#define STR_(s) # s > > +#define STR(s) STR_(s) > > Uh-huh? Why two macros? Well, why any macros at all? > : > > + char *colon, *end; > > + char *port = STR(DEFAULT_GIT_PORT); > > + struct addrinfo hints, *ai0, *ai; The macro is used here. This is trick. After preprocess, /* --- cut here --- */ #define TEST 12345 #define STR_(s) # s #define STR(s) STR_(s) test(STR(TEST)); test(STR_(TEST)); test(# TEST); /* --- cut here --- */ becomes test("12345"); test("TEST"); test(# 12345); > > if (sockfd < 0) > > die("unable to create socket (%s)", strerror(errno)); > > - if (connect(sockfd, (void *)&addr, sizeof(addr)) < 0) > > - die("unable to connect (%s)", strerror(errno)); : > You are saying that you were unable to create socket while you just were > unable to connect. Not any biggie, but it saves the user the trouble of > one strace after being confused by an error message. :-) In fact, I don't think it is really worng, because it says that it could not create (connected) socket or endpoint of connection. Anyway, I agree that it would be confusing. Better ideas / wordings? --yoshfuji - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html