diff --git a/src/common/kernel/save.c b/src/common/kernel/save.c index e8da3d207..533410979 100644 --- a/src/common/kernel/save.c +++ b/src/common/kernel/save.c @@ -1492,7 +1492,7 @@ readfaction(FILE * F) int planes; int i = rid(F); faction * f = findfaction(i); - char * email; + char * email = NULL; if (f==NULL) { f = (faction *) calloc(1, sizeof(faction)); diff --git a/src/common/modules/arena.c b/src/common/modules/arena.c index 8a5ab0237..d488c7a07 100644 --- a/src/common/modules/arena.c +++ b/src/common/modules/arena.c @@ -348,9 +348,7 @@ guardian_faction(plane * pl, int id) f->banner = strdup("Sie dienen dem großen Wyrm"); f->passw = strdup(itoa36(rand())); f->override = strdup(itoa36(rand())); - if (set_email(&f->email, "igjarjuk@eressea.de")!=0) { - log_error(("Invalid email address: %s\n", email)); - } + set_email(&f->email, "igjarjuk@eressea.de"); f->name = strdup("Igjarjuks Kundschafter"); f->race = new_race[RC_ILLUSION]; f->age = turn; diff --git a/src/common/util/goodies.c b/src/common/util/goodies.c index 0344ca89a..ac5e73260 100644 --- a/src/common/util/goodies.c +++ b/src/common/util/goodies.c @@ -140,7 +140,7 @@ spc_email_isvalid(const char *address) { int count = 0; const char *c, *domain; - static char *rfc822_specials = "()<>@,;:\\\"[]"; + static const char *rfc822_specials = "()<>@,;:\\\"[]"; /* first we validate the name portion (name@domain) */ for (c = address; *c; c++) { @@ -188,4 +188,4 @@ set_email(char** pemail, const char *newmail) *pemail = strdup(newmail); } return 0; -} \ No newline at end of file +} diff --git a/src/mapper/map_partei.c b/src/mapper/map_partei.c index 876ff901d..8250ac526 100644 --- a/src/mapper/map_partei.c +++ b/src/mapper/map_partei.c @@ -33,7 +33,8 @@ #include /* util includes */ -#include +#include +#include #include /* libc includes */ diff --git a/src/mapper/mapper.c b/src/mapper/mapper.c index 3aee9e84e..345d68f0f 100644 --- a/src/mapper/mapper.c +++ b/src/mapper/mapper.c @@ -60,7 +60,8 @@ #include /* util includes */ -#include +#include +#include /* libc includes */ #include