HomeSort by relevance Sort by last modified time
    Searched refs:SAFELY_CLAMP (Results 1 - 5 of 5) sorted by null

  /system/connectivity/wifilogd/tests/
local_utils_unittest.cpp 134 EXPECT_EQ(int8_t{0}, (SAFELY_CLAMP(int8_t{-1}, int8_t, 0, 2)));
135 EXPECT_EQ(int8_t{0}, (SAFELY_CLAMP(int8_t{0}, int8_t, 0, 2)));
136 EXPECT_EQ(int8_t{1}, (SAFELY_CLAMP(int8_t{1}, int8_t, 0, 2)));
137 EXPECT_EQ(int8_t{2}, (SAFELY_CLAMP(int8_t{2}, int8_t, 0, 2)));
138 EXPECT_EQ(int8_t{2}, (SAFELY_CLAMP(int8_t{3}, int8_t, 0, 2)));
144 EXPECT_EQ(uint8_t{0}, (SAFELY_CLAMP(int8_t{-1}, uint8_t, 0, 127)));
145 EXPECT_EQ(uint8_t{0}, (SAFELY_CLAMP(int8_t{0}, uint8_t, 0, 127)));
146 EXPECT_EQ(uint8_t{1}, (SAFELY_CLAMP(int8_t{1}, uint8_t, 0, 127)));
147 EXPECT_EQ(uint8_t{127}, (SAFELY_CLAMP(int8_t{127}, uint8_t, 0, 127)));
153 EXPECT_EQ(int8_t{0}, (SAFELY_CLAMP(uint8_t{0}, int8_t, 0, 127)))
    [all...]
command_processor_unittest.cpp 93 .set_tag_len(SAFELY_CLAMP(
96 .set_data_len(SAFELY_CLAMP(
109 .set_payload_len(SAFELY_CLAMP(
  /system/connectivity/wifilogd/
os.cpp 61 now_timestamp.secs = SAFELY_CLAMP(
69 SAFELY_CLAMP(now_timespec.tv_nsec, uint32_t, 0, kMaxNanoSeconds);
76 SAFELY_CLAMP(sleep_time_nsec, decltype(timespec::tv_nsec), 0, kMaxNanos)};
125 SAFELY_CLAMP(buflen, ssize_t, 0,
local_utils.h 32 // As compared to static_cast<>, SAFELY_CLAMP is a) more explicit, b) more
35 #define SAFELY_CLAMP(SRC, DST_TYPE, MIN, MAX) \
110 // Implements the functionality documented for the SAFELY_CLAMP macro.
111 // This function should be used via the SAFELY_CLAMP macro.
121 // Clients should use the SAFELY_CLAMP macro, in which case this should never
122 // happen. (When the SAFELY_CLAMP macro is used, the values can only be
command_processor.cpp 170 SAFELY_CLAMP(command_len_in, uint16_t, 0, protocol::kMaxMessageSize);
200 SAFELY_CLAMP(message_buf.size(), uint16_t, 0, GetMaxVal<uint16_t>()));

Completed in 77 milliseconds