Skip to content

Commit

Permalink
session.h: Move inclusion of string.h into .c files
Browse files Browse the repository at this point in the history
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
  • Loading branch information
obgm committed Jul 22, 2023
1 parent 7667849 commit d055d8d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions dtls_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include <arpa/inet.h>
#endif

#include <string.h>

#ifdef HAVE_TIME_H
#include <time.h>
#endif
Expand Down
2 changes: 2 additions & 0 deletions session.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
*
*******************************************************************************/

#include <string.h>

#include "session.h"

#ifdef HAVE_ASSERT_H
Expand Down
2 changes: 0 additions & 2 deletions session.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#ifndef _DTLS_SESSION_H_
#define _DTLS_SESSION_H_

#include <string.h>

#include "tinydtls.h"
#include "global.h"

Expand Down

0 comments on commit d055d8d

Please sign in to comment.