summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/datafiles.c6
-rw-r--r--src/events.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/datafiles.c b/src/datafiles.c
index 3af10b1d4..a2b210700 100644
--- a/src/datafiles.c
+++ b/src/datafiles.c
@@ -88,7 +88,7 @@ static dbFILE *open_db_read(const char *service, const char *filename)
dbFILE *f;
FILE *fp;
- f = scalloc(sizeof(*f), 1);
+ f = (dbFILE *)scalloc(sizeof(*f), 1);
if (!f) {
#ifndef NOT_MAIN
log_perror("Can't read %s database %s", service, filename);
@@ -149,7 +149,7 @@ static dbFILE *open_db_write(const char *service, const char *filename,
}
#endif
- f = scalloc(sizeof(*f), 1);
+ f = (dbFILE *)scalloc(sizeof(*f), 1);
if (!f) {
#ifndef NOT_MAIN
log_perror("Can not read %s database %s", service, filename);
@@ -534,7 +534,7 @@ int read_string(char **ret, dbFILE * f)
*ret = NULL;
return 0;
}
- s = scalloc(len, 1);
+ s = (char *)scalloc(len, 1);
if (len != fread(s, 1, len, f->fp)) {
free(s);
return -1;
diff --git a/src/events.c b/src/events.c
index 1df4dfe2d..5a3ef8450 100644
--- a/src/events.c
+++ b/src/events.c
@@ -278,7 +278,7 @@ EvtMessage *createEventHandler(char *name,
if (!func) {
return NULL;
}
- if ((evm = malloc(sizeof(EvtMessage))) == NULL) {
+ if ((evm = (EvtMessage *)malloc(sizeof(EvtMessage))) == NULL) {
fatal("Out of memory!");
}
evm->name = sstrdup(name);
@@ -300,7 +300,7 @@ EvtHook *createEventHook(char *name, int (*func) (int argc, char **argv))
if (!func) {
return NULL;
}
- if ((evh = malloc(sizeof(EvtHook))) == NULL) {
+ if ((evh = (EvtHook *)malloc(sizeof(EvtHook))) == NULL) {
fatal("Out of memory!");
}
evh->name = sstrdup(name);
@@ -406,7 +406,7 @@ int addEventHandler(EvtMessageHash * msgEvtTable[], EvtMessage * evm)
lastHash = current;
}
- if ((newHash = malloc(sizeof(EvtMessageHash))) == NULL) {
+ if ((newHash = (EvtMessageHash *)malloc(sizeof(EvtMessageHash))) == NULL) {
fatal("Out of memory");
}
newHash->next = NULL;
@@ -452,7 +452,7 @@ int addEventHook(EvtHookHash * hookEvtTable[], EvtHook * evh)
lastHash = current;
}
- if ((newHash = malloc(sizeof(EvtHookHash))) == NULL) {
+ if ((newHash = (EvtHookHash *)malloc(sizeof(EvtHookHash))) == NULL) {
fatal("Out of memory");
}
newHash->next = NULL;