fix some
This commit is contained in:
+2
-2
@@ -28,14 +28,14 @@ com_std_fd com_std_open(char const *path, uint32_t flags) {
|
||||
}
|
||||
|
||||
bool com_std_write(com_std_fd fd, void const *data, uint32_t bytes) {
|
||||
com_std_assert(fd != NULL && data != NULL && bytes != 0);
|
||||
com_std_assert(data != NULL && bytes != 0);
|
||||
bool s = fwrite(data, 1, bytes, fd) == bytes;
|
||||
fflush(fd);
|
||||
return s;
|
||||
}
|
||||
|
||||
int32_t com_std_read(com_std_fd fd, void *data, uint32_t upto) {
|
||||
com_std_assert(fd != NULL && data != NULL && upto != 0);
|
||||
com_std_assert(data != NULL && upto != 0);
|
||||
return fread(data, 1, upto, fd);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user