Clean up of code, removing some unnessesary code

Author Mitja Felicijan <mitja.felicijan@gmail.com> 2024-10-09 18:10:57 +0200
Committer Mitja Felicijan <mitja.felicijan@gmail.com> 2024-10-09 18:10:57 +0200
Commit 5c3a76fc80b8ecf296b58fe775d9f68a4c80d1fa (patch)
-rw-r--r-- main.c 6
-rw-r--r-- mutex.c 1
2 files changed, 3 insertions, 4 deletions
diff --git a/main.c b/main.c
...
21
}
21
}
22
  
22
  
23
int main(int argc, char *argv[]) {
23
int main(int argc, char *argv[]) {
24
	const char short_options[] = "lp:s:hv:";
24
	const char short_options[] = "lp:s:hv";
25
	const struct option long_options[] = {
25
	const struct option long_options[] = {
26
		{ "list", 0, NULL, 'l' },
26
		{ "list", 0, NULL, 'l' },
27
		{ "port", 1, NULL, 'p' },
27
		{ "port", 1, NULL, 'p' },
...
63
	}
63
	}
64
  
64
  
65
	if (port_name == NULL || soundfont_file == NULL) {
65
	if (port_name == NULL || soundfont_file == NULL) {
66
		fprintf(stdout, "Missing options. Check help.\n\n");
66
		fprintf(stdout, "Missing options. Check help.\n");
67
		fprintf(stdout, "Port and soundfile are required fields.\n\n");
67
		fprintf(stdout, "Port and soundfile are required fields.\n");
68
		return 1;
68
		return 1;
69
	}
69
	}
70
  
70
  
...
diff --git a/mutex.c b/mutex.c
...
4
SharedData shared_data;
4
SharedData shared_data;
5
  
5
  
6
pthread_mutex_t mutex;
6
pthread_mutex_t mutex;
7
pthread_cond_t cond_midi;
  
8
pthread_cond_t cond_synth;
7
pthread_cond_t cond_synth;
9
  
8
  
10
void initialize_mutex() {
9
void initialize_mutex() {
...