Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
73253721
Commit
73253721
authored
Feb 20, 2005
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cast char* to uchar* when dereferencing characters for isdigit()
and isprint().
parent
4adbb5f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
util.c
util.c
+3
-3
No files found.
util.c
View file @
73253721
...
@@ -891,7 +891,7 @@ const char *safe_fname(const char *fname)
...
@@ -891,7 +891,7 @@ const char *safe_fname(const char *fname)
ndx
=
(
ndx
+
1
)
%
MAX_SAFE_NAMES
;
ndx
=
(
ndx
+
1
)
%
MAX_SAFE_NAMES
;
for
(
t
=
fbuf
[
ndx
];
*
fname
;
fname
++
)
{
for
(
t
=
fbuf
[
ndx
];
*
fname
;
fname
++
)
{
if
(
!
isprint
(
*
fname
))
if
(
!
isprint
(
*
(
uchar
*
)
fname
))
*
t
++
=
'?'
;
*
t
++
=
'?'
;
else
else
*
t
++
=
*
fname
;
*
t
++
=
*
fname
;
...
@@ -1262,7 +1262,7 @@ const char *find_filename_suffix(const char *fn, int fn_len, int *len_ptr)
...
@@ -1262,7 +1262,7 @@ const char *find_filename_suffix(const char *fn, int fn_len, int *len_ptr)
if
(
strcmp
(
s
+
1
,
"orig"
)
==
0
)
if
(
strcmp
(
s
+
1
,
"orig"
)
==
0
)
continue
;
continue
;
}
else
if
(
s_len
>
2
&&
had_tilde
}
else
if
(
s_len
>
2
&&
had_tilde
&&
s
[
1
]
==
'~'
&&
isdigit
(
s
[
2
]
))
&&
s
[
1
]
==
'~'
&&
isdigit
(
*
(
uchar
*
)(
s
+
2
)
))
continue
;
continue
;
*
len_ptr
=
s_len
;
*
len_ptr
=
s_len
;
suf
=
s
;
suf
=
s
;
...
@@ -1270,7 +1270,7 @@ const char *find_filename_suffix(const char *fn, int fn_len, int *len_ptr)
...
@@ -1270,7 +1270,7 @@ const char *find_filename_suffix(const char *fn, int fn_len, int *len_ptr)
break
;
break
;
/* Determine if the suffix is all digits. */
/* Determine if the suffix is all digits. */
for
(
s
++
,
s_len
--
;
s_len
>
0
;
s
++
,
s_len
--
)
{
for
(
s
++
,
s_len
--
;
s_len
>
0
;
s
++
,
s_len
--
)
{
if
(
!
isdigit
(
*
s
))
if
(
!
isdigit
(
*
(
uchar
*
)
s
))
return
suf
;
return
suf
;
}
}
/* An all-digit suffix may not be that signficant. */
/* An all-digit suffix may not be that signficant. */
...
...
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