@@ -1704,7 +1704,8 @@ static int netconsole_parser_cmdline(struct netpoll *np, char *opt)
17041704 int ipv6 ;
17051705
17061706 if (* cur != '@' ) {
1707- if ((delim = strchr (cur , '@' )) == NULL )
1707+ delim = strchr (cur , '@' );
1708+ if (!delim )
17081709 goto parse_failed ;
17091710 * delim = 0 ;
17101711 if (kstrtou16 (cur , 10 , & np -> local_port ))
@@ -1715,7 +1716,8 @@ static int netconsole_parser_cmdline(struct netpoll *np, char *opt)
17151716
17161717 if (* cur != '/' ) {
17171718 ipversion_set = true;
1718- if ((delim = strchr (cur , '/' )) == NULL )
1719+ delim = strchr (cur , '/' );
1720+ if (!delim )
17191721 goto parse_failed ;
17201722 * delim = 0 ;
17211723 ipv6 = netpoll_parse_ip_addr (cur , & np -> local_ip );
@@ -1729,7 +1731,8 @@ static int netconsole_parser_cmdline(struct netpoll *np, char *opt)
17291731
17301732 if (* cur != ',' ) {
17311733 /* parse out dev_name or dev_mac */
1732- if ((delim = strchr (cur , ',' )) == NULL )
1734+ delim = strchr (cur , ',' );
1735+ if (!delim )
17331736 goto parse_failed ;
17341737 * delim = 0 ;
17351738
@@ -1746,7 +1749,8 @@ static int netconsole_parser_cmdline(struct netpoll *np, char *opt)
17461749
17471750 if (* cur != '@' ) {
17481751 /* dst port */
1749- if ((delim = strchr (cur , '@' )) == NULL )
1752+ delim = strchr (cur , '@' );
1753+ if (!delim )
17501754 goto parse_failed ;
17511755 * delim = 0 ;
17521756 if (* cur == ' ' || * cur == '\t' )
@@ -1758,7 +1762,8 @@ static int netconsole_parser_cmdline(struct netpoll *np, char *opt)
17581762 cur ++ ;
17591763
17601764 /* dst ip */
1761- if ((delim = strchr (cur , '/' )) == NULL )
1765+ delim = strchr (cur , '/' );
1766+ if (!delim )
17621767 goto parse_failed ;
17631768 * delim = 0 ;
17641769 ipv6 = netpoll_parse_ip_addr (cur , & np -> remote_ip );
0 commit comments