summaryrefslogtreecommitdiff
path: root/libitm/dispatch.h
diff options
context:
space:
mode:
Diffstat (limited to 'libitm/dispatch.h')
-rw-r--r--libitm/dispatch.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libitm/dispatch.h b/libitm/dispatch.h
index d059c493507d..6a9e62ef6c0d 100644
--- a/libitm/dispatch.h
+++ b/libitm/dispatch.h
@@ -102,11 +102,13 @@
virtual void memtransfer(void *dst, const void* src, size_t size, \
bool may_overlap, ls_modifier dst_mod, ls_modifier src_mod) \
{ \
- memtransfer_static(dst, src, size, may_overlap, dst_mod, src_mod); \
+ if (size > 0) \
+ memtransfer_static(dst, src, size, may_overlap, dst_mod, src_mod); \
} \
virtual void memset(void *dst, int c, size_t size, ls_modifier mod) \
{ \
- memset_static(dst, c, size, mod); \
+ if (size > 0) \
+ memset_static(dst, c, size, mod); \
}
#define CREATE_DISPATCH_METHODS_MEM_PV() \