2012/8/30 <chen.ganir@ti...>: > + for (l = adapter->devices; l != NULL; l = g_slist_next(l)) > + if (g_strcmp0(device_get_path(l->data), path) == 0) > + break; what about returning l->data here instead of breaking the loop, so you don't need the following NULL check? > + > + if (!l) > + return NULL; > + > + return l->data; > +} -- Daniele Forsi -- 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