Skip to content

Commit

Permalink
replace zp_ prefix with z_ for zp_random_u64
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisBiryukov91 committed Mar 4, 2024
1 parent 5216d7a commit b21b11d
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion include/zenoh-pico/system/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 ------------------*/
Expand Down
2 changes: 1 addition & 1 deletion src/system/arduino/esp32/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/system/arduino/opencr/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/system/emscripten/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
2 changes: 1 addition & 1 deletion src/system/espidf/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/system/flipper/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/system/freertos_plus_tcp/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ uint32_t z_random_u32(void) {
return ret;
}

uint64_t zp_random_u64(void) {
uint64_t z_random_u64(void) {

Check warning

Code scanning / Cppcheck (reported by Codacy)

misra violation 804 with no text in the supplied rule-texts-file Warning

misra violation 804 with no text in the supplied rule-texts-file
uint64_t ret = 0;
ret |= z_random_u32();
ret = ret << 32;
Expand Down
2 changes: 1 addition & 1 deletion src/system/mbed/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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); }

Expand Down
2 changes: 1 addition & 1 deletion src/system/unix/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/system/windows/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/system/zephyr/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b21b11d

Please sign in to comment.