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.
pull/553/head
Romain Vimont 5 years ago
parent b3bd5f1b80
commit c3779d8513

@ -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

@ -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;

Loading…
Cancel
Save