diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-04-05 15:05:52 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-04-05 15:05:52 -0700 |
commit | cd900e40b5676874d076c35466fd7baa6a49b1f6 (patch) | |
tree | c04168c7db0fcb3e401f09ce4d30a13dd65e7712 /src/connect.c | |
parent | 27f9a9324d58c9a7472c724c62f5b7ea0e1f4681 (diff) |
Replace many malloc(strlen()); strcpy() pairs with strdup()
Diffstat (limited to 'src/connect.c')
-rw-r--r-- | src/connect.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/connect.c b/src/connect.c index 933c186..3874058 100644 --- a/src/connect.c +++ b/src/connect.c @@ -524,9 +524,7 @@ ConnectToPeer (char *networkIdsList, char **actualConnectionRet) * We need to return the actual network connection string */ - *actualConnectionRet = (char *) malloc (strlen (address) + 1); - strcpy (*actualConnectionRet, address); - + *actualConnectionRet = strdup(address); /* * Return the file descriptor |