forked from osmocom/wireshark
Use g_str_has_suffix()
Change-Id: Ida335462efdfeef88a7afb3f27caf274632ca879 Reviewed-on: https://code.wireshark.org/review/25498 Reviewed-by: João Valverde <j@v6e.pt>
This commit is contained in:
parent
15d9ab22c3
commit
285a0f5a96
|
@ -109,7 +109,6 @@ plugins_scan_dir(GHashTable *plugins_module, const char *dirpath, plugin_type_e
|
||||||
gpointer symbol;
|
gpointer symbol;
|
||||||
const char *plug_version, *plug_release;
|
const char *plug_version, *plug_release;
|
||||||
plugin *new_plug;
|
plugin *new_plug;
|
||||||
gchar *dot;
|
|
||||||
|
|
||||||
if (append_type)
|
if (append_type)
|
||||||
plugin_folder = g_build_filename(dirpath, type_to_dir(type), (gchar *)NULL);
|
plugin_folder = g_build_filename(dirpath, type_to_dir(type), (gchar *)NULL);
|
||||||
|
@ -124,8 +123,7 @@ plugins_scan_dir(GHashTable *plugins_module, const char *dirpath, plugin_type_e
|
||||||
|
|
||||||
while ((name = g_dir_read_name(dir)) != NULL) {
|
while ((name = g_dir_read_name(dir)) != NULL) {
|
||||||
/* Skip anything but files with G_MODULE_SUFFIX. */
|
/* Skip anything but files with G_MODULE_SUFFIX. */
|
||||||
dot = strrchr(name, '.');
|
if (!g_str_has_suffix(name, "." G_MODULE_SUFFIX))
|
||||||
if (dot == NULL || strcmp(dot+1, G_MODULE_SUFFIX) != 0)
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
#if WIN32
|
#if WIN32
|
||||||
|
|
Loading…
Reference in New Issue