Author: post
Date: 2009-12-27 18:12:44 +0100 (Sun, 27 Dec 2009)
New Revision: 2856
Modified:
trunk/librawstudio/rs-utils.c
trunk/librawstudio/rs-utils.h
Log:
Don't cast non const gchar array to const, and don't do double lookups of
buffer array.
Modified: trunk/librawstudio/rs-utils.c
===================================================================
--- trunk/librawstudio/rs-utils.c 2009-12-26 22:35:03 UTC (rev 2855)
+++ trunk/librawstudio/rs-utils.c 2009-12-27 17:12:44 UTC (rev 2856)
@@ -613,7 +613,7 @@
return glist;
}
-const gchar * rs_file_checksum(const gchar *photo)
+gchar * rs_file_checksum(const gchar *photo)
{
struct stat st;
int fd = open(photo, S_IRUSR);
@@ -625,5 +625,5 @@
int retval = read(fd, &buffer, 1024);
close(fd);
- return (const gchar *) rs_md5(&buffer);
+ return (gchar *) rs_md5(buffer);
}
Modified: trunk/librawstudio/rs-utils.h
===================================================================
--- trunk/librawstudio/rs-utils.h 2009-12-26 22:35:03 UTC (rev 2855)
+++ trunk/librawstudio/rs-utils.h 2009-12-27 17:12:44 UTC (rev 2856)
@@ -161,6 +161,6 @@
GList *
rs_split_string(const gchar *str, const gchar *delimiter);
-const gchar * rs_file_checksum(const gchar *photo);
+gchar * rs_file_checksum(const gchar *photo);
#endif /* RS_UTILS_H */
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit