sha1_file: restore OBJECT_INFO_QUICK functionality
[gitweb.git] / t / helper / test-delta.c
index 4595cd6433f9fd543791ee5a8a59a9112b50c046..591730adc4f3940940fdb4691da0afb81648e353 100644 (file)
@@ -15,7 +15,7 @@
 static const char usage_str[] =
        "test-delta (-d|-p) <from_file> <data_file> <out_file>";
 
-int main(int argc, char *argv[])
+int cmd_main(int argc, const char **argv)
 {
        int fd;
        struct stat st;
@@ -69,7 +69,7 @@ int main(int argc, char *argv[])
        }
 
        fd = open (argv[4], O_WRONLY|O_CREAT|O_TRUNC, 0666);
-       if (fd < 0 || write_in_full(fd, out_buf, out_size) != out_size) {
+       if (fd < 0 || write_in_full(fd, out_buf, out_size) < 0) {
                perror(argv[4]);
                return 1;
        }