[easytag] Refactor Scan_Convert_P20_Into_Space()



commit 553ba87d0311e4e4c64f2321b5aa654df0c4ae29
Author: Santtu Lakkala <inz inz fi>
Date:   Thu Apr 10 20:20:24 2014 +0100

    Refactor Scan_Convert_P20_Into_Space()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726108

 src/scan.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/scan.c b/src/scan.c
index cc74e04..1eab0d1 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -40,15 +40,12 @@ Scan_Convert_Underscore_Into_Space (gchar *string)
 void
 Scan_Convert_P20_Into_Space (gchar *string)
 {
-    gchar *tmp, *tmp1;
+    gchar *tmp = string;
 
-    while ((tmp = strstr (string, "%20")) != NULL)
+    while ((tmp = strstr (tmp, "%20")) != NULL)
     {
-        tmp1 = tmp + 3;
         *(tmp++) = ' ';
-        while (*tmp1)
-            *(tmp++) = *(tmp1++);
-        *tmp = '\0';
+        strcpy (tmp, tmp + 2);
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]