Skip to content

Commit 48fb7cd

Browse files
authored
Merge pull request #83087 from etcwilde/ewilde/op-precedence
Fix warning in DispatchGlobalExecutor
2 parents 0081b28 + 38c3ac1 commit 48fb7cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/Concurrency/DispatchGlobalExecutor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ platform_time(uint64_t nsec) {
306306
static inline dispatch_time_t
307307
clock_and_value_to_time(int clock, long long sec, long long nsec) {
308308
uint64_t deadline;
309-
if (sec < 0 || sec == 0 && nsec < 0)
309+
if (sec < 0 || (sec == 0 && nsec < 0))
310310
deadline = 0;
311311
else if (__builtin_mul_overflow(sec, NSEC_PER_SEC, &deadline)
312312
|| __builtin_add_overflow(nsec, deadline, &deadline)) {
@@ -360,7 +360,7 @@ void swift_dispatchEnqueueWithDeadline(bool global,
360360

361361
if (tnsec != -1) {
362362
uint64_t leeway;
363-
if (tsec < 0 || tsec == 0 && tnsec < 0)
363+
if (tsec < 0 || (tsec == 0 && tnsec < 0))
364364
leeway = 0;
365365
else if (__builtin_mul_overflow(tsec, NSEC_PER_SEC, &leeway)
366366
|| __builtin_add_overflow(tnsec, leeway, &leeway)) {

0 commit comments

Comments
 (0)