From bbda499067067aefc8e642a2784d247ac0331eae Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 25 Dec 2004 17:43:16 +0000 Subject: Add memset() to different places to initialize the structures --- test/l2test.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/l2test.c') diff --git a/test/l2test.c b/test/l2test.c index eedf4b70..627d37f1 100644 --- a/test/l2test.c +++ b/test/l2test.c @@ -192,6 +192,7 @@ int do_connect(char *svr) } /* Get default options */ + memset(&opts, 0, sizeof(opts)); opt = sizeof(opts); if (getsockopt(s, SOL_L2CAP, L2CAP_OPTIONS, &opts, &opt) < 0) { syslog(LOG_ERR, "Can't get default L2CAP options. %s(%d)", strerror(errno), errno); @@ -236,6 +237,7 @@ int do_connect(char *svr) return -1; } + memset(&opts, 0, sizeof(opts)); opt = sizeof(opts); if (getsockopt(s, SOL_L2CAP, L2CAP_OPTIONS, &opts, &opt) < 0) { syslog(LOG_ERR, "Can't get L2CAP options. %s(%d)", strerror(errno), errno); -- cgit