Cannot use return value in write context

Signed-off-by: John Rayes <live627@gmail.com>