|
From: <gb...@us...> - 2008-07-10 01:31:05
|
Revision: 274
http://gearbox.svn.sourceforge.net/gearbox/?rev=274&view=rev
Author: gbiggs
Date: 2008-07-09 18:30:59 -0700 (Wed, 09 Jul 2008)
Log Message:
-----------
Removed unnecessary allocation
Modified Paths:
--------------
gearbox/trunk/src/flexiport/utils/porttoport.cpp
Modified: gearbox/trunk/src/flexiport/utils/porttoport.cpp
===================================================================
--- gearbox/trunk/src/flexiport/utils/porttoport.cpp 2008-07-10 00:56:13 UTC (rev 273)
+++ gearbox/trunk/src/flexiport/utils/porttoport.cpp 2008-07-10 01:30:59 UTC (rev 274)
@@ -138,14 +138,7 @@
}
}
else
- {
- // Allocate 1 byte each for now so we can realloc() later without a check
- if ((buffer = reinterpret_cast<uint8_t*> (malloc (1))) == NULL)
- {
- cerr << "Failed to allocate memory for buffer." << endl;
- exit (1);
- }
- }
+ buffer = NULL;
// Begin an infinite loop, checking each port for data and then sleeping a little while
while (true)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|