More trivial syntax and logic cleanup.

Spotted by Clang. No functional change intended.
This commit is contained in:
Augustin Cavalier 2018-12-10 19:16:19 -05:00
parent b279d6def1
commit 8844a67e90
11 changed files with 9 additions and 17 deletions

View File

@ -22,7 +22,7 @@ public:
uint32 minCountPerBlock);
~PhysicalMemoryAllocator();
status_t InitCheck() { return fStatus; };
status_t InitCheck() { return fStatus; }
status_t Allocate(size_t size,
void **logicalAddress,

View File

@ -76,7 +76,7 @@ virtual status_t NotifyPipeChange(Pipe *pipe,
static status_t AddTo(Stack *stack);
// Port operations for root hub
uint8 PortCount() { return fPortCount; };
uint8 PortCount() { return fPortCount; }
status_t GetPortStatus(uint8 index, usb_port_status *status);
status_t SetPortFeature(uint8 index, uint16 feature);
status_t ClearPortFeature(uint8 index, uint16 feature);
@ -84,7 +84,7 @@ static status_t AddTo(Stack *stack);
status_t ResetPort(uint8 index);
status_t SuspendPort(uint8 index);
virtual const char * TypeName() const { return "ehci"; };
virtual const char * TypeName() const { return "ehci"; }
private:
// Controller resets

View File

@ -34,10 +34,8 @@
//#define TRACE_TCP
#ifdef TRACE_TCP
# define TRACE(x) dprintf x
# define TRACE_BLOCK(x) dump_block x
#else
# define TRACE(x)
# define TRACE_BLOCK(x)
#endif

View File

@ -1188,7 +1188,7 @@ Interface::_ChangeAddress(RecursiveLocker& locker, InterfaceAddress* address,
/*! Searches for a specific interface by name.
You need to have the interface list's lock hold when calling this function.
*/
static struct Interface*
static Interface*
find_interface(const char* name)
{
ASSERT_LOCKED_RECURSIVE(&sLock);
@ -1206,7 +1206,7 @@ find_interface(const char* name)
/*! Searches for a specific interface by index.
You need to have the interface list's lock hold when calling this function.
*/
static struct Interface*
static Interface*
find_interface(uint32 index)
{
InterfaceList::Iterator iterator = sInterfaces.GetIterator();

View File

@ -152,8 +152,8 @@ public:
domain_datalink* DomainDatalink(net_domain* domain)
{ return DomainDatalink(domain->family); }
inline void SetBusy(bool busy) { atomic_set(&fBusy, busy ? 1 : 0); };
inline bool IsBusy() const { return atomic_get((int32*)&fBusy) == 1 ;};
inline void SetBusy(bool busy) { atomic_set(&fBusy, busy ? 1 : 0); }
inline bool IsBusy() const { return atomic_get((int32*)&fBusy) == 1 ; }
#if ENABLE_DEBUGGER_COMMANDS
void Dump() const;

View File

@ -15,7 +15,7 @@
#include <util/DoublyLinkedList.h>
class InterfaceAddress;
struct InterfaceAddress;
struct net_route_private

View File

@ -37,7 +37,6 @@
// maximum number of iovecs per request
#define MAX_IO_VECS 32 // 128 kB
#define MAX_FILE_IO_VECS 32
#define BYPASS_IO_SIZE 65536
#define LAST_ACCESSES 3

View File

@ -288,7 +288,6 @@ FileDevice::Control(void* _cookie, int32 op, void* buffer, size_t length)
case B_GET_ICON_NAME:
return user_strlcpy((char *)buffer, "devices/device-volume",
B_FILE_NAME_LENGTH);
break;
case B_GET_VECTOR_ICON:
{

View File

@ -40,11 +40,8 @@ struct rw_lock_waiter {
bool writer;
};
#define MUTEX_FLAG_OWNS_NAME MUTEX_FLAG_CLONE_NAME
#define MUTEX_FLAG_RELEASED 0x2
#define RW_LOCK_FLAG_OWNS_NAME RW_LOCK_FLAG_CLONE_NAME
int32
recursive_lock_get_recursion(recursive_lock *lock)

View File

@ -23,7 +23,6 @@
#include "MemoryManager.h"
#define DEBUG_ALLOCATOR
//#define TEST_ALL_CACHES_DURING_BOOT
static const size_t kBlockSizes[] = {

View File

@ -341,8 +341,8 @@ VMAddressSpace::_DumpCommand(int argc, char** argv)
} else {
aspace->Dump();
}
return 0;
}
return 0;
}