From ce5ac44208adee3efb5216c7a35b436538101dd8 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 25 Oct 2007 12:27:28 +0000 Subject: Make to_uri_scheme return const string. 2007-10-25 Alexander Larsson * client/smburi.c: * common/gvfsurimapper.[ch]: Make to_uri_scheme return const string. * client/gdaemonfile.[ch]: * client/gdaemonvfs.[ch]: Add _g_daemon_vfs_mountspec_has_uri_scheme and use it to implement g_file_has_uri_scheme svn path=/trunk/; revision=994 --- client/smburi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client/smburi.c') diff --git a/client/smburi.c b/client/smburi.c index 2cdbcd8b..59b40932 100644 --- a/client/smburi.c +++ b/client/smburi.c @@ -268,15 +268,16 @@ smb_to_uri (GVfsUriMapper *mapper, return s; } -static gchar * +static const char * smb_to_uri_scheme (GVfsUriMapper *mapper, GMountSpec *spec) { const gchar *type = g_mount_spec_get_type (spec); + if (strcmp ("smb-network", type) == 0 || strcmp ("smb-server", type) == 0 || strcmp ("smb-share", type) == 0) - return g_strdup ("smb"); + return "smb"; else return NULL; } -- cgit v1.2.1