Forgot to use nothrow for the allocation of the interface descriptor. Thanks

for pointing that out Stephan!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24845 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2008-04-06 20:19:38 +00:00
parent 636bff2fd2
commit 6a7b827501

View File

@ -9,8 +9,10 @@
#include <USBKit.h>
#include <usb_raw.h>
#include <unistd.h>
#include <new>
#include <string.h>
#include <unistd.h>
BUSBInterface::BUSBInterface(BUSBConfiguration *config, uint32 index, int rawFD)
@ -160,7 +162,8 @@ BUSBInterface::CountAlternates() const
usb_interface_descriptor *
BUSBInterface::AlternateAt(uint32 alternateIndex)
{
usb_interface_descriptor *descriptor = new usb_interface_descriptor;
usb_interface_descriptor *descriptor
= new(std::nothrow) usb_interface_descriptor;
if (descriptor == NULL)
return NULL;