diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:09 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:09 +0000 |
commit | d239984fb4f726d03f0392f84234e18f0344f8a3 (patch) | |
tree | b7ff6b59711cf442ab6d07e8e9dee482cc6ec1df /src/users.c | |
parent | 3e6f3f6b54a0f5810f19eae853893ff8d8a9eb9b (diff) |
Various g++ fixes. Compiles, doesn't link.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1180 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/users.c')
-rw-r--r-- | src/users.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/users.c b/src/users.c index 44faaf9d5..cf794ceca 100644 --- a/src/users.c +++ b/src/users.c @@ -35,7 +35,7 @@ static User *new_user(const char *nick) { User *user, **list; - user = scalloc(sizeof(User), 1); + user = (User *)scalloc(sizeof(User), 1); if (!nick) nick = ""; strscpy(user->nick, nick, NICKMAX); @@ -111,7 +111,7 @@ void update_host(User * user) free(user->na->last_usermask); user->na->last_usermask = - smalloc(strlen(common_get_vident(user)) + + (char *)smalloc(strlen(common_get_vident(user)) + strlen(common_get_vhost(user)) + 2); sprintf(user->na->last_usermask, "%s@%s", common_get_vident(user), common_get_vhost(user)); @@ -180,7 +180,7 @@ void change_user_username(User * user, const char *username) free(user->na->last_usermask); user->na->last_usermask = - smalloc(strlen(common_get_vident(user)) + + (char *)smalloc(strlen(common_get_vident(user)) + strlen(common_get_vhost(user)) + 2); sprintf(user->na->last_usermask, "%s@%s", common_get_vident(user), common_get_vhost(user)); @@ -435,7 +435,7 @@ Uid *new_uid(const char *nick, char *uid) { Uid *u, **list; - u = scalloc(sizeof(Uid), 1); + u = (Uid *)scalloc(sizeof(Uid), 1); if (!nick || !uid) { return NULL; } @@ -750,7 +750,7 @@ User *do_nick(const char *source, char *nick, char *username, char *host, if (user->na->last_usermask) free(user->na->last_usermask); user->na->last_usermask = - smalloc(strlen(common_get_vident(user)) + + (char *)smalloc(strlen(common_get_vident(user)) + strlen(common_get_vhost(user)) + 2); sprintf(user->na->last_usermask, "%s@%s", common_get_vident(user), common_get_vhost(user)); @@ -1089,7 +1089,7 @@ char *create_mask(User * u) * will never be longer than this (and will often be shorter), thus we * can use strcpy() and sprintf() safely. */ - end = mask = smalloc(ulen + strlen(common_get_vhost(u)) + 3); + end = mask = (char *)smalloc(ulen + strlen(common_get_vhost(u)) + 3); end += sprintf(end, "%s%s@", (ulen < (*(common_get_vident(u)) == |