Whitespace

This commit is contained in:
Garret Rieger 2018-02-01 17:17:36 -08:00 committed by Rod Sheeter
parent 2763a2c598
commit ede84ffa42
1 changed files with 18 additions and 18 deletions

View File

@ -15,7 +15,7 @@ main (int argc, char **argv)
int exit_code = 0; int exit_code = 0;
if (argc != 4) { if (argc != 4) {
fprintf(stderr, "Must have 4 args\n"); fprintf(stderr, "Must have 4 args\n");
exit(1); exit(1);
} }
@ -39,26 +39,26 @@ main (int argc, char **argv)
perror("Unable to fstat"); perror("Unable to fstat");
} }
if (mapped_file != MAP_FAILED) { if (mapped_file != MAP_FAILED) {
hb_blob_t *font_blob = hb_blob_create(static_cast<const char*>(mapped_file), hb_blob_t *font_blob = hb_blob_create(static_cast<const char*>(mapped_file),
stat.st_size, stat.st_size,
HB_MEMORY_MODE_READONLY, nullptr, HB_MEMORY_MODE_READONLY, nullptr,
nullptr); nullptr);
fd_out = open(argv[2], O_CREAT | O_WRONLY, S_IRWXU); fd_out = open(argv[2], O_CREAT | O_WRONLY, S_IRWXU);
if (fd_out != -1) { if (fd_out != -1) {
ssize_t bytes_written = write(fd_out, mapped_file, stat.st_size); ssize_t bytes_written = write(fd_out, mapped_file, stat.st_size);
if (bytes_written == -1) { if (bytes_written == -1) {
perror("Unable to write output file"); perror("Unable to write output file");
exit_code = 1; exit_code = 1;
} else if (bytes_written != stat.st_size) { } else if (bytes_written != stat.st_size) {
fprintf(stderr, "Wrong number of bytes written"); fprintf(stderr, "Wrong number of bytes written");
exit_code = 1;
}
} else {
perror("Unable to open output file");
exit_code = 1; exit_code = 1;
} }
} else {
perror("Unable to open output file");
exit_code = 1;
}
} }
if (mapped_file != MAP_FAILED) { if (mapped_file != MAP_FAILED) {