memzap

replay memory writes
git clone git://git.2f30.org/memzap.git
Log | Files | Refs | README | LICENSE

commit 8b34827a0692d8ecd4d176fef4c2af79a47a69b4
parent cc64bc54f09eb94a4e135ec7051f6b22f5f782ba
Author: sin <sin@2f30.org>
Date:   Sun Mar  3 21:47:12 +0000

mdiff: Inform the caller when an empty rdiff is appended

Diffstat:
mdiff.c | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/mdiff.c b/mdiff.c @@ -149,10 +149,8 @@ mdiff_append_rdiff(int fd, struct mem_region_diff *rdiff) return -EINVAL; /* If this is an empty memory region diff, just bail out */ - if (!rdiff->nmrdiffs) { - warnx("rdiff with no memory diffs, skipping"); - return 0; - } + if (!rdiff->nmrdiffs) + return -EINVAL; for (i = 0; i < rdiff->nmrdiffs; i++) { md = &rdiff->mrdiffs[i];