Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CONFIG *config_create_array(CONFIG *pas_head, const unsigned int size)
- {
- char log[ECRO_STD_LOG_SIZE];
- pas_head = (CONFIG *) malloc(size * sizeof(CONFIG)); // allocation dymanique
- if (pas_head == NULL) // si tête tableau non vide
- {
- memset(log, '\0', ECRO_STD_LOG_SIZE); // initialisation de la chaine de caractère
- snprintf(log, ECRO_STD_LOG_SIZE, "-d E 1 %s CONFIG type memory allocation failure", ecro_std_prog_name); // élaboration de la trame d'évènement
- write_log(log); // écriture dans les fichiers d'événements
- pthread_mutex_lock(&mutex_main_return); // verrouillage du mutex
- g_main_return = -3;
- pthread_mutex_unlock(&mutex_main_return); // verrouillage du mutex
- }
- config_init_array(pas_head, size);
- return pas_head;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement