mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-02 07:58:30 +00:00
Cleanup add brace (#6545)
* Add braces after if conditions * More add braces after if conditions * Add braces after while() conditions * Fix compilation because of macro being modified * Add braces to for loop * Add braces after if/goto * Move comments up * Remove extra () in the 'return ...;' statements * More remove extra () in the 'return ...;' statements * More remove extra () in the 'return ...;' statements after merge * Fix inconsistent patterns are xxx == NULL vs !xxx * More "{}" for "if() break;" and "if() continue;" * More "{}" after if() short statement * More "{}" after "if () return;" statement * More fix inconsistent patterns are xxx == NULL vs !xxx * Revert some modificaion on SDL_RLEaccel.c * SDL_RLEaccel: no short statement * Cleanup 'if' where the bracket is in a new line * Cleanup 'while' where the bracket is in a new line * Cleanup 'for' where the bracket is in a new line * Cleanup 'else' where the bracket is in a new line
This commit is contained in:
@@ -118,7 +118,7 @@ SDL_SemTryWait_atom(SDL_sem * _sem)
|
||||
SDL_sem_atom *sem = (SDL_sem_atom *)_sem;
|
||||
LONG count;
|
||||
|
||||
if (!sem) {
|
||||
if (sem == NULL) {
|
||||
return SDL_InvalidParamError("sem");
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ SDL_SemWait_atom(SDL_sem * _sem)
|
||||
SDL_sem_atom *sem = (SDL_sem_atom *)_sem;
|
||||
LONG count;
|
||||
|
||||
if (!sem) {
|
||||
if (sem == NULL) {
|
||||
return SDL_InvalidParamError("sem");
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ SDL_SemWaitTimeout_atom(SDL_sem * _sem, Uint32 timeout)
|
||||
return SDL_SemWait_atom(_sem);
|
||||
}
|
||||
|
||||
if (!sem) {
|
||||
if (sem == NULL) {
|
||||
return SDL_InvalidParamError("sem");
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ SDL_SemValue_atom(SDL_sem * _sem)
|
||||
{
|
||||
SDL_sem_atom *sem = (SDL_sem_atom *)_sem;
|
||||
|
||||
if (!sem) {
|
||||
if (sem == NULL) {
|
||||
SDL_InvalidParamError("sem");
|
||||
return 0;
|
||||
}
|
||||
@@ -228,7 +228,7 @@ SDL_SemPost_atom(SDL_sem * _sem)
|
||||
{
|
||||
SDL_sem_atom *sem = (SDL_sem_atom *)_sem;
|
||||
|
||||
if (!sem) {
|
||||
if (sem == NULL) {
|
||||
return SDL_InvalidParamError("sem");
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ SDL_SemWaitTimeout_kern(SDL_sem * _sem, Uint32 timeout)
|
||||
int retval;
|
||||
DWORD dwMilliseconds;
|
||||
|
||||
if (!sem) {
|
||||
if (sem == NULL) {
|
||||
return SDL_InvalidParamError("sem");
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@ static Uint32
|
||||
SDL_SemValue_kern(SDL_sem * _sem)
|
||||
{
|
||||
SDL_sem_kern *sem = (SDL_sem_kern *)_sem;
|
||||
if (!sem) {
|
||||
if (sem == NULL) {
|
||||
SDL_InvalidParamError("sem");
|
||||
return 0;
|
||||
}
|
||||
@@ -361,7 +361,7 @@ static int
|
||||
SDL_SemPost_kern(SDL_sem * _sem)
|
||||
{
|
||||
SDL_sem_kern *sem = (SDL_sem_kern *)_sem;
|
||||
if (!sem) {
|
||||
if (sem == NULL) {
|
||||
return SDL_InvalidParamError("sem");
|
||||
}
|
||||
/* Increase the counter in the first place, because
|
||||
@@ -418,7 +418,7 @@ SDL_CreateSemaphore(Uint32 initial_value)
|
||||
pWaitOnAddress = (pfnWaitOnAddress) GetProcAddress(synch120, "WaitOnAddress");
|
||||
pWakeByAddressSingle = (pfnWakeByAddressSingle) GetProcAddress(synch120, "WakeByAddressSingle");
|
||||
|
||||
if(pWaitOnAddress && pWakeByAddressSingle) {
|
||||
if (pWaitOnAddress && pWakeByAddressSingle) {
|
||||
impl = &SDL_sem_impl_atom;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user