- 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
This commit is contained in:
Oliver Ruiz Dorantes 2010-01-03 22:35:18 +00:00
parent b64c9fc439
commit deac8b50fa

View File

@ -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);
}