aboutsummaryrefslogtreecommitdiffstats
path: root/pseudo_util.c
diff options
context:
space:
mode:
authorseebs <seebs@seebs-eee.(none)>2010-08-12 18:01:55 -0500
committerseebs <seebs@seebs-eee.(none)>2010-08-12 18:01:55 -0500
commitd30de158c1986d2161647629f279018702a42750 (patch)
treee3d4e70abddd61108533ea4dd87209f563f2c9c5 /pseudo_util.c
parenta05e23b738edfd2304863605cce84a7eb64b00df (diff)
downloadpseudo-d30de158c1986d2161647629f279018702a42750.tar.gz
pseudo-d30de158c1986d2161647629f279018702a42750.tar.bz2
pseudo-d30de158c1986d2161647629f279018702a42750.zip
Whoops, const really does mean read-only on some targets.
Diffstat (limited to 'pseudo_util.c')
-rw-r--r--pseudo_util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pseudo_util.c b/pseudo_util.c
index b44f000..bff33f1 100644
--- a/pseudo_util.c
+++ b/pseudo_util.c
@@ -33,10 +33,10 @@
#include "pseudo_ipc.h"
#include "pseudo_db.h"
-/* The order below is not arbitrary, but based on the assumption
+/* The order below is not arbitrary, but based on an assumption
* of how often things will be used.
*/
-const struct pseudo_variables pseudo_env[] = {
+static struct pseudo_variables pseudo_env[] = {
{ "PSEUDO_PREFIX", 13, NULL },
{ "PSEUDO_BINDIR", 13, NULL },
{ "PSEUDO_LIBDIR", 13, NULL },
@@ -67,7 +67,7 @@ int _in_init = -1; /* Not yet run */
static void _libpseudo_init(void) __attribute__ ((constructor));
-void dump_env(char **envp) {
+static void dump_env(char **envp) {
size_t i = 0;
for (i = 0; envp[i]; i++) {
pseudo_debug(0,"dump_envp: [%d]%s\n", i,envp[i]);
@@ -116,9 +116,9 @@ int pseudo_set_value(const char * key, const char * value) {
if (pseudo_env[i].key) {
if (pseudo_env[i].value) free(pseudo_env[i].value);
if (value)
- ((struct pseudo_variables *)pseudo_env)[i].value = strdup(value);
+ pseudo_env[i].value = strdup(value);
else
- ((struct pseudo_variables *)pseudo_env)[i].value = NULL;
+ pseudo_env[i].value = NULL;
} else {
if (!_in_init) pseudo_diag("Unknown variable %s.\n", key);
rc = -EINVAL;