]> andersk Git - openssh.git/blobdiff - ssh-agent.c
- djm@cvs.openbsd.org 2006/03/25 00:05:41
[openssh.git] / ssh-agent.c
index 7feb898dd8c178e47dd87098aeb022bf1126213e..67bde556067263bde80e274154b713d25d7f130b 100644 (file)
@@ -109,8 +109,8 @@ int max_fd = 0;
 pid_t parent_pid = -1;
 
 /* pathname and directory for AUTH_SOCKET */
-char socket_name[1024];
-char socket_dir[1024];
+char socket_name[MAXPATHLEN];
+char socket_dir[MAXPATHLEN];
 
 /* locking */
 int locked = 0;
@@ -803,10 +803,7 @@ new_socket(sock_type type, int fd)
                }
        old_alloc = sockets_alloc;
        new_alloc = sockets_alloc + 10;
-       if (sockets)
-               sockets = xrealloc(sockets, new_alloc * sizeof(sockets[0]));
-       else
-               sockets = xmalloc(new_alloc * sizeof(sockets[0]));
+       sockets = xrealloc(sockets, new_alloc * sizeof(sockets[0]));
        for (i = old_alloc; i < new_alloc; i++)
                sockets[i].type = AUTH_UNUSED;
        sockets_alloc = new_alloc;
This page took 0.032541 seconds and 4 git commands to generate.