Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Commit

Permalink
common/platform-linux: use "used" buffer value instead of sizeof
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Dilly <bruno.dilly@intel.com>
  • Loading branch information
bdilly committed Nov 10, 2015
1 parent a7d4334 commit 88f31b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/common/sol-platform-linux-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,8 @@ sol_mtab_cleanup(const char *mpoint)
goto finish;
}

len = write(fd, output.data, sizeof(output.data));
if (!len || len != sizeof(output.data)) {
len = write(fd, output.data, output.used);
if (!len || len != output.used) {
SOL_ERR("Could not write "SOL_MTAB_FILE " file - %s",
sol_util_strerrora(errno));
res = -errno;
Expand Down

0 comments on commit 88f31b5

Please sign in to comment.