Compare commits
2 Commits
f3c01390b4
...
c818b3c732
Author | SHA1 | Date |
---|---|---|
Laurent Gourvenec | c818b3c732 | |
Laurent Gourvenec | 3cc9e61a62 |
2
Makefile
2
Makefile
|
@ -1,5 +1,5 @@
|
||||||
CC=clang
|
CC=clang
|
||||||
CFLAGS=-pedantic -Wall -Wextra -std=c99 -D_GNU_SOURCE -O3
|
CFLAGS=-pedantic -Wall -Wextra -std=c99 -D_GNU_SOURCE -Ofast
|
||||||
|
|
||||||
all: shorten
|
all: shorten
|
||||||
|
|
||||||
|
|
|
@ -114,8 +114,8 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
// Beginning of file?
|
// Beginning of file?
|
||||||
if (lseek(fd, 0, SEEK_CUR) == 0) {
|
if (lseek(fd, 0, SEEK_CUR) == 0) {
|
||||||
printf("No change: file does not end with a newline\n");
|
printf("No change: requested removal would leave empty file\n");
|
||||||
return 1;
|
return 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue