Fixed various errors/warnings reported by cppcheck:

* memory leaks
* resource leaks
* added const's to getters
* removed a few reundant conditions


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35433 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Artur Wyszynski
2010-02-08 22:50:38 +00:00
parent c0cd8cf199
commit cee04e8074
54 changed files with 153 additions and 126 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ class LinkReceiver {
virtual ~LinkReceiver(void);
void SetPort(port_id port);
port_id Port(void) { return fReceivePort; }
port_id Port(void) const { return fReceivePort; }
status_t GetNextMessage(int32& code, bigtime_t timeout = B_INFINITE_TIMEOUT);
bool HasMessages() const;
+1 -1
View File
@@ -22,7 +22,7 @@ class LinkSender {
virtual ~LinkSender(void);
void SetPort(port_id port);
port_id Port() { return fPort; }
port_id Port() const { return fPort; }
status_t StartMessage(int32 code, size_t minSize = 0);
void CancelMessage(void);
+2 -2
View File
@@ -77,10 +77,10 @@ public:
throw fError;
}
status_t Status() { return fError >= B_OK ? B_OK : fError; };
status_t Status() const { return fError >= B_OK ? B_OK : fError; };
void SetSwap(bool yesNo) { fSwap = yesNo; };
bool IsSwapping() { return fSwap; };
bool IsSwapping() const { return fSwap; };
private:
BDataIO *fStream;