diff --git a/tests/examples/ges-ui.c b/tests/examples/ges-ui.c index 1af2764ad4..249a0f29e4 100644 --- a/tests/examples/ges-ui.c +++ b/tests/examples/ges-ui.c @@ -25,7 +25,6 @@ #include #include #include -#include /* Application Data ********************************************************/ @@ -501,16 +500,16 @@ bus_message_cb (GstBus * bus, GstMessage * message, App * app) static gboolean check_time (const gchar * time) { - static regex_t re; - static gboolean compiled = FALSE; + static GRegex *re = NULL; - if (!compiled) { - compiled = TRUE; - regcomp (&re, "^[0-9][0-9]:[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?$", - REG_EXTENDED | REG_NOSUB); + if (!re) { + if (NULL == (re = + g_regex_new ("^[0-9][0-9]:[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?$", + G_REGEX_EXTENDED, 0, NULL))) + return FALSE; } - if (!regexec (&re, time, (size_t) 0, NULL, 0)) + if (g_regex_match (re, time, 0, NULL)) return TRUE; return FALSE; } diff --git a/tests/examples/thumbnails.c b/tests/examples/thumbnails.c index 2a64575f5c..601e1877ae 100644 --- a/tests/examples/thumbnails.c +++ b/tests/examples/thumbnails.c @@ -28,7 +28,6 @@ #include #include #include -#include /* GLOBAL VARIABLE */ static guint repeat = 0;