static const char *btrfs_cmd(void)
{
- const char *btrfs_paths[] = {"/sbin/btrfs",
+ const char *const btrfs_paths[] = {"/sbin/btrfs",
"/bin/btrfs", "/usr/sbin/btrfs", "/usr/bin/btrfs", NULL};
const char *p;
int i;
/*@null@*/char **newenvp = NULL;
extern char **environ;
-static const char *forbid[] = {
+static const char *const forbid[] = {
"_RLD_=",
"BASH_ENV=", /* GNU creeping featurism strikes again... */
"ENV=",
/* these are allowed, but with no slashes inside
(to work around security problems in GNU gettext) */
-static const char *noslash[] = {
+static const char *const noslash[] = {
"LANG=",
"LANGUAGE=",
"LC_", /* anything with the LC_ prefix */
noname++;
addenv (variable, *argv);
} else {
- const char **p;
+ const char *const *p;
for (p = forbid; NULL != *p; p++) {
if (strncmp (*argv, *p, strlen (*p)) == 0) {
void sanitize_env (void)
{
char **envp = environ;
- const char **bad;
+ const char *const *bad;
char **cur;
char **move;
const struct pam_message **msg,
struct pam_response **resp,
unused void *appdata_ptr);
-static struct pam_conv non_interactive_pam_conv = {
+static const struct pam_conv non_interactive_pam_conv = {
ni_conv,
NULL
};
* for now we allow just one format, but we can define more later
* (we try them all until one succeeds). --marekm
*/
-static char *date_formats[] = {
+static const char *const date_formats[] = {
"%Y-%m-%d",
(char *) 0
};
* current month, and the cumulative number of days in the preceding
* months. they are declared so that january is 1, not 0.
*/
-static short days[13] = { 0,
+static const short days[13] = { 0,
31, 28, 31, 30, 31, 30, /* JAN - JUN */
31, 31, 30, 31, 30, 31
}; /* JUL - DEC */
-static short juldays[13] = { 0,
+static const short juldays[13] = { 0,
0, 31, 59, 90, 120, 151, /* JAN - JUN */
181, 212, 243, 273, 304, 334
}; /* JUL - DEC */
{
#ifdef HAVE_STRPTIME
struct tm tp;
- char *const *fmt;
+ const char *const *fmt;
char *cp;
time_t result;