ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/user.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/s_user.c (file contents):
Revision 3214 by michael, Thu Mar 20 18:09:34 2014 UTC vs.
Revision 3215 by michael, Tue Mar 25 19:23:15 2014 UTC

# Line 297 | Line 297 | register_local_user(struct Client *sourc
297  
298    if (!IsGotId(source_p))
299    {
300 <    char username[USERLEN + 1];
300 >    char username[USERLEN + 1] = "";
301      const char *p = username;
302      unsigned int i = 0;
303  
# Line 370 | Line 370 | register_local_user(struct Client *sourc
370    /* valid user name check */
371    if (!valid_username(source_p->username, 1))
372    {
373 <    char tmpstr2[IRCD_BUFSIZE];
373 >    char tmpstr2[IRCD_BUFSIZE] = "";
374  
375      sendto_realops_flags(UMODE_REJ, L_ALL, SEND_NOTICE,
376                           "Invalid username: %s (%s@%s)",
# Line 385 | Line 385 | register_local_user(struct Client *sourc
385    if (check_xline(source_p))
386      return;
387  
388 <  while (hash_find_id((id = uid_get())) != NULL)
388 >  while (hash_find_id((id = uid_get())))
389      ;
390  
391    strlcpy(source_p->id, id, sizeof(source_p->id));
# Line 540 | Line 540 | static void
540   introduce_client(struct Client *source_p)
541   {
542    dlink_node *server_node = NULL;
543 <  char ubuf[IRCD_BUFSIZE];
543 >  char ubuf[IRCD_BUFSIZE] = "";
544  
545    if (MyClient(source_p))
546      send_umode(source_p, source_p, 0, SEND_UMODES, ubuf);
# Line 756 | Line 756 | void
756   set_user_mode(struct Client *source_p, const int parc, char *parv[])
757   {
758    unsigned int flag, setflags;
759 <  char **p, *m, buf[IRCD_BUFSIZE];
759 >  char **p, *m, buf[IRCD_BUFSIZE] = "";
760    struct Client *target_p;
761    int what = MODE_ADD, badflag = 0, i;
762  
# Line 962 | Line 962 | void
962   send_umode_out(struct Client *client_p, struct Client *source_p,
963                 unsigned int old)
964   {
965 <  char buf[IRCD_BUFSIZE] = { '\0' };
965 >  char buf[IRCD_BUFSIZE] = "";
966    dlink_node *ptr = NULL;
967  
968    send_umode(NULL, source_p, old, SEND_UMODES, buf);
# Line 1021 | Line 1021 | user_set_hostmask(struct Client *target_
1021  
1022    DLINK_FOREACH(ptr, target_p->channel.head)
1023    {
1024 <    char modebuf[4], nickbuf[NICKLEN * 3 + 3] = { '\0' };
1024 >    char modebuf[4], nickbuf[NICKLEN * 3 + 3] = "";
1025      char *p = modebuf;
1026      int len = 0;
1027      const struct Membership *ms = ptr->data;
# Line 1095 | Line 1095 | user_welcome(struct Client *source_p)
1095    sendto_one_numeric(source_p, &me, RPL_MYINFO, me.name, ircd_version, umode_buffer);
1096    show_isupport(source_p);
1097  
1098 <  if (source_p->id[0] != '\0')
1098 >  if (source_p->id[0])
1099      sendto_one_numeric(source_p, &me, RPL_YOURID, source_p->id);
1100  
1101    show_lusers(source_p);
# Line 1118 | Line 1118 | check_xline(struct Client *source_p)
1118    {
1119      ++conf->count;
1120  
1121 <    if (conf->reason != NULL)
1121 >    if (conf->reason)
1122        reason = conf->reason;
1123      else
1124        reason = CONF_NOREASON;

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)