Skip to content

Commit

Permalink
minor fixes (chenshuo#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
hfcrwx authored Apr 18, 2020
1 parent 0f3cb97 commit 1417ee1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion muduo/base/Atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class AtomicIntegerT : noncopyable

T getAndSet(T newValue)
{
// in gcc >= 4.7: __atomic_exchange_n(&value, newValue, __ATOMIC_SEQ_CST)
// in gcc >= 4.7: __atomic_exchange_n(&value_, newValue, __ATOMIC_SEQ_CST)
return __sync_lock_test_and_set(&value_, newValue);
}

Expand Down
2 changes: 1 addition & 1 deletion muduo/base/Timestamp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ string Timestamp::toString() const
char buf[32] = {0};
int64_t seconds = microSecondsSinceEpoch_ / kMicroSecondsPerSecond;
int64_t microseconds = microSecondsSinceEpoch_ % kMicroSecondsPerSecond;
snprintf(buf, sizeof(buf)-1, "%" PRId64 ".%06" PRId64 "", seconds, microseconds);
snprintf(buf, sizeof(buf), "%" PRId64 ".%06" PRId64 "", seconds, microseconds);
return buf;
}

Expand Down

0 comments on commit 1417ee1

Please sign in to comment.