1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-10 06:23:01 +03:00

tests: Use fstat instead of lstat

CID 1393878

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-08-06 09:38:59 +02:00
parent f6fe7488e3
commit 5871d604cd

View File

@@ -98,7 +98,7 @@ static void torture_sftp_fsync(void **state) {
fp = fopen(libssh_tmp_file, "r");
assert_non_null(fp);
rc = lstat(libssh_tmp_file, &sb);
rc = fstat(fileno(fp), &sb);
assert_return_code(rc, errno);
bytesread = fread(buf_verify, sizeof(buf_verify), 1, fp);