1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-13 07:03:25 +00:00

Lots of minor corrections

This commit is contained in:
Gerhard Rieger 2023-10-01 19:53:55 +02:00
parent 7d6295114b
commit 1c1a91027a
19 changed files with 197 additions and 78 deletions

View file

@ -412,8 +412,12 @@ int filan_stat(
{
char linktarget[PATH_MAX+1];
memset(linktarget, 0, PATH_MAX+1);
Readlink(filename, linktarget, PATH_MAX);
fprintf(outfile, "LINKTARGET=%s", linktarget);
if (Readlink(filename, linktarget, PATH_MAX) < 0) {
Warn3("readlink(\"%s\", linktarget, %d): %s",
filename, PATH_MAX, strerror(errno));
} else {
fprintf(outfile, "LINKTARGET=%s", linktarget);
}
}
break;
#endif /* S_IFLNK */