plugin: clarify code that deduces plugin name from file name

Make the final else branch explicit for clarity.

https://bugzilla.gnome.org/show_bug.cgi?id=783333
This commit is contained in:
Tim-Philipp Müller 2017-07-03 21:06:24 +01:00
parent c6bd520b8b
commit f29082bfe1

View file

@ -686,7 +686,7 @@ extract_symname (const char *filename)
{
gchar *bname, *name, *symname;
const gchar *dot;
gsize prefix_len = 0, len;
gsize prefix_len, len;
int i;
bname = g_path_get_basename (filename);
@ -696,11 +696,13 @@ extract_symname (const char *filename)
}
if (g_str_has_prefix (bname, "libgst"))
prefix_len += 6;
prefix_len = 6;
else if (g_str_has_prefix (bname, "lib"))
prefix_len += 3;
else if (g_str_has_prefix(bname, "gst"))
prefix_len += 3;
prefix_len = 3;
else if (g_str_has_prefix (bname, "gst"))
prefix_len = 3;
else
prefix_len = 0; /* use whole name (minus suffix) as plugin name */
dot = g_utf8_strchr (bname, -1, '.');
if (dot)