From b21b11d83305262486d8467e9aa2cf3b888fdf15 Mon Sep 17 00:00:00 2001 From: Denis Biryukov Date: Mon, 4 Mar 2024 15:19:37 +0100 Subject: [PATCH] replace zp_ prefix with z_ for zp_random_u64 --- include/zenoh-pico/system/platform.h | 2 +- src/system/arduino/esp32/system.c | 2 +- src/system/arduino/opencr/system.c | 2 +- src/system/emscripten/system.c | 2 +- src/system/espidf/system.c | 2 +- src/system/flipper/system.c | 2 +- src/system/freertos_plus_tcp/system.c | 2 +- src/system/mbed/system.cpp | 2 +- src/system/unix/system.c | 2 +- src/system/windows/system.c | 2 +- src/system/zephyr/system.c | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/zenoh-pico/system/platform.h b/include/zenoh-pico/system/platform.h index a5f3a2e4d..2f20b14f4 100644 --- a/include/zenoh-pico/system/platform.h +++ b/include/zenoh-pico/system/platform.h @@ -52,7 +52,7 @@ extern "C" { uint8_t z_random_u8(void); uint16_t z_random_u16(void); uint32_t z_random_u32(void); -uint64_t zp_random_u64(void); +uint64_t z_random_u64(void); void z_random_fill(void *buf, size_t len); /*------------------ Memory ------------------*/ diff --git a/src/system/arduino/esp32/system.c b/src/system/arduino/esp32/system.c index fe5264dc8..6c82757a5 100644 --- a/src/system/arduino/esp32/system.c +++ b/src/system/arduino/esp32/system.c @@ -26,7 +26,7 @@ uint16_t z_random_u16(void) { return z_random_u32(); } uint32_t z_random_u32(void) { return esp_random(); } -uint64_t zp_random_u64(void) { +uint64_t z_random_u64(void) { uint64_t ret = 0; ret |= z_random_u32(); ret = ret << 32; diff --git a/src/system/arduino/opencr/system.c b/src/system/arduino/opencr/system.c index cde14078d..ed017d200 100644 --- a/src/system/arduino/opencr/system.c +++ b/src/system/arduino/opencr/system.c @@ -26,7 +26,7 @@ uint16_t z_random_u16(void) { return random(0xFFFF); } uint32_t z_random_u32(void) { return random(0xFFFFFFFF); } -uint64_t zp_random_u64(void) { +uint64_t z_random_u64(void) { uint64_t ret = 0; ret |= z_random_u32(); ret = ret << 32; diff --git a/src/system/emscripten/system.c b/src/system/emscripten/system.c index 14f512085..121724269 100644 --- a/src/system/emscripten/system.c +++ b/src/system/emscripten/system.c @@ -27,7 +27,7 @@ uint16_t z_random_u16(void) { return (emscripten_random() * 65535.0); } uint32_t z_random_u32(void) { return (emscripten_random() * 4294967295.0); } -uint64_t zp_random_u64(void) { return (emscripten_random() * 18446744073709551615.0); } +uint64_t z_random_u64(void) { return (emscripten_random() * 18446744073709551615.0); } void z_random_fill(void *buf, size_t len) { for (size_t i = 0; i < len; i++) { diff --git a/src/system/espidf/system.c b/src/system/espidf/system.c index 8fb3fb166..55eccb52f 100644 --- a/src/system/espidf/system.c +++ b/src/system/espidf/system.c @@ -27,7 +27,7 @@ uint16_t z_random_u16(void) { return z_random_u32(); } uint32_t z_random_u32(void) { return esp_random(); } -uint64_t zp_random_u64(void) { +uint64_t z_random_u64(void) { uint64_t ret = 0; ret |= z_random_u32(); ret = ret << 32; diff --git a/src/system/flipper/system.c b/src/system/flipper/system.c index 305204f04..e723f6aa5 100644 --- a/src/system/flipper/system.c +++ b/src/system/flipper/system.c @@ -27,7 +27,7 @@ uint16_t z_random_u16(void) { return random(); } uint32_t z_random_u32(void) { return random(); } -uint64_t zp_random_u64(void) { +uint64_t z_random_u64(void) { uint64_t ret = 0; ret |= z_random_u32(); ret = ret << 32; diff --git a/src/system/freertos_plus_tcp/system.c b/src/system/freertos_plus_tcp/system.c index 36fe41cc6..025ccc44a 100644 --- a/src/system/freertos_plus_tcp/system.c +++ b/src/system/freertos_plus_tcp/system.c @@ -33,7 +33,7 @@ uint32_t z_random_u32(void) { return ret; } -uint64_t zp_random_u64(void) { +uint64_t z_random_u64(void) { uint64_t ret = 0; ret |= z_random_u32(); ret = ret << 32; diff --git a/src/system/mbed/system.cpp b/src/system/mbed/system.cpp index 81486f2a0..7b2ffc65f 100644 --- a/src/system/mbed/system.cpp +++ b/src/system/mbed/system.cpp @@ -28,7 +28,7 @@ uint16_t z_random_u16(void) { return randLIB_get_16bit(); } uint32_t z_random_u32(void) { return randLIB_get_32bit(); } -uint64_t zp_random_u64(void) { return randLIB_get_64bit(); } +uint64_t z_random_u64(void) { return randLIB_get_64bit(); } void z_random_fill(void *buf, size_t len) { randLIB_get_n_bytes_random(buf, len); } diff --git a/src/system/unix/system.c b/src/system/unix/system.c index d404e81e9..799b60519 100644 --- a/src/system/unix/system.c +++ b/src/system/unix/system.c @@ -67,7 +67,7 @@ uint32_t z_random_u32(void) { return ret; } -uint64_t zp_random_u64(void) { +uint64_t z_random_u64(void) { uint64_t ret = 0; #if defined(ZENOH_LINUX) while (getrandom(&ret, sizeof(uint64_t), 0) <= 0) { diff --git a/src/system/windows/system.c b/src/system/windows/system.c index db2718aa1..3997df9ab 100644 --- a/src/system/windows/system.c +++ b/src/system/windows/system.c @@ -41,7 +41,7 @@ uint32_t z_random_u32(void) { return ret; } -uint64_t zp_random_u64(void) { +uint64_t z_random_u64(void) { uint64_t ret = 0; z_random_fill(&ret, sizeof(ret)); return ret; diff --git a/src/system/zephyr/system.c b/src/system/zephyr/system.c index f1e670942..ec1dccb6e 100644 --- a/src/system/zephyr/system.c +++ b/src/system/zephyr/system.c @@ -34,7 +34,7 @@ uint16_t z_random_u16(void) { return z_random_u32(); } uint32_t z_random_u32(void) { return sys_rand32_get(); } -uint64_t zp_random_u64(void) { +uint64_t z_random_u64(void) { uint64_t ret = 0; ret |= z_random_u32(); ret = ret << 32;