Dan Burkert has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/10371 )

Change subject: Fix int overflow GetClockTimeMicros() on macOS
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/10371/1/src/kudu/gutil/walltime.h
File src/kudu/gutil/walltime.h:

http://gerrit.cloudera.org:8080/#/c/10371/1/src/kudu/gutil/walltime.h@87
PS1, Line 87:   micros_from_secs *= 1000 * 1000 + ts.tv_nsec / 1000;
Is the precedence here correct?  Seems like it's now

MicrosecondsInt64 micros_from_secs = static_cast<MicrosecondsInt64>(ts.tv_sec) 
* ((1000 * 1000) + (ts.tvnsec / 1000))

which isn't right.  Regardless of whether it's right, the *= with + is 
confusing, so maybe split it out.


http://gerrit.cloudera.org:8080/#/c/10371/1/src/kudu/gutil/walltime.h@141
PS1, Line 141:   micros_from_secs *= 1000 * 1000 + ts.tv_nsec / 1000;
same



--
To view, visit http://gerrit.cloudera.org:8080/10371
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie0eaa548f61352be529755a732566613cfa72098
Gerrit-Change-Number: 10371
Gerrit-PatchSet: 1
Gerrit-Owner: David Ribeiro Alves <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-Comment-Date: Thu, 10 May 2018 21:09:42 +0000
Gerrit-HasComments: Yes

Reply via email to