Tags: patch
The new_delay variable is a "struct timeval" so convert it first to float and
print it with the format string "%.2f".
The grab_delay is float: also print it with the format string "%.2f".
Common subdirectories: came-1.9.orig/debian and came-1.9/debian
diff -up came-1.9.orig/webcam.c came-1.9/webcam.c
--- came-1.9.orig/webcam.c 2008-11-01 09:47:04.000000000 +0100
+++ came-1.9/webcam.c 2008-11-01 10:07:39.000000000 +0100
@@ -39,7 +39,8 @@
#define VERSION "1.9"
void camlog(char *fmt,
- ...);
+ ...)
+ __attribute__ ((format (printf, 1, 2)));
char *ftp_host = "www";
char *ftp_user = "webcam";
@@ -1645,9 +1646,9 @@ main(int argc,
new_delay.tv_sec = 0;
new_delay.tv_usec = 0;
}
- camlog("Sleeping %d secs (corrected)\n", new_delay);
+ camlog("Sleeping %.2f secs (corrected)\n", float_timeval(new_delay));
} else {
- camlog("Sleeping %d secs\n", grab_delay);
+ camlog("Sleeping %.2f secs\n", grab_delay);
}
}
if (upload_successful && (float_timeval(new_delay) > 0))