aboutsummaryrefslogtreecommitdiffstats
path: root/loader.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-05 16:29:30 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-05 16:29:30 +0000
commitc7503d31d324862f238c4d041fd54e67ea55337d (patch)
treefbc225427acc55fe230824506414115b6d287a32 /loader.c
parent1406a1f104585b283adabf460997885c39efc473 (diff)
fix a bunch of gcc4 warnings realted to pointer signedness
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6290 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'loader.c')
-rwxr-xr-xloader.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/loader.c b/loader.c
index d03280300..4abd15b2a 100755
--- a/loader.c
+++ b/loader.c
@@ -49,7 +49,7 @@ AST_MUTEX_DEFINE_STATIC(reloadlock);
static struct module *module_list=NULL;
static int modlistver = 0;
-static char expected_key[] =
+static unsigned char expected_key[] =
{ 0x8e, 0x93, 0x22, 0x83, 0xf5, 0xc3, 0xc0, 0x75,
0xff, 0x8b, 0xa9, 0xbe, 0x7c, 0x43, 0x74, 0x63 };
@@ -85,7 +85,7 @@ static int printdigest(unsigned char *d)
return 0;
}
-static int key_matches(char *key1, char *key2)
+static int key_matches(unsigned char *key1, unsigned char *key2)
{
int match = 1;
int x;
@@ -95,12 +95,12 @@ static int key_matches(char *key1, char *key2)
return match;
}
-static int verify_key(char *key)
+static int verify_key(unsigned char *key)
{
struct MD5Context c;
- char digest[16];
+ unsigned char digest[16];
MD5Init(&c);
- MD5Update(&c, key, strlen(key));
+ MD5Update(&c, key, strlen((char *)key));
MD5Final(digest, &c);
if (key_matches(expected_key, digest))
return 0;
@@ -266,7 +266,7 @@ static int __load_resource(const char *resource_name, const struct ast_config *c
#ifdef RTLD_GLOBAL
char *val;
#endif
- char *key;
+ unsigned char *key;
char tmp[80];
if (strncasecmp(resource_name, "res_", 4)) {
@@ -356,7 +356,7 @@ static int __load_resource(const char *resource_name, const struct ast_config *c
if (m->reload == NULL)
m->reload = dlsym(m->lib, "_reload");
- if (!m->key || !(key = m->key())) {
+ if (!m->key || !(key = (unsigned char *) m->key())) {
ast_log(LOG_WARNING, "Key routine returned NULL in module %s\n", fn);
key = NULL;
errors++;