News for hackers. Stuff that matters.
Re:The abominable strtok() by dfox on Friday September 24, 2010 @05:56PM (#1725572)
I would say that the tok = calloc(); tok = strtok(something-which-is-not-in-any-way-related-to-tok) is to some extent clear sign of cargo-cult C programming and has nothing to do with good programming practices.
Re:The abominable strtok() by scott_s on Friday September 24, 2010 @06:16PM (#1725636)
I thought the complaint was that he didn't free what he malloced. On second look, yes, that's not the kind of code I want to see anywhere, pedagogical or not.