diff --git a/Makefile b/Makefile index d81685d..399c861 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ regen: $(PROG): $(SOURCES:.c=.o) - $(info -- LINKING $@) + $(info -- LD $@) @ $(CC) $(SOURCES:.c=.o) -o $@ $(LDFLAGS) $(LIBS) $(info ===== Build complete =====) $(info == CC = $(CC)) diff --git a/src/main.c b/src/main.c index 5d4c495..9f1ab19 100644 --- a/src/main.c +++ b/src/main.c @@ -44,12 +44,12 @@ #endif -struct main_context_t { +struct _main_context_t { struct stream_t *stream; struct http_server_t *server; }; -static struct main_context_t *_ctx; +static struct _main_context_t *_ctx; static void _block_thread_signals(void) { sigset_t mask; @@ -123,7 +123,7 @@ int main(int argc, char *argv[]) { pthread_t stream_loop_tid; pthread_t server_loop_tid; - struct main_context_t ctx; + struct _main_context_t ctx; ctx.stream = stream; ctx.server = server; diff --git a/src/options.c b/src/options.c index a67ad48..7de481f 100644 --- a/src/options.c +++ b/src/options.c @@ -264,9 +264,8 @@ int parse_options(int argc, char *argv[], struct device_t *dev, struct encoder_t int ch; int short_index; int opt_index; - char short_opts[1024]; + char short_opts[1024] = {0}; - memset(short_opts, 1024, 1); for (short_index = 0, opt_index = 0; _LONG_OPTS[opt_index].name != NULL; ++opt_index) { if (isalpha(_LONG_OPTS[opt_index].val)) { short_opts[short_index] = _LONG_OPTS[opt_index].val;