News for hackers. Stuff that matters.
Re:Android is a screwed, hard-coded, non-portable abomination. by ComputerGuru on Thursday November 05, 2009 @07:53PM (#925177)
You're replacing all spaces in a string with underscores, until you reach the end of a string or there are no spaces left...

Cool. But what does this have to do with the article? (I apologize if I'm missing something, it is 3am afterall)

Re:Android is a screwed, hard-coded, non-portable abomination. by sofal on Thursday November 05, 2009 @08:03PM (#925187)
What's the purpose of the "&& *p"? Would strchr ever return a pointer to a null terminator?
Re:Android is a screwed, hard-coded, non-portable abomination. by oipuyjhg on Thursday November 05, 2009 @08:14PM (#925205)
Yes if you pass it a pointer to a null string
Re:Android is a screwed, hard-coded, non-portable abomination. by tptacek on Thursday November 05, 2009 @08:30PM (#925232)
NULL is how strchr tells you the character you're looking for isn't present. (Yes, the *p check is also superfluous).

Kids these days.

Re:Android is a screwed, hard-coded, non-portable abomination. by jonknee on Thursday November 05, 2009 @07:59PM (#925182)
It was in the presentation.
Re:Android is a screwed, hard-coded, non-portable abomination. by tptacek on Thursday November 05, 2009 @08:21PM (#925215)
What's wrong with that code, Computer Guru? =)