]> git.sur5r.net Git - openldap/blobdiff - clients/finger/main.c
Take address of enclosing structure (in_addr), not member (s_addr).
[openldap] / clients / finger / main.c
index ccc689852f35135185117df904436f85f4435a5a..bff4755869e4864d81bbfec431f63bfa77e192fe 100644 (file)
@@ -135,8 +135,8 @@ main( int argc, char **argv )
        }
 
        if ( dosyslog && !interactive ) {
-               hp = gethostbyaddr( (char *) &peername.sin_addr.s_addr,
-                                   sizeof(peername.sin_addr.s_addr), AF_INET );
+               hp = gethostbyaddr( (char *) &peername.sin_addr,
+                                   sizeof(peername.sin_addr), AF_INET );
                syslog( LOG_INFO, "connection from %s (%s)",
                        (hp == NULL) ? "unknown" : hp->h_name,
                        inet_ntoa( peername.sin_addr ) );