Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dhcp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
71
Issues
71
List
Boards
Labels
Service Desk
Milestones
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
dhcp
Commits
5eab8594
Commit
5eab8594
authored
Oct 01, 2007
by
Michael Graff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cast arguments for isspace(), isascii(), and other is*() functions to int.
parent
1418fd11
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
common/parse.c
common/parse.c
+2
-2
common/print.c
common/print.c
+2
-2
minires/res_init.c
minires/res_init.c
+3
-3
No files found.
common/parse.c
View file @
5eab8594
...
...
@@ -343,7 +343,7 @@ int parse_ip_addr (cfile, addr)
static
int
is_hex_string
(
const
char
*
s
)
{
while
(
*
s
!=
'\0'
)
{
if
(
!
isxdigit
(
*
s
))
{
if
(
!
isxdigit
(
(
int
)
*
s
))
{
return
0
;
}
s
++
;
...
...
@@ -4837,7 +4837,7 @@ struct option *option;
fmt
=
option
->
format
;
/* 'a' means always uniform */
if
((
fmt
[
0
]
!=
'\0'
)
&&
(
tolower
(
fmt
[
1
])
==
'a'
))
if
((
fmt
[
0
]
!=
'\0'
)
&&
(
tolower
(
(
int
)
fmt
[
1
])
==
'a'
))
uniform
=
1
;
do
{
...
...
common/print.c
View file @
5eab8594
...
...
@@ -45,7 +45,7 @@ char *quotify_string (const char *s, const char *file, int line)
for
(
sp
=
s
;
sp
&&
*
sp
;
sp
++
)
{
if
(
*
sp
==
' '
)
len
++
;
else
if
(
!
isascii
(
*
sp
)
||
!
isprint
(
*
sp
))
else
if
(
!
isascii
(
(
int
)
*
sp
)
||
!
isprint
((
int
)
*
sp
))
len
+=
4
;
else
if
(
*
sp
==
'"'
||
*
sp
==
'\\'
)
len
+=
2
;
...
...
@@ -59,7 +59,7 @@ char *quotify_string (const char *s, const char *file, int line)
for
(
sp
=
s
;
sp
&&
*
sp
;
sp
++
)
{
if
(
*
sp
==
' '
)
*
nsp
++
=
' '
;
else
if
(
!
isascii
(
*
sp
)
||
!
isprint
(
*
sp
))
{
else
if
(
!
isascii
(
(
int
)
*
sp
)
||
!
isprint
((
int
)
*
sp
))
{
sprintf
(
nsp
,
"
\\
%03o"
,
*
(
const
unsigned
char
*
)
sp
);
nsp
+=
4
;
...
...
minires/res_init.c
View file @
5eab8594
...
...
@@ -76,7 +76,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static
const
char
sccsid
[]
=
"@(#)res_init.c 8.1 (Berkeley) 6/7/93"
;
static
const
char
rcsid
[]
=
"$Id: res_init.c,v 1.
9 2007/09/05 17:32:10 dhankins
Exp $"
;
static
const
char
rcsid
[]
=
"$Id: res_init.c,v 1.
10 2007/10/01 14:47:35 explorer
Exp $"
;
#endif
/* LIBC_SCCS and not lint */
#include <sys/types.h>
...
...
@@ -321,7 +321,7 @@ minires_vinit(res_state statp, int preinit) {
break
;
net
=
cp
;
while
(
*
cp
&&
!
ISSORTMASK
(
*
cp
)
&&
*
cp
!=
';'
&&
isascii
(
*
cp
)
&&
!
isspace
(
*
cp
))
isascii
(
(
int
)
*
cp
)
&&
!
isspace
((
int
)
*
cp
))
cp
++
;
n
=
*
cp
;
*
cp
=
0
;
...
...
@@ -331,7 +331,7 @@ minires_vinit(res_state statp, int preinit) {
*
cp
++
=
n
;
net
=
cp
;
while
(
*
cp
&&
*
cp
!=
';'
&&
isascii
(
*
cp
)
&&
!
isspace
(
*
cp
))
isascii
(
(
int
)
*
cp
)
&&
!
isspace
((
int
)
*
cp
))
cp
++
;
n
=
*
cp
;
*
cp
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment