upstream: Fix case of empty string domain.
Found by compiler note. Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
		
							parent
							
								
									8d0ea71486
								
							
						
					
					
						commit
						badb6435d6
					
				@ -124,7 +124,7 @@ static struct upstream *upstream_build (const char *host, int port, const char *
 | 
				
			|||||||
                log_message (LOG_INFO, "Added no-upstream for %s", domain);
 | 
					                log_message (LOG_INFO, "Added no-upstream for %s", domain);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
                if (!host || host[0] == '\0' || port < 1 || !domain
 | 
					                if (!host || host[0] == '\0' || port < 1 || !domain
 | 
				
			||||||
                    || domain == '\0') {
 | 
					                    || domain[0] == '\0') {
 | 
				
			||||||
                        log_message (LOG_WARNING,
 | 
					                        log_message (LOG_WARNING,
 | 
				
			||||||
                                     "Nonsense upstream rule: invalid parameters");
 | 
					                                     "Nonsense upstream rule: invalid parameters");
 | 
				
			||||||
                        goto fail;
 | 
					                        goto fail;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user