diff options
author | 2025-06-12 13:49:37 +0200 | |
---|---|---|
committer | 2025-06-12 13:49:37 +0200 | |
commit | 483d040ab46a5aa11795453a5c1b69d160b31180 (patch) | |
tree | dbca6918cfd48eb783b0be3b03340724bdda202f | |
parent | 3bf294f149594b61aaa6dace57628c924af2f501 (diff) | |
download | libimobiledevice-483d040ab46a5aa11795453a5c1b69d160b31180.tar.gz libimobiledevice-483d040ab46a5aa11795453a5c1b69d160b31180.tar.bz2 |
ostrace: Use void*/const void* and size_t
-rw-r--r-- | include/libimobiledevice/ostrace.h | 4 | ||||
-rw-r--r-- | src/ostrace.c | 2 | ||||
-rw-r--r-- | tools/idevicesyslog.c | 2 |
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 { #pragma pack(pop) /** Receives unparsed ostrace data from the ostrace service */ -typedef void (*ostrace_activity_cb_t)(const unsigned char* buf, unsigned int len, void *user_data); +typedef void (*ostrace_activity_cb_t)(const void* buf, size_t len, void *user_data); /** Receives archive data from the ostrace service */ -typedef int (*ostrace_archive_write_cb_t)(const unsigned char* buf, unsigned int len, void *user_data); +typedef int (*ostrace_archive_write_cb_t)(const void* buf, size_t len, void *user_data); /* Interface */ 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) debug_info("got length %d", rlen); - unsigned char* buf = (unsigned char*)malloc(rlen); + void* buf = malloc(rlen); res = ostrace_error(service_receive(oswt->client->parent, (char*)buf, rlen, &received)); if (res != OSTRACE_E_SUCCESS) { 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) } } -static void ostrace_syslog_callback(const unsigned char* buf, unsigned int len, void* user_data) +static void ostrace_syslog_callback(const void* buf, size_t len, void* user_data) { if (len < 0x81) { fprintf(stderr, "Error: not enough data in callback function?!\n"); |