Skip to content

Commit

Permalink
fix: Now readlink compiles again.
Browse files Browse the repository at this point in the history
  • Loading branch information
takusuman committed Feb 28, 2023
1 parent 0f06f18 commit 52c2bb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readlink/readlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ int main(int argc, char *argv[]) {
* printing anything and will exit with non-zero status unless we're
* using the -f flag (flags.follow_link = 1).
*/
if (flags.follow_link){
if (flags.follow_link) {
if ( realpath(argv[0], buffer) == NULL ) {
exit(1);
}
} else
} else {
if ( (name_size = readlink(argv[0], buffer, sizeof(buffer - 1))) < 0 ) {
exit(1);
}
Expand Down

0 comments on commit 52c2bb5

Please sign in to comment.