Skip to content

Commit d055d8d

Browse files
committed
session.h: Move inclusion of string.h into .c files
string.h is required for memcmp() that is used in session.c and dtls_debug.c. Therefore, the header file needs to be included only in these two files. Change-Id: I11db1c37a7cc13d8fa2826f6d3e38d3765f4a4ec
1 parent 7667849 commit d055d8d

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

dtls_debug.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#include <arpa/inet.h>
2929
#endif
3030

31+
#include <string.h>
32+
3133
#ifdef HAVE_TIME_H
3234
#include <time.h>
3335
#endif

session.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
*
1515
*******************************************************************************/
1616

17+
#include <string.h>
18+
1719
#include "session.h"
1820

1921
#ifdef HAVE_ASSERT_H

session.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#ifndef _DTLS_SESSION_H_
1818
#define _DTLS_SESSION_H_
1919

20-
#include <string.h>
21-
2220
#include "tinydtls.h"
2321
#include "global.h"
2422

0 commit comments

Comments
 (0)