Skip to content

Commit

Permalink
add check
Browse files Browse the repository at this point in the history
  • Loading branch information
frs69wq committed May 14, 2024
1 parent 1309ecd commit c51dabc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/File.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ namespace simgrid::module::fs {
* @param simulate_it: if true simulate the I/O, if false the I/O takes zero time
*/
sg_size_t File::write(sg_size_t num_bytes, bool simulate_it) {
if (num_bytes == 0) /* Nothing to write, return */
return 0;
int my_sequence_number = write_init_checks(num_bytes);

// Do the I/O simulation if need be
Expand Down

0 comments on commit c51dabc

Please sign in to comment.