Don't seek fd if no -S <offset> was specified
This commit is contained in:
parent
904479bc1a
commit
ab3d77418c
1 changed files with 1 additions and 1 deletions
2
tftp.c
2
tftp.c
|
@ -359,7 +359,7 @@ ssize_t tftp_put(struct nmrpd_args *args)
|
||||||
file_remote = args->file_local;
|
file_remote = args->file_local;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lseek(fd, args->offset, SEEK_SET) == (off_t)-1) {
|
if (args->offset && (lseek(fd, args->offset, SEEK_SET) == (off_t)-1)) {
|
||||||
xperror("lseek");
|
xperror("lseek");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue