From 59f3e4d4fb49d4a37068f933d00a97f4be856fba 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 82bbc6005..c456488ba 100644 --- a/src/host/layer23/src/common/main.c +++ b/src/host/layer23/src/common/main.c @@ -65,14 +65,6 @@ int (*l23_app_exit)(void) = NULL; int quit = 0; struct gsmtap_inst *gsmtap_inst; -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); @@ -211,7 +203,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 4627b25e4..8938e309c 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 : ""); }