diff options
author | Timmy Keller <tjk@tjkeller.xyz> | 2024-10-05 00:06:39 -0500 |
---|---|---|
committer | Timmy Keller <tjk@tjkeller.xyz> | 2024-10-05 00:06:39 -0500 |
commit | 9b1d5378d9ef3d6e189e4c06121370fb5b285854 (patch) | |
tree | 04109014e446c271d909b5daf0ba191768efbe71 | |
parent | 5d7278883e09d49a7dda56de4209de6d3c68a8c3 (diff) | |
download | pavolctld-9b1d5378d9ef3d6e189e4c06121370fb5b285854.tar.xz pavolctld-9b1d5378d9ef3d6e189e4c06121370fb5b285854.zip |
enable -Ofast optimizations and exit when recieve null stdin which fixes the bugs in awesomewm and causes it to exit after a refresh
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | pavolctld.c | 6 |
2 files changed, 3 insertions, 7 deletions
@@ -1,7 +1,5 @@ -# Makefile for gpt program - CC = gcc -CFLAGS = -Wall +CFLAGS = -Wall -Ofast LDFLAGS = -lpulse TARGET = pavolctld diff --git a/pavolctld.c b/pavolctld.c index 2e6d13d..a4e108b 100644 --- a/pavolctld.c +++ b/pavolctld.c @@ -138,10 +138,8 @@ int main() { // main loop pa_threaded_mainloop_start(mainloop); - while(1) { - if (fgets(stdin_buffer, sizeof(stdin_buffer), stdin) != NULL) - handle_command(context, stdin_buffer); - } + while (fgets(stdin_buffer, sizeof(stdin_buffer), stdin) != NULL) + handle_command(context, stdin_buffer); // clean up pa_context_disconnect(context); |