fix warning valgrind and use infinite loop

This commit is contained in:
rick 2022-12-18 19:58:04 +01:00
parent e97e5f5009
commit b8abbfc5a6
Signed by: Rick
GPG key ID: 4A6223D66294EB20
2 changed files with 2 additions and 2 deletions

View file

@ -65,7 +65,7 @@ int listen(FILE *file)
pthread_cleanup_push(cancel_read_events, init_args_read(fd, user_event, display));
while (!(left && right))
while (1)
{
/* Read Mouse */
bytes = read(fd, data, sizeof(data));

View file

@ -11,7 +11,7 @@
ui_infos * init_ui(char *name)
{
ui_infos *ret = (ui_infos *) malloc(sizeof(ui_infos));
ret->name = (char *) malloc(strlen(name));
ret->name = (char *) malloc(strlen(name) + 1);
strcpy(ret->name, name);
ret->file = fopen(name, "w+");
ret->is_recording = 0;