wmbiff: addr.sin_port is in NBO, so we should use ntohs(3), not htons(3).
				
					
				
			Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
This commit is contained in:
		
							parent
							
								
									5d9eb1eb11
								
							
						
					
					
						commit
						dfa571a21b
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -383,10 +383,10 @@ int test_sock_connect(void)
 | 
				
			||||||
		perror("listen");
 | 
							perror("listen");
 | 
				
			||||||
		return 1;
 | 
							return 1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (sock_connect("127.0.0.1", htons(addr.sin_port)) < 0) {
 | 
						if (sock_connect("127.0.0.1", ntohs(addr.sin_port)) < 0) {
 | 
				
			||||||
		return 1;
 | 
							return 1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (sock_connect("localhost", htons(addr.sin_port)) < 0) {
 | 
						if (sock_connect("localhost", ntohs(addr.sin_port)) < 0) {
 | 
				
			||||||
		return 1;
 | 
							return 1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue