These are patches cherry-picked from upstream - gitorious.org:colord/master.git
They are applied inline, rather than as separate patches, so that they
automatically go away once the upstream release containing them is merged in.
--- colord-0.1.30.orig/src/cd-main.c
+++ colord-0.1.30/src/cd-main.c
@@ -884,12 +884,16 @@ cd_main_get_cmdline_for_pid (guint pid)
 	/* just read the link */
 	proc_path = g_strdup_printf ("/proc/%i/cmdline", pid);
 	ret = g_file_get_contents (proc_path, &cmdline, &len, &error);
-	if (!ret || len == 0) {
+	if (!ret) {
 		g_warning ("CdMain: failed to read %s: %s",
 			   proc_path, error->message);
 		g_error_free (error);
 		goto out;
 	}
+	if (len == 0) {
+		g_warning ("CdMain: failed to read %s", proc_path);
+		goto out;
+	}
 
 	/* turn all the \0's into spaces */
 	for (i = 0; i < len; i++) {
