From deac8b50fa4d479654c2fae382a275f0ec6385fd Mon Sep 17 00:00:00 2001 From: Oliver Ruiz Dorantes Date: Sun, 3 Jan 2010 22:35:18 +0000 Subject: [PATCH] - sizeof(TYPE) would cause problems to instantiations of the class with void type git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34883 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/bluetooth/PortListener.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/headers/private/bluetooth/PortListener.h b/headers/private/bluetooth/PortListener.h index f18ac26e7d..c9d0376b9a 100644 --- a/headers/private/bluetooth/PortListener.h +++ b/headers/private/bluetooth/PortListener.h @@ -51,15 +51,12 @@ public: } - status_t Trigger(int32 code, TYPE* buffer, size_t size = 0) + status_t Trigger(int32 code, TYPE* buffer, size_t size) { if (buffer == NULL) return B_ERROR; - if (size == 0) - return write_port(fPort, code, buffer, sizeof(TYPE)); - else - return write_port(fPort, code, buffer, size); + return write_port(fPort, code, buffer, size); }