diff options
author | pommicket <pommicket@gmail.com> | 2023-09-10 13:47:21 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-09-10 13:47:21 -0400 |
commit | feee83bf24564212832fd113e594a17498c87c21 (patch) | |
tree | 91fb15b718f9716b7b35dd871d687fb45ac0dad0 /os.h | |
parent | 6586f9e66d87017984f57b3b4579c78897ba66f2 (diff) |
swap return 0 and -1 for process_read/socket_read
for consistency with process_write/socket_write
Diffstat (limited to 'os.h')
-rw-r--r-- | os.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -136,8 +136,8 @@ long long process_write(Process *process, const char *data, size_t size); /// /// \returns /// -2 on error\n -/// -1 if no data is available right now\n -/// 0 on end of file\n +/// -1 on end of file\n +/// 0 if no data is available right now\n /// or a positive number indicating the number of bytes read to `data` (at most `size`)\n /// This does a nonblocking read. long long process_read(Process *process, char *data, size_t size); @@ -177,8 +177,8 @@ const char *socket_get_error(Socket *socket); /// /// \returns /// -2 on error\n -/// -1 if no data is available right now\n -/// 0 on end of file\n +/// -1 on end of file\n +/// 0 if no data is available right now\n /// or a positive number indicating the number of bytes read to `data` (at most `size`)\n /// This does a nonblocking read. long long socket_read(Socket *socket, char *data, size_t size); |