[CRIU] [PATCH 1/7] util: Introduce strstartswith helper

Cyrill Gorcunov gorcunov at gmail.com
Thu May 8 06:27:50 PDT 2014


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.


More information about the CRIU mailing list