[maemo-commits] [maemo-commits] r15264 - projects/haf/trunk/hildon-fm/hildon-fm

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Mar 6 18:30:49 EET 2008
Author: marivoll
Date: 2008-03-06 18:30:48 +0200 (Thu, 06 Mar 2008)
New Revision: 15264

Modified:
   projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-smb.c
Log:
	* hildon-fm/hildon-file-system-smb.c (strchr_reverse): Be more
	constant.


Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-smb.c
===================================================================
--- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-smb.c	2008-03-06 13:48:59 UTC (rev 15263)
+++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-smb.c	2008-03-06 16:30:48 UTC (rev 15264)
@@ -354,8 +354,8 @@
   return TRUE;
 }
 
-static char *
-strchr_reverse (char *front, char *start, char ch)
+static const char *
+strchr_reverse (const char *front, const char *start, char ch)
 {
   if (front == NULL)
     return NULL;
@@ -381,8 +381,8 @@
 
   const char *str = gtk_file_path_get_string (from);
   char *new_str = g_strdup (str);
-  char *last_slash = strchr_reverse (str, NULL, '/');
-  char *second_last_slash = strchr_reverse (str, last_slash, '/');
+  const char *last_slash = strchr_reverse (str, NULL, '/');
+  const char *second_last_slash = strchr_reverse (str, last_slash, '/');
 
   if (second_last_slash && new_str)
     strcpy (new_str + (second_last_slash - str) + 1, last_slash + 1);


More information about the maemo-commits mailing list