about summary refs log tree commit diff stats
path: root/tests/test_roster_list.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-04-02 21:01:20 +0100
committerJames Booth <boothj5@gmail.com>2014-04-02 21:01:20 +0100
commita720ef262774e51066f5885c76deebde83dec74e (patch)
treeae401084d45f8edd57f602cbc53a2caf74e6c3eb /tests/test_roster_list.c
parente1db5318758dcfc72acb698938fc17c407a24cb5 (diff)
downloadprofani-tty-a720ef262774e51066f5885c76deebde83dec74e.tar.gz
Removed strcpy calls
Diffstat (limited to 'tests/test_roster_list.c')
-rw-r--r--tests/test_roster_list.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/test_roster_list.c b/tests/test_roster_list.c
index a5612072..5c767531 100644
--- a/tests/test_roster_list.c
+++ b/tests/test_roster_list.c
@@ -156,8 +156,7 @@ void find_first_exists(void **state)
     roster_add("Dave", NULL, NULL, NULL, FALSE);
     roster_add("Bob", NULL, NULL, NULL, FALSE);
 
-    char *search = (char *) malloc(2 * sizeof(char));
-    strcpy(search, "B");
+    char *search = strdup("B");
 
     char *result = roster_find_contact(search);
     assert_string_equal("Bob", result);