diff --git a/src/dir-util.cpp b/src/dir-util.cpp
index 6beff22bf4c432cfdd5651455a4de48778b02b8e..67db036281324512c3d54df1155614ed73e7d284 100644 (file)
--- a/src/dir-util.cpp
+++ b/src/dir-util.cpp
return (NULL);
}
-void
-prepend_current_dir_if_relative (char **result, const gchar *uri)
+gchar *
+prepend_current_dir_if_relative(gchar const *uri)
{
if (!uri) {
- *(result) = NULL;
- return;
+ return NULL;
}
- char *full_path = (char *) g_malloc (1001);
- char *cwd = g_get_current_dir();
+ gchar *full_path = (gchar *) g_malloc (1001);
+ gchar *cwd = g_get_current_dir();
gsize bytesRead = 0;
gsize bytesWritten = 0;
&error);
inkscape_rel2abs (uri, cwd_utf8, full_path, 1000);
- *(result) = g_strdup (full_path);
+ gchar *ret = g_strdup (full_path);
g_free (full_path);
g_free (cwd);
+ return ret;
}