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
5cdbd0cf
Commit
5cdbd0cf
authored
18 years ago
by
Gisle Vanem
Browse files
Options
Downloads
Patches
Plain Diff
Constify arguments to Curl_he2ai() and Curl_addrinfo_copy().
parent
a55c70d4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
lib/hostip.c
+2
-2
2 additions, 2 deletions
lib/hostip.c
lib/hostip.h
+2
-2
2 additions, 2 deletions
lib/hostip.h
lib/hostip4.c
+1
-1
1 addition, 1 deletion
lib/hostip4.c
lib/hostip6.c
+2
-2
2 additions, 2 deletions
lib/hostip6.c
with
7 additions
and
7 deletions
lib/hostip.c
+
2
−
2
View file @
5cdbd0cf
...
...
@@ -552,9 +552,9 @@ struct curl_hash *Curl_mk_dnscache(void)
* returns a pointer to the malloc()ed copy. You need to call free() on the
* returned buffer when you're done with it.
*/
Curl_addrinfo
*
Curl_addrinfo_copy
(
void
*
org
,
int
port
)
Curl_addrinfo
*
Curl_addrinfo_copy
(
const
void
*
org
,
int
port
)
{
struct
hostent
*
orig
=
org
;
const
struct
hostent
*
orig
=
org
;
return
Curl_he2ai
(
orig
,
port
);
}
...
...
This diff is collapsed.
Click to expand it.
lib/hostip.h
+
2
−
2
View file @
5cdbd0cf
...
...
@@ -224,13 +224,13 @@ Curl_addrinfo *Curl_ip2addr(in_addr_t num, const char *hostname, int port);
/* [ipv4 only] Curl_he2ai() converts a struct hostent to a Curl_addrinfo chain
and returns it */
Curl_addrinfo
*
Curl_he2ai
(
struct
hostent
*
,
int
port
);
Curl_addrinfo
*
Curl_he2ai
(
const
struct
hostent
*
,
int
port
);
/* relocate a hostent struct */
void
Curl_hostent_relocate
(
struct
hostent
*
h
,
long
offset
);
/* Clone a Curl_addrinfo struct, works protocol independently */
Curl_addrinfo
*
Curl_addrinfo_copy
(
void
*
orig
,
int
port
);
Curl_addrinfo
*
Curl_addrinfo_copy
(
const
void
*
orig
,
int
port
);
/*
* Curl_printable_address() returns a printable version of the 1st address
...
...
This diff is collapsed.
Click to expand it.
lib/hostip4.c
+
1
−
1
View file @
5cdbd0cf
...
...
@@ -400,7 +400,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
* #define h_addr h_addr_list[0]
*/
Curl_addrinfo
*
Curl_he2ai
(
struct
hostent
*
he
,
int
port
)
Curl_addrinfo
*
Curl_he2ai
(
const
struct
hostent
*
he
,
int
port
)
{
Curl_addrinfo
*
ai
;
Curl_addrinfo
*
prevai
=
NULL
;
...
...
This diff is collapsed.
Click to expand it.
lib/hostip6.c
+
2
−
2
View file @
5cdbd0cf
...
...
@@ -104,10 +104,10 @@ void Curl_freeaddrinfo(Curl_addrinfo *p)
* address. But this is an ipv6 build and then we don't copy the address, we
* just return the same pointer!
*/
Curl_addrinfo
*
Curl_addrinfo_copy
(
void
*
source
,
int
port
)
Curl_addrinfo
*
Curl_addrinfo_copy
(
const
void
*
orig
,
int
port
)
{
(
void
)
port
;
return
source
;
return
(
Curl_addrinfo
*
)
orig
;
}
#endif
...
...
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