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
bf87d13f
Commit
bf87d13f
authored
20 years ago
by
Dan Fandrich
Browse files
Options
Downloads
Patches
Plain Diff
Fixed some compiler warnings I should have noticed before.
parent
efaf6886
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/if2ip.c
+1
-0
1 addition, 0 deletions
lib/if2ip.c
lib/inet_ntop.c
+5
-9
5 additions, 9 deletions
lib/inet_ntop.c
lib/inet_ntop.h
+1
-1
1 addition, 1 deletion
lib/inet_ntop.h
with
7 additions
and
10 deletions
lib/if2ip.c
+
1
−
0
View file @
bf87d13f
...
...
@@ -69,6 +69,7 @@
#include
<inet.h>
#endif
#include
"inet_ntop.h"
#include
"memory.h"
/* The last #include file should be: */
...
...
This diff is collapsed.
Click to expand it.
lib/inet_ntop.c
+
5
−
9
View file @
bf87d13f
...
...
@@ -54,17 +54,13 @@
* - uses no statics
* - takes a u_char* not an in_addr as input
*/
static
const
char
*
inet_ntop4
(
const
u_char
*
src
,
char
*
dst
,
size_t
size
)
static
char
*
inet_ntop4
(
const
u_char
*
src
,
char
*
dst
,
size_t
size
)
{
#if defined(HAVE_INET_NTOA_R_2_ARGS)
const
char
*
ptr
;
size_t
len
;
curlassert
(
size
>=
16
);
ptr
=
inet_ntoa_r
(
*
(
struct
in_addr
*
)
src
,
dst
);
len
=
strlen
(
ptr
);
memmove
(
dst
,
ptr
,
len
);
dst
[
len
]
=
0
;
return
dst
;
return
(
char
*
)
memmove
(
dst
,
ptr
,
strlen
(
ptr
)
+
1
);
#elif defined(HAVE_INET_NTOA_R)
return
inet_ntoa_r
(
*
(
struct
in_addr
*
)
src
,
dst
,
size
);
...
...
@@ -85,7 +81,7 @@ static const char *inet_ntop4 (const u_char *src, char *dst, size_t size)
/*
* Convert IPv6 binary address into presentation (printable) format.
*/
static
const
char
*
inet_ntop6
(
const
u_char
*
src
,
char
*
dst
,
size_t
size
)
static
char
*
inet_ntop6
(
const
u_char
*
src
,
char
*
dst
,
size_t
size
)
{
/*
* Note that int32_t and int16_t need only be "at least" large enough
...
...
@@ -189,10 +185,10 @@ static const char *inet_ntop6 (const u_char *src, char *dst, size_t size)
/*
* Convert a network format address to presentation format.
*
* Returns pointer to presentation format address (`
dst
'),
* Returns pointer to presentation format address (`
buf
'),
* Returns NULL on error (see errno).
*/
const
char
*
Curl_inet_ntop
(
int
af
,
const
void
*
src
,
char
*
buf
,
size_t
size
)
char
*
Curl_inet_ntop
(
int
af
,
const
void
*
src
,
char
*
buf
,
size_t
size
)
{
switch
(
af
)
{
case
AF_INET
:
...
...
This diff is collapsed.
Click to expand it.
lib/inet_ntop.h
+
1
−
1
View file @
bf87d13f
...
...
@@ -31,7 +31,7 @@
#include
<arpa/inet.h>
#endif
#else
const
char
*
Curl_inet_ntop
(
int
af
,
const
void
*
addr
,
char
*
buf
,
size_t
size
);
char
*
Curl_inet_ntop
(
int
af
,
const
void
*
addr
,
char
*
buf
,
size_t
size
);
#endif
#endif
/* __INET_NTOP_H */
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