On Mon, 04 Mar 2013 20:48:28 -0800 Lee Duncan <lduncan@xxxxxxxx> wrote: > > > On 03/04/2013 06:59 PM, FUJITA Tomonori wrote: >> On Mon, 04 Mar 2013 18:34:21 -0800 >> Lee Duncan <lduncan@xxxxxxxx> wrote: >> >>> >>> >>> On 03/04/2013 06:04 PM, FUJITA Tomonori wrote: >>>> On Mon, 4 Mar 2013 15:15:57 -0800 >>>> Lee Duncan <lduncan@xxxxxxxx> wrote: >>>> >>>>> This strips off the "%ZONEID" that can be at the end of IPv6 >>>> >>>> 'Can' means that possibly the string doesn't exist, right? The >>>> following code works in such case? >>> >>> Yes, correct. The strsep() only puts a NULL in the string if it finds >>> any tokens from the supplied list, "%" in this case. Otherwise, the >>> string is untouched. >> >> Hmm, looks like the man page says different >> >> https://www.kernel.org/doc/man-pages/online/pages/man3/strsep.3.html >> >> In case no delimiter was found, the token is taken to be the entire >> string *stringp, and *stringp is made NULL. >> > > No, that's just poorly worded. They mean that after the whole token, > which is the whole string in this case, they put a NULL. Funny, because > it had better already be a NULL! Ah, I see. I've applied the patch. Thanks, -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html