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:
parent
b3bd5f1b80
commit
c3779d8513
2 changed files with 2 additions and 2 deletions
|
@ -121,7 +121,7 @@ file_handler_destroy(struct file_handler *file_handler) {
|
||||||
SDL_DestroyCond(file_handler->event_cond);
|
SDL_DestroyCond(file_handler->event_cond);
|
||||||
SDL_DestroyMutex(file_handler->mutex);
|
SDL_DestroyMutex(file_handler->mutex);
|
||||||
request_queue_destroy(&file_handler->queue);
|
request_queue_destroy(&file_handler->queue);
|
||||||
SDL_free((void *) file_handler->serial);
|
SDL_free(file_handler->serial);
|
||||||
}
|
}
|
||||||
|
|
||||||
static process_t
|
static process_t
|
||||||
|
|
|
@ -21,7 +21,7 @@ struct request_queue {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct file_handler {
|
struct file_handler {
|
||||||
const char *serial;
|
char *serial;
|
||||||
SDL_Thread *thread;
|
SDL_Thread *thread;
|
||||||
SDL_mutex *mutex;
|
SDL_mutex *mutex;
|
||||||
SDL_cond *event_cond;
|
SDL_cond *event_cond;
|
||||||
|
|
Loading…
Reference in a new issue