Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
bee198de
Commit
bee198de
authored
19 years ago
by
Dominick Meglio
Browse files
Options
Downloads
Patches
Plain Diff
Removed usage of u_int and u_char
parent
f09e479f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ares/bitncmp.c
+3
-3
3 additions, 3 deletions
ares/bitncmp.c
ares/inet_net_pton.c
+15
-15
15 additions, 15 deletions
ares/inet_net_pton.c
with
18 additions
and
18 deletions
ares/bitncmp.c
+
3
−
3
View file @
bee198de
...
...
@@ -36,7 +36,7 @@
*/
int
ares_bitncmp
(
const
void
*
l
,
const
void
*
r
,
int
n
)
{
u
_
int
lb
,
rb
;
u
nsigned
int
lb
,
rb
;
int
x
,
b
;
b
=
n
/
8
;
...
...
@@ -44,8 +44,8 @@ ares_bitncmp(const void *l, const void *r, int n) {
if
(
x
)
return
(
x
);
lb
=
((
const
u
_
char
*
)
l
)[
b
];
rb
=
((
const
u
_
char
*
)
r
)[
b
];
lb
=
((
const
u
nsigned
char
*
)
l
)[
b
];
rb
=
((
const
u
nsigned
char
*
)
r
)[
b
];
for
(
b
=
n
%
8
;
b
>
0
;
b
--
)
{
if
((
lb
&
0x80
)
!=
(
rb
&
0x80
))
{
if
(
lb
&
0x80
)
...
...
This diff is collapsed.
Click to expand it.
ares/inet_net_pton.c
+
15
−
15
View file @
bee198de
...
...
@@ -67,11 +67,11 @@
* Paul Vixie (ISC), June 1996
*/
static
int
inet_net_pton_ipv4
(
const
char
*
src
,
u
_
char
*
dst
,
size_t
size
)
{
inet_net_pton_ipv4
(
const
char
*
src
,
u
nsigned
char
*
dst
,
size_t
size
)
{
static
const
char
xdigits
[]
=
"0123456789abcdef"
;
static
const
char
digits
[]
=
"0123456789"
;
int
n
,
ch
,
tmp
=
0
,
dirty
,
bits
;
const
u
_
char
*
odst
=
dst
;
const
u
nsigned
char
*
odst
=
dst
;
ch
=
*
src
++
;
if
(
ch
==
'0'
&&
(
src
[
0
]
==
'x'
||
src
[
0
]
==
'X'
)
...
...
@@ -93,14 +93,14 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) {
if
(
++
dirty
==
2
)
{
if
(
size
--
<=
0U
)
goto
emsgsize
;
*
dst
++
=
(
u
_
char
)
tmp
;
*
dst
++
=
(
u
nsigned
char
)
tmp
;
dirty
=
0
;
}
}
if
(
dirty
)
{
/* Odd trailing nybble? */
if
(
size
--
<=
0U
)
goto
emsgsize
;
*
dst
++
=
(
u
_
char
)
(
tmp
<<
4
);
*
dst
++
=
(
u
nsigned
char
)
(
tmp
<<
4
);
}
}
else
if
(
isascii
(
ch
)
&&
isdigit
(
ch
))
{
/* Decimal: eat dotted digit string. */
...
...
@@ -116,7 +116,7 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) {
isascii
(
ch
)
&&
isdigit
(
ch
));
if
(
size
--
<=
0U
)
goto
emsgsize
;
*
dst
++
=
(
u
_
char
)
tmp
;
*
dst
++
=
(
u
nsigned
char
)
tmp
;
if
(
ch
==
'\0'
||
ch
==
'/'
)
break
;
if
(
ch
!=
'.'
)
...
...
@@ -222,11 +222,11 @@ getbits(const char *src, int *bitsp) {
}
static
int
getv4
(
const
char
*
src
,
u
_
char
*
dst
,
int
*
bitsp
)
{
getv4
(
const
char
*
src
,
u
nsigned
char
*
dst
,
int
*
bitsp
)
{
static
const
char
digits
[]
=
"0123456789"
;
u
_
char
*
odst
=
dst
;
u
nsigned
char
*
odst
=
dst
;
int
n
;
u
_
int
val
;
u
nsigned
int
val
;
char
ch
;
val
=
0
;
...
...
@@ -265,13 +265,13 @@ getv4(const char *src, u_char *dst, int *bitsp) {
}
static
int
inet_net_pton_ipv6
(
const
char
*
src
,
u
_
char
*
dst
,
size_t
size
)
{
inet_net_pton_ipv6
(
const
char
*
src
,
u
nsigned
char
*
dst
,
size_t
size
)
{
static
const
char
xdigits_l
[]
=
"0123456789abcdef"
,
xdigits_u
[]
=
"0123456789ABCDEF"
;
u
_
char
tmp
[
NS_IN6ADDRSZ
],
*
tp
,
*
endp
,
*
colonp
;
u
nsigned
char
tmp
[
NS_IN6ADDRSZ
],
*
tp
,
*
endp
,
*
colonp
;
const
char
*
xdigits
,
*
curtok
;
int
ch
,
saw_xdigit
;
u
_
int
val
;
u
nsigned
int
val
;
int
digits
;
int
bits
;
size_t
bytes
;
...
...
@@ -315,8 +315,8 @@ inet_net_pton_ipv6(const char *src, u_char *dst, size_t size) {
goto
enoent
;
if
(
tp
+
NS_INT16SZ
>
endp
)
return
(
0
);
*
tp
++
=
(
u
_
char
)
(
val
>>
8
)
&
0xff
;
*
tp
++
=
(
u
_
char
)
val
&
0xff
;
*
tp
++
=
(
u
nsigned
char
)
(
val
>>
8
)
&
0xff
;
*
tp
++
=
(
u
nsigned
char
)
val
&
0xff
;
saw_xdigit
=
0
;
digits
=
0
;
val
=
0
;
...
...
@@ -336,8 +336,8 @@ inet_net_pton_ipv6(const char *src, u_char *dst, size_t size) {
if
(
saw_xdigit
)
{
if
(
tp
+
NS_INT16SZ
>
endp
)
goto
enoent
;
*
tp
++
=
(
u
_
char
)
(
val
>>
8
)
&
0xff
;
*
tp
++
=
(
u
_
char
)
val
&
0xff
;
*
tp
++
=
(
u
nsigned
char
)
(
val
>>
8
)
&
0xff
;
*
tp
++
=
(
u
nsigned
char
)
val
&
0xff
;
}
if
(
bits
==
-
1
)
bits
=
128
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment