[CRIU] [PATCH 1/7] util: Introduce strstartswith helper
Pavel Emelyanov
xemul at parallels.com
Thu May 8 06:41:14 PDT 2014
On 05/08/2014 05:27 PM, Cyrill Gorcunov wrote:
> On Thu, May 08, 2014 at 05:23:36PM +0400, Pavel Emelyanov wrote:
>>>
>>> Don't you rather compare two strings? Why not to use strcmp here?
>>
>> Because
>>
>> strcmp("foo/bar", "foo") == false
>> strstartswith("foo/bar", "foo") == true
>>
>> :)
>
> IOW, you're comparing prefixes. OK.
>
No, I'm not.
strstartswith("foo", "foo/bar") == false
More information about the CRIU
mailing list