summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Rosen Penev2020-12-23 17:21:03 -0800
committerGravatar Nikias Bassen2022-04-22 13:14:02 +0200
commit3de1317378cd6b2b9e747008f10dc386334a391a (patch)
tree3cc35d18d0a0c3bf680f9b00f4d2e6fd307fb294
parent5f382824398e088fdb68a4bd104613d58c4197f5 (diff)
downloadlibimobiledevice-3de1317378cd6b2b9e747008f10dc386334a391a.tar.gz
libimobiledevice-3de1317378cd6b2b9e747008f10dc386334a391a.tar.bz2
[clang-tidy] use const pointer parameter
Found with readability-non-const-parameter Signed-off-by: Rosen Penev <rosenp@gmail.com>
-rw-r--r--src/afc.c2
-rw-r--r--tools/ideviceprovision.c2
-rw-r--r--tools/idevicesyslog.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/afc.c b/src/afc.c
index d0f5cb7..fe99852 100644
--- a/src/afc.c
+++ b/src/afc.c
@@ -355,7 +355,7 @@ static afc_error_t afc_receive_data(afc_client_t client, char **bytes, uint32_t
355/** 355/**
356 * Returns counts of null characters within a string. 356 * Returns counts of null characters within a string.
357 */ 357 */
358static uint32_t count_nullspaces(char *string, uint32_t number) 358static uint32_t count_nullspaces(const char *string, uint32_t number)
359{ 359{
360 uint32_t i = 0, nulls = 0; 360 uint32_t i = 0, nulls = 0;
361 361
diff --git a/tools/ideviceprovision.c b/tools/ideviceprovision.c
index 1dee899..754b84d 100644
--- a/tools/ideviceprovision.c
+++ b/tools/ideviceprovision.c
@@ -106,7 +106,7 @@ static void asn1_next_item(unsigned char** p)
106 } 106 }
107} 107}
108 108
109static size_t asn1_item_get_size(unsigned char* p) 109static size_t asn1_item_get_size(const unsigned char* p)
110{ 110{
111 size_t res = 0; 111 size_t res = 0;
112 char bsize = *(p+1); 112 char bsize = *(p+1);
diff --git a/tools/idevicesyslog.c b/tools/idevicesyslog.c
index 4eb1605..44dd5ba 100644
--- a/tools/idevicesyslog.c
+++ b/tools/idevicesyslog.c
@@ -119,7 +119,7 @@ static void add_filter(const char* filterstr)
119 } 119 }
120} 120}
121 121
122static int find_char(char c, char** p, char* end) 122static int find_char(char c, char** p, const char* end)
123{ 123{
124 while ((**p != c) && (*p < end)) { 124 while ((**p != c) && (*p < end)) {
125 (*p)++; 125 (*p)++;