(g_bookmark_file_set_title, g_bookmark_file_set_icon):
Remove some special-casing of empty string which led to
dangling pointers. (#339337, Morten Welinder)
+ (expand_exec_line): Don't use printf() needlessly, handle
+ trailing '%' gracefully. (#339338, Morten Welinder)
+ (is_element_full): Silence the compiler.
2006-04-27 Behdad Esfahbod <behdad@gnome.org>
(g_bookmark_file_set_title, g_bookmark_file_set_icon):
Remove some special-casing of empty string which led to
dangling pointers. (#339337, Morten Welinder)
+ (expand_exec_line): Don't use printf() needlessly, handle
+ trailing '%' gracefully. (#339338, Morten Welinder)
+ (is_element_full): Silence the compiler.
2006-04-27 Behdad Esfahbod <behdad@gnome.org>
const gchar *element,
const gchar sep)
{
- gchar *ns_uri, *ns_name;
- gchar *element_name, *resolved;
- gchar *p, *s;
+ gchar *ns_uri, *ns_name, *s, *resolved;
+ const gchar *p, *element_name;
gboolean retval;
g_assert (parse_data != NULL);
ch = *exec_fmt++;
switch (ch)
{
+ case '\0':
+ goto out;
case 'u':
- g_string_append_printf (exec, "%s", uri);
+ g_string_append (exec, uri);
break;
case 'f':
{
- gchar *file = g_filename_from_uri (uri, NULL, NULL);
- g_string_append_printf (exec, "%s", file);
- g_free (file);
+ gchar *file = g_filename_from_uri (uri, NULL, NULL);
+ g_string_append (exec, file);
+ g_free (file);
}
break;
case '%':
}
}
+ out:
return g_string_free (exec, FALSE);
}