The return type of fhandler write methods is ssize_t. Don't use an int to store the return value, use ssize_t. Use ptrdiff_t for the buffer size. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>