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

Comparing ircd-hybrid/trunk/src/conf_parser.y (file contents):
Revision 3442 by michael, Thu May 1 18:30:41 2014 UTC vs.
Revision 3443 by michael, Thu May 1 18:36:53 2014 UTC

# Line 681 | Line 681 | serverinfo_network_name: NETWORK_NAME '=
681    {
682      char *p;
683  
684 <    if ((p = strchr(yylval.string, ' ')) != NULL)
684 >    if ((p = strchr(yylval.string, ' ')))
685        p = '\0';
686  
687      MyFree(ServerInfo.network_name);
# Line 714 | Line 714 | serverinfo_vhost: VHOST '=' QSTRING ';'
714        ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost(%s)", yylval.string);
715      else
716      {
717 <      assert(res != NULL);
717 >      assert(res);
718  
719        memcpy(&ServerInfo.ip, res->ai_addr, res->ai_addrlen);
720        ServerInfo.ip.ss.ss_family = res->ai_family;
# Line 743 | Line 743 | serverinfo_vhost6: VHOST6 '=' QSTRING ';
743        ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost6(%s)", yylval.string);
744      else
745      {
746 <      assert(res != NULL);
746 >      assert(res);
747  
748        memcpy(&ServerInfo.ip6, res->ai_addr, res->ai_addrlen);
749        ServerInfo.ip6.ss.ss_family = res->ai_family;
# Line 763 | Line 763 | serverinfo_max_clients: T_MAX_CLIENTS '=
763  
764    if ($3 < MAXCLIENTS_MIN)
765    {
766 <    char buf[IRCD_BUFSIZE];
766 >    char buf[IRCD_BUFSIZE] = "";
767  
768      snprintf(buf, sizeof(buf), "MAXCLIENTS too low, setting to %d", MAXCLIENTS_MIN);
769      conf_error_report(buf);
# Line 771 | Line 771 | serverinfo_max_clients: T_MAX_CLIENTS '=
771    }
772    else if ($3 > MAXCLIENTS_MAX)
773    {
774 <    char buf[IRCD_BUFSIZE];
774 >    char buf[IRCD_BUFSIZE] = "";
775  
776      snprintf(buf, sizeof(buf), "MAXCLIENTS too high, setting to %d", MAXCLIENTS_MAX);
777      conf_error_report(buf);
# Line 793 | Line 793 | serverinfo_max_nick_length: MAX_NICK_LEN
793    }
794    else if ($3 > NICKLEN)
795    {
796 <    char buf[IRCD_BUFSIZE];
796 >    char buf[IRCD_BUFSIZE] = "";
797  
798      snprintf(buf, sizeof(buf), "max_nick_length too high, setting to %d", NICKLEN);
799      conf_error_report(buf);
# Line 815 | Line 815 | serverinfo_max_topic_length: MAX_TOPIC_L
815    }
816    else if ($3 > TOPICLEN)
817    {
818 <    char buf[IRCD_BUFSIZE];
818 >    char buf[IRCD_BUFSIZE] = "";
819  
820      snprintf(buf, sizeof(buf), "max_topic_length too high, setting to %d", TOPICLEN);
821      conf_error_report(buf);
# Line 2108 | Line 2108 | connect_entry: CONNECT
2108        ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost(%s)", block_state.bind.buf);
2109      else
2110      {
2111 <      assert(res != NULL);
2111 >      assert(res);
2112  
2113        memcpy(&conf->bind, res->ai_addr, res->ai_addrlen);
2114        conf->bind.ss.ss_family = res->ai_family;
# Line 2163 | Line 2163 | connect_send_password: SEND_PASSWORD '='
2163  
2164    if ($3[0] == ':')
2165      conf_error_report("Server passwords cannot begin with a colon");
2166 <  else if (strchr($3, ' ') != NULL)
2166 >  else if (strchr($3, ' '))
2167      conf_error_report("Server passwords cannot contain spaces");
2168    else
2169      strlcpy(block_state.spass.buf, yylval.string, sizeof(block_state.spass.buf));
# Line 2176 | Line 2176 | connect_accept_password: ACCEPT_PASSWORD
2176  
2177    if ($3[0] == ':')
2178      conf_error_report("Server passwords cannot begin with a colon");
2179 <  else if (strchr($3, ' ') != NULL)
2179 >  else if (strchr($3, ' '))
2180      conf_error_report("Server passwords cannot contain spaces");
2181    else
2182      strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf));

Diff Legend

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