projects
/
platform
/
core
/
appfw
/
rpc-port.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08ea8bb
)
Use INT_MAX instead of custom variable
40/262640/1
author
Hwankyu Jhun
<h.jhun@samsung.com>
Tue, 17 Aug 2021 02:04:25 +0000
(11:04 +0900)
committer
Hwankyu Jhun
<h.jhun@samsung.com>
Tue, 17 Aug 2021 02:04:25 +0000
(11:04 +0900)
Change-Id: I9ec72a5c9591ffbfc91b9f6203fc1bf70eeb4087
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/parcel-header-internal.cc
patch
|
blob
|
history
diff --git
a/src/parcel-header-internal.cc
b/src/parcel-header-internal.cc
index
c1d51fb
..
12cf541
100644
(file)
--- a/
src/parcel-header-internal.cc
+++ b/
src/parcel-header-internal.cc
@@
-15,6
+15,7
@@
*/
#include <atomic>
+#include <climits>
#include "parcel-header-internal.hh"
@@
-51,9
+52,8
@@
struct timespec ParcelHeader::GetTimeStamp() const {
int ParcelHeader::GenerateSeqNum() {
static std::atomic<int> num { 0 };
- constexpr int limit = 0x3fffffff;
++num;
- return num &=
limit
;
+ return num &=
INT_MAX
;
}
} // namespace internal