From beb01ef8986c8957da74d3ca2a13d48a08277be6 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 10 Jun 2014 13:06:16 +0930 Subject: [PATCH] crcsync: use tal/grab_file in _info example. Signed-off-by: Rusty Russell --- ccan/crcsync/_info | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ccan/crcsync/_info b/ccan/crcsync/_info index 3713c777..e6d51784 100644 --- a/ccan/crcsync/_info +++ b/ccan/crcsync/_info @@ -12,7 +12,8 @@ * // Calculate checksums of file (3-arg mode) * // Or print differences between file and checksums (4+ arg mode) * #include - * #include + * #include + * #include * #include * #include * #include @@ -37,10 +38,11 @@ * errx(1, "Usage: %s ...\n" * "OR: %s ", argv[0], argv[0]); * - * file = grab_file(NULL, argv[2], &len); + * file = grab_file(NULL, argv[2]); * if (!file) * err(1, "Opening file %s", argv[2]); - * + * len = tal_count(file) - 1; + * * if (argc == 3) { * // Short form prints CRCs of file for use in long form. * used = (len + blocksize - 1) / blocksize; -- 2.39.2