mirror of
				https://github.com/osmarks/ngircd.git
				synced 2025-10-30 05:23:00 +00:00 
			
		
		
		
	minor cleanup
This commit is contained in:
		| @@ -14,7 +14,7 @@ | |||||||
|  |  | ||||||
| #include "portab.h" | #include "portab.h" | ||||||
|  |  | ||||||
| static char UNUSED id[] = "$Id: resolve.c,v 1.11 2005/03/19 18:43:49 fw Exp $"; | static char UNUSED id[] = "$Id: resolve.c,v 1.12 2005/05/28 10:46:50 fw Exp $"; | ||||||
|  |  | ||||||
| #include "imp.h" | #include "imp.h" | ||||||
| #include <assert.h> | #include <assert.h> | ||||||
| @@ -169,7 +169,7 @@ Do_ResolveAddr( struct sockaddr_in *Addr, int w_fd ) | |||||||
|  |  | ||||||
| 	char hostname[HOST_LEN]; | 	char hostname[HOST_LEN]; | ||||||
| 	struct hostent *h; | 	struct hostent *h; | ||||||
| 	int len; | 	size_t len; | ||||||
| #ifdef IDENTAUTH | #ifdef IDENTAUTH | ||||||
| 	char *res; | 	char *res; | ||||||
| #endif | #endif | ||||||
| @@ -206,9 +206,12 @@ Do_ResolveAddr( struct sockaddr_in *Addr, int w_fd ) | |||||||
| 	Log_Resolver( LOG_DEBUG, "Ok, IDENT lookup on socket %d done: \"%s\"", Sock, res ? res : "" ); | 	Log_Resolver( LOG_DEBUG, "Ok, IDENT lookup on socket %d done: \"%s\"", Sock, res ? res : "" ); | ||||||
|  |  | ||||||
| 	/* Write IDENT result into pipe to parent */ | 	/* Write IDENT result into pipe to parent */ | ||||||
| 	len = strlen( res ? res : "" ); | 	if (res) { | ||||||
| 	if( res != NULL ) res[len] = '\n'; | 		len = strlen(res); | ||||||
|  | 		res[len] = '\n'; | ||||||
| 		len++; | 		len++; | ||||||
|  | 	} else len = 1; | ||||||
|  |  | ||||||
| 	if( (size_t)write( w_fd, res ? res : "\n", len ) != (size_t)len ) | 	if( (size_t)write( w_fd, res ? res : "\n", len ) != (size_t)len ) | ||||||
| 	{ | 	{ | ||||||
| 		Log_Resolver( LOG_CRIT, "Resolver: Can't write to parent (IDENT): %s!", strerror( errno )); | 		Log_Resolver( LOG_CRIT, "Resolver: Can't write to parent (IDENT): %s!", strerror( errno )); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Florian Westphal
					Florian Westphal