Commit 058d83b4 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

protobuf: Return -1 on error in do_pb_read_one

Better to stick with the convention we're trying
to follow in general -- negative codes for error.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 6b2e13fc
...@@ -575,6 +575,7 @@ int do_pb_read_one(int fd, void **pobj, int type, bool eof) ...@@ -575,6 +575,7 @@ int do_pb_read_one(int fd, void **pobj, int type, bool eof)
goto err; goto err;
} else if (ret != size) { } else if (ret != size) {
pr_perror("Read %d bytes while %d expected", ret, size); pr_perror("Read %d bytes while %d expected", ret, size);
ret = -1;
goto err; goto err;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment