summaryrefslogtreecommitdiffstats
path: root/extras/libmemif/examples/test_app/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'extras/libmemif/examples/test_app/main.c')
-rw-r--r--extras/libmemif/examples/test_app/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/extras/libmemif/examples/test_app/main.c b/extras/libmemif/examples/test_app/main.c
index 763ec6c90e7..54c53921fe7 100644
--- a/extras/libmemif/examples/test_app/main.c
+++ b/extras/libmemif/examples/test_app/main.c
@@ -201,13 +201,13 @@ main (int argc, char *argv[])
int id0 = IF_ID0;
int id1 = IF_ID1;
- strncpy (socket_path, SOCKET_PATH, strlen (SOCKET_PATH));
+ strncpy (socket_path, SOCKET_PATH, sizeof (SOCKET_PATH));
/* prepare the private data */
memset (&intf0, 0, sizeof (intf0));
memset (&intf1, 0, sizeof (intf1));
- while ((opt = getopt (argc, argv, "r:s:i:t:b:h:v")) != -1)
+ while ((opt = getopt (argc, argv, "r:s:i:t:b:hv")) != -1)
{
switch (opt)
{