projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c94ede3
)
Use intptr_t instead of long to store a pointer.
author
Guus Sliepen
<guus@tinc-vpn.org>
Sat, 1 May 2010 13:38:04 +0000
(15:38 +0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sat, 1 May 2010 13:38:04 +0000
(15:38 +0200)
lib/memcmp.c
patch
|
blob
|
history
diff --git
a/lib/memcmp.c
b/lib/memcmp.c
index
9d80833
..
8103e1a
100644
(file)
--- a/
lib/memcmp.c
+++ b/
lib/memcmp.c
@@
-107,8
+107,8
@@
static int
memcmp_bytes (a, b)
op_t a, b;
{
memcmp_bytes (a, b)
op_t a, b;
{
-
long int srcp1 = (long in
t) &a;
-
long int srcp2 = (long in
t) &b;
+
intptr_t srcp1 = (intptr_
t) &a;
+
intptr_t srcp2 = (intptr_
t) &b;
op_t a0, b0;
do
op_t a0, b0;
do
@@
-123,7
+123,7
@@
memcmp_bytes (a, b)
}
#endif
}
#endif
-static int memcmp_common_alignment __P((
long, long
, size_t));
+static int memcmp_common_alignment __P((
intptr_t, intptr_t
, size_t));
/* memcmp_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN `op_t'
objects (not LEN bytes!). Both SRCP1 and SRCP2 should be aligned for
/* memcmp_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN `op_t'
objects (not LEN bytes!). Both SRCP1 and SRCP2 should be aligned for
@@
-133,8
+133,8
@@
__inline
#endif
static int
memcmp_common_alignment (srcp1, srcp2, len)
#endif
static int
memcmp_common_alignment (srcp1, srcp2, len)
-
long in
t srcp1;
-
long in
t srcp2;
+
intptr_
t srcp1;
+
intptr_
t srcp2;
size_t len;
{
op_t a0, a1;
size_t len;
{
op_t a0, a1;
@@
-213,7
+213,7
@@
memcmp_common_alignment (srcp1, srcp2, len)
return 0;
}
return 0;
}
-static int memcmp_not_common_alignment __P((
long, long
, size_t));
+static int memcmp_not_common_alignment __P((
intptr_t, intptr_t
, size_t));
/* memcmp_not_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN
`op_t' objects (not LEN bytes!). SRCP2 should be aligned for memory
/* memcmp_not_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN
`op_t' objects (not LEN bytes!). SRCP2 should be aligned for memory
@@
-223,8
+223,8
@@
__inline
#endif
static int
memcmp_not_common_alignment (srcp1, srcp2, len)
#endif
static int
memcmp_not_common_alignment (srcp1, srcp2, len)
-
long in
t srcp1;
-
long in
t srcp2;
+
intptr_
t srcp1;
+
intptr_
t srcp2;
size_t len;
{
op_t a0, a1, a2, a3;
size_t len;
{
op_t a0, a1, a2, a3;
@@
-332,8
+332,8
@@
rpl_memcmp (s1, s2, len)
{
op_t a0;
op_t b0;
{
op_t a0;
op_t b0;
-
long int srcp1 = (long in
t) s1;
-
long int srcp2 = (long in
t) s2;
+
intptr_t srcp1 = (intptr_
t) s1;
+
intptr_t srcp2 = (intptr_
t) s2;
op_t res;
if (len >= OP_T_THRES)
op_t res;
if (len >= OP_T_THRES)