Fix return code of write_file()
[oweals/ucert.git] / ucert.c
diff --git a/ucert.c b/ucert.c
index 2ea939947d726a3add0762fe35e23028f36af76c..7de4c12711e861bbf1ca0e5c26c082c3e04c832a 100644 (file)
--- a/ucert.c
+++ b/ucert.c
@@ -116,13 +116,13 @@ struct cert_object {
 };
 
 /* write buffer to file */
-static int write_file(const char *filename, void *buf, size_t len, bool append) {
+static bool write_file(const char *filename, void *buf, size_t len, bool append) {
        FILE *f;
        size_t outlen;
 
        f = fopen(filename, append?"a":"w");
        if (!f)
-               return 1;
+               return false;
 
        outlen = fwrite(buf, 1, len, f);
        fclose(f);