mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 19:08:08 +00:00
clang-tidy readability-braces (#323)
This commit is contained in:
@ -86,7 +86,7 @@ void afl_shm_deinit(sharedmem_t *shm) {
|
||||
|
||||
#else
|
||||
shmctl(shm->shm_id, IPC_RMID, NULL);
|
||||
if (shm->cmplog_mode) shmctl(shm->cmplog_shm_id, IPC_RMID, NULL);
|
||||
if (shm->cmplog_mode) { shmctl(shm->cmplog_shm_id, IPC_RMID, NULL); }
|
||||
#endif
|
||||
|
||||
shm->map = NULL;
|
||||
@ -152,14 +152,14 @@ u8 *afl_shm_init(sharedmem_t *shm, size_t map_size, unsigned char dumb_mode) {
|
||||
|
||||
shm->shm_id = shmget(IPC_PRIVATE, map_size, IPC_CREAT | IPC_EXCL | 0600);
|
||||
|
||||
if (shm->shm_id < 0) PFATAL("shmget() failed");
|
||||
if (shm->shm_id < 0) { PFATAL("shmget() failed"); }
|
||||
|
||||
if (shm->cmplog_mode) {
|
||||
|
||||
shm->cmplog_shm_id = shmget(IPC_PRIVATE, sizeof(struct cmp_map),
|
||||
IPC_CREAT | IPC_EXCL | 0600);
|
||||
|
||||
if (shm->cmplog_shm_id < 0) PFATAL("shmget() failed");
|
||||
if (shm->cmplog_shm_id < 0) { PFATAL("shmget() failed"); }
|
||||
|
||||
}
|
||||
|
||||
@ -170,7 +170,7 @@ u8 *afl_shm_init(sharedmem_t *shm, size_t map_size, unsigned char dumb_mode) {
|
||||
fork server commands. This should be replaced with better auto-detection
|
||||
later on, perhaps? */
|
||||
|
||||
if (!dumb_mode) setenv(SHM_ENV_VAR, shm_str, 1);
|
||||
if (!dumb_mode) { setenv(SHM_ENV_VAR, shm_str, 1); }
|
||||
|
||||
ck_free(shm_str);
|
||||
|
||||
@ -178,7 +178,7 @@ u8 *afl_shm_init(sharedmem_t *shm, size_t map_size, unsigned char dumb_mode) {
|
||||
|
||||
shm_str = alloc_printf("%d", shm->cmplog_shm_id);
|
||||
|
||||
if (!dumb_mode) setenv(CMPLOG_SHM_ENV_VAR, shm_str, 1);
|
||||
if (!dumb_mode) { setenv(CMPLOG_SHM_ENV_VAR, shm_str, 1); }
|
||||
|
||||
ck_free(shm_str);
|
||||
|
||||
@ -186,13 +186,17 @@ u8 *afl_shm_init(sharedmem_t *shm, size_t map_size, unsigned char dumb_mode) {
|
||||
|
||||
shm->map = shmat(shm->shm_id, NULL, 0);
|
||||
|
||||
if (shm->map == (void *)-1 || !shm->map) PFATAL("shmat() failed");
|
||||
if (shm->map == (void *)-1 || !shm->map) { PFATAL("shmat() failed"); }
|
||||
|
||||
if (shm->cmplog_mode) {
|
||||
|
||||
shm->cmp_map = shmat(shm->cmplog_shm_id, NULL, 0);
|
||||
|
||||
if (shm->cmp_map == (void *)-1 || !shm->cmp_map) PFATAL("shmat() failed");
|
||||
if (shm->cmp_map == (void *)-1 || !shm->cmp_map) {
|
||||
|
||||
PFATAL("shmat() failed");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user