moved die function to core-misc

This commit is contained in:
Václav Šmejkal 2023-02-09 18:49:04 +01:00
parent 59b040d26e
commit dcc4198e58
Signed by: ENGO150
GPG Key ID: 4A57E86482968843
2 changed files with 9 additions and 9 deletions

View File

@ -61,15 +61,6 @@ int main(void)
return 0;
}
void die(char *exit_msg)
{
fprintf(stderr, "%s\n", exit_msg); //ERR MSG
why2_clean_memory(why2_get_default_memory_identifier()); //GARBAGE COLLECTOR
exit(1);
}
char *read_socket(int socket)
{
FILE *opened = why2_fdopen(socket, "r"); //OPEN socket

View File

@ -465,4 +465,13 @@ char *why2_generate_key(int key_length)
key[key_length] = '\0';
return key;
}
void die(char *exit_msg)
{
fprintf(stderr, "%s\n", exit_msg); //ERR MSG
why2_clean_memory(why2_get_default_memory_identifier()); //GARBAGE COLLECTOR
exit(1);
}