diff options
author | Christopher Haster <chaster@utexas.edu> | 2018-02-04 22:48:44 +0300 |
---|---|---|
committer | Christopher Haster <chaster@utexas.edu> | 2018-02-04 23:09:55 +0300 |
commit | 6716b5580af841c379edbdd1ba2a558ebce0cb58 (patch) | |
tree | 5aff1dde9bb2aa2e4bc2e1c8c3817672c7cefc39 /lfs.c | |
parent | 809ffde60fdadd4640acead675990757c9b762bc (diff) |
Fixed error check when truncating files to larger size
Diffstat (limited to 'lfs.c')
-rw-r--r-- | lfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1694,7 +1694,7 @@ int lfs_file_truncate(lfs_t *lfs, lfs_file_t *file, lfs_off_t size) { // flush+seek if not already at end if (file->pos != oldsize) { int err = lfs_file_seek(lfs, file, 0, SEEK_END); - if (err) { + if (err < 0) { return err; } } |