summaryrefslogtreecommitdiff
path: root/os.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-09-10 13:47:21 -0400
committerpommicket <pommicket@gmail.com>2023-09-10 13:47:21 -0400
commitfeee83bf24564212832fd113e594a17498c87c21 (patch)
tree91fb15b718f9716b7b35dd871d687fb45ac0dad0 /os.h
parent6586f9e66d87017984f57b3b4579c78897ba66f2 (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.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/os.h b/os.h
index bb52d63..4769063 100644
--- a/os.h
+++ b/os.h
@@ -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);