Hi Andrei, On Fri, Sep 27, 2013 at 10:12 AM, Andrei Emeltchenko <Andrei.Emeltchenko.news@xxxxxxxxx> wrote: > +static bool is_profile(const char *profile, const char *str) > +{ > + return (strlen(str) == strlen(profile)) && > + (strncmp(profile, str, strlen(str)) == 0); > +} If you are using strlen() (which requires both strings have the '\0' terminator) anyway, why not use just: return strcmp(profile, str) == 0; Best Regards, -- Anderson Lizardo Instituto Nokia de Tecnologia - INdT Manaus - Brazil -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html