]> git.ozlabs.org Git - ccan/blobdiff - tools/manifest.c
doc: english fixup.
[ccan] / tools / manifest.c
index 762550ea4122549c00d7363b413ea657d91ae53e..9a8c4cd097d9632387032ad2366ac438e17c1d97 100644 (file)
@@ -3,6 +3,7 @@
 #include "tools.h"
 #include <ccan/str/str.h>
 #include <ccan/tal/link/link.h>
+#include <ccan/tal/grab_file/grab_file.h>
 #include <ccan/tal/path/path.h>
 #include <ccan/hash/hash.h>
 #include <ccan/htable/htable_type.h>
@@ -43,10 +44,10 @@ static struct htable_manifest *manifests;
 const char *get_ccan_file_contents(struct ccan_file *f)
 {
        if (!f->contents) {
-               f->contents = tal_grab_file(f, f->fullname,
-                                              &f->contents_size);
+               f->contents = grab_file(f, f->fullname);
                if (!f->contents)
                        err(1, "Reading file %s", f->fullname);
+               f->contents_size = tal_count(f->contents) - 1;
        }
        return f->contents;
 }
@@ -78,6 +79,8 @@ struct ccan_file *new_ccan_file(const void *ctx, const char *dir,
        f->fullname = path_join(f, dir, f->name);
        f->contents = NULL;
        f->simplified = NULL;
+       f->idempotent_cond = NULL;
+
        return f;
 }