summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2025-06-12 13:49:37 +0200
committerGravatar Nikias Bassen2025-06-12 13:49:37 +0200
commit483d040ab46a5aa11795453a5c1b69d160b31180 (patch)
treedbca6918cfd48eb783b0be3b03340724bdda202f
parent3bf294f149594b61aaa6dace57628c924af2f501 (diff)
downloadlibimobiledevice-483d040ab46a5aa11795453a5c1b69d160b31180.tar.gz
libimobiledevice-483d040ab46a5aa11795453a5c1b69d160b31180.tar.bz2
ostrace: Use void*/const void* and size_t
-rw-r--r--include/libimobiledevice/ostrace.h4
-rw-r--r--src/ostrace.c2
-rw-r--r--tools/idevicesyslog.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/include/libimobiledevice/ostrace.h b/include/libimobiledevice/ostrace.h
index fb5a88f..f083ba7 100644
--- a/include/libimobiledevice/ostrace.h
+++ b/include/libimobiledevice/ostrace.h
@@ -86,10 +86,10 @@ struct ostrace_packet_header_t {
86#pragma pack(pop) 86#pragma pack(pop)
87 87
88/** Receives unparsed ostrace data from the ostrace service */ 88/** Receives unparsed ostrace data from the ostrace service */
89typedef void (*ostrace_activity_cb_t)(const unsigned char* buf, unsigned int len, void *user_data); 89typedef void (*ostrace_activity_cb_t)(const void* buf, size_t len, void *user_data);
90 90
91/** Receives archive data from the ostrace service */ 91/** Receives archive data from the ostrace service */
92typedef int (*ostrace_archive_write_cb_t)(const unsigned char* buf, unsigned int len, void *user_data); 92typedef int (*ostrace_archive_write_cb_t)(const void* buf, size_t len, void *user_data);
93 93
94/* Interface */ 94/* Interface */
95 95
diff --git a/src/ostrace.c b/src/ostrace.c
index 0fdd147..9867019 100644
--- a/src/ostrace.c
+++ b/src/ostrace.c
@@ -262,7 +262,7 @@ void *ostrace_worker(void *arg)
262 262
263 debug_info("got length %d", rlen); 263 debug_info("got length %d", rlen);
264 264
265 unsigned char* buf = (unsigned char*)malloc(rlen); 265 void* buf = malloc(rlen);
266 res = ostrace_error(service_receive(oswt->client->parent, (char*)buf, rlen, &received)); 266 res = ostrace_error(service_receive(oswt->client->parent, (char*)buf, rlen, &received));
267 if (res != OSTRACE_E_SUCCESS) { 267 if (res != OSTRACE_E_SUCCESS) {
268 debug_info("Failed to receive %d bytes, error %d", rlen, res); 268 debug_info("Failed to receive %d bytes, error %d", rlen, res);
diff --git a/tools/idevicesyslog.c b/tools/idevicesyslog.c
index 65a613b..5ecd0ad 100644
--- a/tools/idevicesyslog.c
+++ b/tools/idevicesyslog.c
@@ -376,7 +376,7 @@ static void syslog_callback(char c, void *user_data)
376 } 376 }
377} 377}
378 378
379static void ostrace_syslog_callback(const unsigned char* buf, unsigned int len, void* user_data) 379static void ostrace_syslog_callback(const void* buf, size_t len, void* user_data)
380{ 380{
381 if (len < 0x81) { 381 if (len < 0x81) {
382 fprintf(stderr, "Error: not enough data in callback function?!\n"); 382 fprintf(stderr, "Error: not enough data in callback function?!\n");