aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuca Deri <lucaderi@users.noreply.github.com>2019-04-12 19:25:27 +0200
committerGitHub <noreply@github.com>2019-04-12 19:25:27 +0200
commitffb1b9c14fccb6b29d2e829362cd0c469db8e9a4 (patch)
tree8672368195a7700887a7a431282ff15ba1a042d4 /src
parent82817c1cac0fdc3ee51825ad6f758a2015cd7ae2 (diff)
parentbb2f35fe79d38f920fa95590e89cbac974e6cc4d (diff)
Merge pull request #690 from pallas/make-path-const
Make path const in ndpi_load_protocols_file
Diffstat (limited to 'src')
-rw-r--r--src/include/ndpi_api.h2
-rw-r--r--src/lib/ndpi_main.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h
index 84633c3ae..6e0e4787b 100644
--- a/src/include/ndpi_api.h
+++ b/src/include/ndpi_api.h
@@ -612,7 +612,7 @@ extern "C" {
*
*/
int ndpi_load_protocols_file(struct ndpi_detection_module_struct *ndpi_mod,
- char* path);
+ const char* path);
/**
* Get the total number of the supported protocols
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 14d5e5f63..6bd3d7eaa 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -2889,7 +2889,7 @@ int ndpi_handle_rule(struct ndpi_detection_module_struct *ndpi_mod,
udp:139@NETBIOS
*/
-int ndpi_load_protocols_file(struct ndpi_detection_module_struct *ndpi_mod, char* path) {
+int ndpi_load_protocols_file(struct ndpi_detection_module_struct *ndpi_mod, const char* path) {
FILE *fd;
char *buffer, *old_buffer;
int chunk_len = 512, buffer_len = chunk_len, old_buffer_len;