# | Line 166 | Line 166 | main(int argc, const char *argv[]) | |
---|---|---|
166 | */ | |
167 | addr = mmap(NULL, file_size, PROT_READ | PROT_WRITE, | |
168 | MAP_FILE | MAP_SHARED, fd, 0); | |
169 | < | if (addr == NULL) { |
169 | > | if (addr == NULL || addr == MAP_FAILED) { |
170 | (void)fprintf(stderr, "%s: could not mmap %s: %s\n", | |
171 | progname, filename, strerror(errno)); | |
172 | exit(1); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |