Re: Bad function hunt

看板DFBSD_submit作者時間21年前 (2004/09/06 08:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/5 (看更多)
Andre Nathan said: > All the patches have been redone and don't touch the string-to-number > conversion functions anymore, as requested by Matt on another thread. On these patches, I have substituted every call to strcpy() by calls to strlcpy(), regardless of the fact that in some situations the source string is a constant, as in 'strcpy(foo, "blah");'. Douwe Kiela has pointed to me in private that he would prefer that copies of constant strings using strcpy() to be left untouched, to avoid bloat. I used strlcpy() everywhere for consistency, so that a single string copy function can be used everywhere. Joerg told me on IRC that I could use strlcpy(), but still it's probably a good thing to discuss it on the lists, since it can avoid a lot of repeated work later. I already have an alternative patchset, so just tell me which one do you people prefer :) Regards, Andre
文章代碼(AID): #11EwZ300 (DFBSD_submit)
文章代碼(AID): #11EwZ300 (DFBSD_submit)