diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-03-26 11:28:38 -0500 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-03-26 11:28:38 -0500 |
commit | 27315c96a4c3d5f24a902111dae537cdc28302e4 (patch) | |
tree | 15a37bd0b596fd5eb4d026df309ee6458f6049fd /ipc/sem.c | |
parent | 309be53da60dc24b73f3f0bceab8f0707c05371f (diff) |
BUG_ON() Conversion in ipc/sem.c
this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'ipc/sem.c')
-rw-r--r-- | ipc/sem.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -227,8 +227,7 @@ asmlinkage long sys_semget (key_t key, int nsems, int semflg) | |||
227 | err = -EEXIST; | 227 | err = -EEXIST; |
228 | } else { | 228 | } else { |
229 | sma = sem_lock(id); | 229 | sma = sem_lock(id); |
230 | if(sma==NULL) | 230 | BUG_ON(sma==NULL); |
231 | BUG(); | ||
232 | if (nsems > sma->sem_nsems) | 231 | if (nsems > sma->sem_nsems) |
233 | err = -EINVAL; | 232 | err = -EINVAL; |
234 | else if (ipcperms(&sma->sem_perm, semflg)) | 233 | else if (ipcperms(&sma->sem_perm, semflg)) |
@@ -1181,8 +1180,7 @@ retry_undos: | |||
1181 | 1180 | ||
1182 | sma = sem_lock(semid); | 1181 | sma = sem_lock(semid); |
1183 | if(sma==NULL) { | 1182 | if(sma==NULL) { |
1184 | if(queue.prev != NULL) | 1183 | BUG_ON(queue.prev != NULL); |
1185 | BUG(); | ||
1186 | error = -EIDRM; | 1184 | error = -EIDRM; |
1187 | goto out_free; | 1185 | goto out_free; |
1188 | } | 1186 | } |