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
8cb344bf
Commit
8cb344bf
authored
19 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
use less code and prevent compiler warning
parent
fcc4518c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/server/resolve.c
+5
-10
5 additions, 10 deletions
tests/server/resolve.c
with
5 additions
and
10 deletions
tests/server/resolve.c
+
5
−
10
View file @
8cb344bf
...
...
@@ -76,6 +76,7 @@ int main(int argc, char *argv[])
{
int
arg
=
1
;
char
*
host
;
int
rc
;
while
(
argc
>
arg
)
{
if
(
!
strcmp
(
"--version"
,
argv
[
arg
]))
{
...
...
@@ -125,17 +126,13 @@ int main(int argc, char *argv[])
he
=
gethostbyname
(
host
);
if
(
!
he
)
printf
(
"Resolving '%s' FAILED
\n
"
,
host
);
return
he
?
0
:
1
;
rc
=
!
he
;
}
#ifdef ENABLE_IPV6
else
{
/* getaddrinfo() resolve */
struct
addrinfo
*
ai
;
struct
addrinfo
hints
;
int
rc
;
memset
(
&
hints
,
0
,
sizeof
(
hints
));
hints
.
ai_family
=
PF_INET6
;
...
...
@@ -143,12 +140,10 @@ int main(int argc, char *argv[])
hints
.
ai_flags
=
AI_CANONNAME
;
rc
=
(
getaddrinfo
)(
host
,
"80"
,
&
hints
,
&
ai
);
if
(
rc
)
printf
(
"Resolving '%s' FAILED
\n
"
,
host
);
return
!
rc
?
0
:
1
;
}
#endif
if
(
rc
)
printf
(
"Resolving '%s' FAILED
\n
"
,
host
);
return
0
;
return
!
rc
?
0
:
1
;
}
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