On Tue, Dec 14, 2010 at 2:20 PM, Lukasz Pawlik <lucas.pawlik@xxxxxxxxx> wrote: > Hi, > >> If somebody can explain what that code is supposed to do, then writing a >> glib-ish version should be trivial, without having to duplicate the >> contents again. Then again, using something like: >> g_mapped_file_new (); >> g_strsplit (); >> g_mapped_file_unref (); > > That won't fix anything since g_mapped_file_new uses mmap function so > contents may not be zero-terminated and we want use string function > next. What about using g_strstr_len() instead of strpbrk() on the original code? See http://library.gnome.org/devel/glib/unstable/glib-String-Utility-Functions.html#g-strstr-len Regards, -- Anderson Lizardo OpenBossa Labs - 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