From: Russ D. <Rus...@as...> - 2004-02-05 22:16:06
|
On Thu, 2004-02-05 at 11:49, Stefan Eletzhofer wrote: > Update of /cvsroot/blob/blob/src/lib > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25457/lib > > Modified Files: > download.c > Log Message: > Remove strcmp() calls, use strncmp(). the strncmp calls were removed on purpose. Making you sit there and count the characters is error prone. strcmp in blob is just a macro: #define strcmp(s1, s2) \ (__builtin_constant_p(s1) ? strncmp(s1, s2, sizeof(s1)) : \ (__builtin_constant_p(s2) ? strncmp(s1, s2, sizeof(s2)) : \ unsafe_strcmp_call(s1, s2))) If one of the arguments is not a constant, then it will cause a link error. Otherwise, it will count the number of characters for you, and replace the call with strncmp -- Russ Dill <Rus...@as...> |