[Rawstudio-commit] r3085 - branches/rawstudio-ng-color/src

Anders Kvist anders at kvistmail.dk
Tue Jan 26 22:45:22 CET 2010


Author: akv
Date: 2010-01-26 22:45:22 +0100 (Tue, 26 Jan 2010)
New Revision: 3085

Modified:
   branches/rawstudio-ng-color/src/rs-library.c
Log:
Removed unnessasary g_strdup()'s in rs_library_restore_tags().

Modified: branches/rawstudio-ng-color/src/rs-library.c
===================================================================
--- branches/rawstudio-ng-color/src/rs-library.c	2010-01-26 21:19:23 UTC (rev 3084)
+++ branches/rawstudio-ng-color/src/rs-library.c	2010-01-26 21:45:22 UTC (rev 3085)
@@ -1161,8 +1161,7 @@
 				photoid = rs_library_add_photo(library, filename);
 
 				val = xmlGetProp(cur, BAD_CAST "checksum");
-				identifier = g_strdup((gchar*) val);
-				xmlFree(val);
+				identifier = (gchar *) val;
 
 				cur2 = cur->xmlChildrenNode;
 				while(cur2)
@@ -1170,8 +1169,7 @@
 					if ((!xmlStrcmp(cur2->name, BAD_CAST "tag")))
 					{
 						val = xmlGetProp(cur2, BAD_CAST "name");
-						tagname = g_strdup((gchar*) val);
-						xmlFree(val);
+						tagname =(gchar*) val;
 						tagid = library_find_tag_id(library, tagname);
 						if ( tagid == -1)
 							tagid = rs_library_add_tag(library, tagname);
@@ -1182,11 +1180,11 @@
 
 						library_photo_add_tag(library, photoid, tagid, (autotag == 1));
 
-						g_free(tagname);
+						xmlFree(tagname);
 					}
 					cur2 = cur2->next;
 				}
-				g_free(identifier);
+				xmlFree(identifier);
 			}
 			g_free(filename);
 		}




More information about the Rawstudio-commit mailing list