Skip to content

Commit 0edc01a

Browse files
nyhwkozaczuk
authored andcommitted
tests: fix warning in tst-symlink
The compiler correctly warns that we can't fill 4097 bytes of an array size 4096 (=PATH_MAX). I don't know why this code had 4097 in the first place. The test still passes with this fix, and the warning is gone. Refs #976. Signed-off-by: Nadav Har'El <[email protected]> Message-Id: <[email protected]>
1 parent b265324 commit 0edc01a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/tst-symlink.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ int main(int argc, char **argv)
269269
report(rc < 0, "symlink");
270270
report(error == ENAMETOOLONG, "ENAMETOOLONG expected 1");
271271

272-
fill_buf(path, 4097);
272+
fill_buf(path, PATH_MAX);
273273
unlink(N1);
274274
rc = symlink(path, N1);
275275
error = errno;

0 commit comments

Comments
 (0)