aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/plugins.c
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2018-01-22 08:14:41 +0000
committerJoão Valverde <j@v6e.pt>2018-01-28 21:34:05 +0000
commit285a0f5a967fd0a473611599a1677bf96038d6fe (patch)
tree350f040a2a4a041e23a4d7741ef35deb972bea7c /wsutil/plugins.c
parent15d9ab22c33ffcd02bcad33866ccd7899e2f17f0 (diff)
Use g_str_has_suffix()
Change-Id: Ida335462efdfeef88a7afb3f27caf274632ca879 Reviewed-on: https://code.wireshark.org/review/25498 Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'wsutil/plugins.c')
-rw-r--r--wsutil/plugins.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/wsutil/plugins.c b/wsutil/plugins.c
index 880be066f4..88c4fbc11d 100644
--- a/wsutil/plugins.c
+++ b/wsutil/plugins.c
@@ -109,7 +109,6 @@ plugins_scan_dir(GHashTable *plugins_module, const char *dirpath, plugin_type_e
gpointer symbol;
const char *plug_version, *plug_release;
plugin *new_plug;
- gchar *dot;
if (append_type)
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) {
/* Skip anything but files with G_MODULE_SUFFIX. */
- dot = strrchr(name, '.');
- if (dot == NULL || strcmp(dot+1, G_MODULE_SUFFIX) != 0)
+ if (!g_str_has_suffix(name, "." G_MODULE_SUFFIX))
continue;
#if WIN32