diff --git a/daemons/cmirrord/clogd.c b/daemons/cmirrord/clogd.c index a18354784..9ba863356 100644 --- a/daemons/cmirrord/clogd.c +++ b/daemons/cmirrord/clogd.c @@ -43,14 +43,14 @@ static void usage (FILE *dest) int main(int argc, char *argv[]) { int foreground_mode = 0; - struct option longopts[] = { + static const struct option _long_options[] = { { "foreground", no_argument, NULL, 'f' }, { "help" , no_argument, NULL, 'h' }, { 0, 0, 0, 0 } }; int opt; - while ((opt = getopt_long (argc, argv, "fh", longopts, NULL)) != -1) { + while ((opt = getopt_long (argc, argv, "fh", _long_options, NULL)) != -1) { switch (opt) { case 'f': foreground_mode = 1; diff --git a/daemons/cmirrord/logging.c b/daemons/cmirrord/logging.c index 2db66f443..8f5f1726a 100644 --- a/daemons/cmirrord/logging.c +++ b/daemons/cmirrord/logging.c @@ -11,7 +11,7 @@ */ #include "logging.h" -const char *__rq_types_off_by_one[] = { +const char * const __rq_types_off_by_one[] = { "DM_ULOG_CTR", "DM_ULOG_DTR", "DM_ULOG_PRESUSPEND", diff --git a/daemons/cmirrord/logging.h b/daemons/cmirrord/logging.h index 82ebab19b..ce590b327 100644 --- a/daemons/cmirrord/logging.h +++ b/daemons/cmirrord/logging.h @@ -20,7 +20,7 @@ /* SHORT_UUID - print last 8 chars of a string */ #define SHORT_UUID(x) (strlen(x) > 8) ? ((x) + (strlen(x) - 8)) : (x) -extern const char *__rq_types_off_by_one[]; +extern const char * const __rq_types_off_by_one[]; #define RQ_TYPE(x) __rq_types_off_by_one[(x) - 1] extern int log_tabbing;