};
SEM *sem_init(int init_value) {
- SEM *sem = (SEM *)malloc(sizeof(SEM));
+ SEM *sem = malloc(sizeof(*sem));
if (NULL == sem) {
return NULL;
}
initialize_gnutls();
/* Spawn worker threads to handle requests. */
- threads = (pthread_t *)malloc(thread_count * sizeof(pthread_t));
+ threads = malloc(thread_count * sizeof(*threads));
if (NULL == threads) {
perror("thread malloc failed");
return EXIT_FAILURE;
errno = pthread_join(threads[i], NULL);
if (0 != errno) {
perror("pthread_join()");
- continue;
}
}