Compare commits
2 Commits
c818b3c732
...
f3c01390b4
Author | SHA1 | Date |
---|---|---|
Laurent Gourvenec | f3c01390b4 | |
Laurent Gourvenec | 858a991520 |
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