Skip to content

Commit

Permalink
[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_AS…
Browse files Browse the repository at this point in the history
…SERT
  • Loading branch information
tanvi-jagtap committed Apr 29, 2024
1 parent 005b992 commit 0adb1c0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core/lib/gpr/alloc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void* gpr_realloc(void* p, size_t size) {
}

void* gpr_malloc_aligned(size_t size, size_t alignment) {
CHECK_EQ(((alignment - 1) & alignment), 0); // Must be power of 2.
CHECK_EQ(((alignment - 1) & alignment), 0u); // Must be power of 2.
size_t extra = alignment - 1 + sizeof(void*);
void* p = gpr_malloc(size + extra);
void** ret = reinterpret_cast<void**>(
Expand Down
4 changes: 2 additions & 2 deletions src/core/lib/gpr/windows/time.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ void gpr_sleep_until(gpr_timespec until) {
delta = gpr_time_sub(until, now);
sleep_millis =
delta.tv_sec * GPR_MS_PER_SEC + delta.tv_nsec / GPR_NS_PER_MS;
CHECK((sleep_millis >= 0));
CHECK((sleep_millis <= INT_MAX));
CHECK_GE(sleep_millis, 0);
CHECK_LE(sleep_millis, INT_MAX);
Sleep((DWORD)sleep_millis);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/lib/gprpp/host_port.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ bool SplitHostPort(absl::string_view name, absl::string_view* host,
bool SplitHostPort(absl::string_view name, std::string* host,
std::string* port) {
DCHECK(host != nullptr);
CHECK(host->empty());
DCHECK(host->empty());
DCHECK(port != nullptr);
CHECK(port->empty());
DCHECK(port->empty());
absl::string_view host_view;
absl::string_view port_view;
bool has_port;
Expand Down

0 comments on commit 0adb1c0

Please sign in to comment.