From dd9b80d60b6578eb11f84eca8fc50d1006172e6e Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 31 Jan 2023 12:21:30 +0100 Subject: [PATCH] Get rid of openbsc leftover references Get rid of the global variable since it's only used once inside a function anyway. Change-Id: I0b4f536b16f3693ef16de8505036943c3a30b1df --- src/host/layer23/src/common/main.c | 15 ++++++--------- src/host/layer23/src/mobile/main.c | 15 ++++++--------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/host/layer23/src/common/main.c b/src/host/layer23/src/common/main.c index 92a4325d0..d96e0805d 100644 --- a/src/host/layer23/src/common/main.c +++ b/src/host/layer23/src/common/main.c @@ -64,14 +64,6 @@ int (*l23_app_work)(void) = NULL; int (*l23_app_exit)(void) = NULL; int quit = 0; -const char *openbsc_copyright = - "%s" - "%s\n" - "License GPLv2+: GNU GPL version 2 or later " - "\n" - "This is free software: you are free to change and redistribute it.\n" - "There is NO WARRANTY, to the extent permitted by law.\n\n"; - static void print_usage(const char *app) { printf("Usage: %s\n", app); @@ -210,7 +202,12 @@ static void print_copyright(void) { struct l23_app_info *app; app = l23_app_info(); - printf(openbsc_copyright, + + printf("%s" + "%s\n" + "License GPLv2+: GNU GPL version 2 or later \n" + "This is free software: you are free to change and redistribute it.\n" + "There is NO WARRANTY, to the extent permitted by law.\n\n", app && app->copyright ? app->copyright : "", app && app->contribution ? app->contribution : ""); } diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 881c283f5..41baaf3e6 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -74,14 +74,6 @@ int mobile_exit(struct osmocom_ms *ms, int force); const char *debug_default = "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DMOB:DPRIM:DLUA:DGAPK"; -const char *openbsc_copyright = - "%s" - "%s\n" - "License GPLv2+: GNU GPL version 2 or later " - "\n" - "This is free software: you are free to change and redistribute it.\n" - "There is NO WARRANTY, to the extent permitted by law.\n\n"; - static void print_usage(const char *app) { printf("Usage: %s\n", app); @@ -216,7 +208,12 @@ static void print_copyright(void) { struct l23_app_info *app; app = l23_app_info(); - printf(openbsc_copyright, + + printf("%s" + "%s\n" + "License GPLv2+: GNU GPL version 2 or later \n" + "This is free software: you are free to change and redistribute it.\n" + "There is NO WARRANTY, to the extent permitted by law.\n\n", app && app->copyright ? app->copyright : "", app && app->contribution ? app->contribution : ""); }