Make owned serial a pointer-to-non-const

The file handler owns the serial, so it needs to free it. Therefore, it
should not be a pointer-to-const.
This commit is contained in:
Romain Vimont 2019-05-24 17:24:17 +02:00
parent b3bd5f1b80
commit c3779d8513
2 changed files with 2 additions and 2 deletions

View file

@ -121,7 +121,7 @@ file_handler_destroy(struct file_handler *file_handler) {
SDL_DestroyCond(file_handler->event_cond);
SDL_DestroyMutex(file_handler->mutex);
request_queue_destroy(&file_handler->queue);
SDL_free((void *) file_handler->serial);
SDL_free(file_handler->serial);
}
static process_t

View file

@ -21,7 +21,7 @@ struct request_queue {
};
struct file_handler {
const char *serial;
char *serial;
SDL_Thread *thread;
SDL_mutex *mutex;
SDL_cond *event_cond;