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
c09af06d
Commit
c09af06d
authored
Dec 27, 2006
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made the int_byte_cnt[] array 75% smaller.
parent
ded73ed9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
18 deletions
+6
-18
io.c
io.c
+6
-18
No files found.
io.c
View file @
c09af06d
...
...
@@ -85,23 +85,11 @@ static int select_timeout = SELECT_TIMEOUT;
static
int
active_filecnt
=
0
;
static
OFF_T
active_bytecnt
=
0
;
static
char
int_byte_cnt
[
256
]
=
{
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
/* 00 - 0F */
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
/* 10 - 1F */
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
/* 20 - 2F */
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
/* 30 - 3F */
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
/* 40 - 4F */
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3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- BF)/4 */
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
6
,
6
,
6
,
6
,
7
,
7
,
8
,
9
,
/* (C0 - FF)/4 */
};
static
void
read_loop
(
int
fd
,
char
*
buf
,
size_t
len
);
...
...
@@ -929,7 +917,7 @@ int64 read_longint(int f)
}
else
{
int
cnt
;
readfd
(
f
,
b
,
3
);
cnt
=
int_byte_cnt
[
CVAL
(
b
,
0
)];
cnt
=
int_byte_cnt
[
CVAL
(
b
,
0
)
/
4
];
#if SIZEOF_INT64 < 8
if
(
cnt
>
5
||
(
cnt
==
5
&&
(
CVAL
(
b
,
0
)
&
0x3F
||
CVAL
(
b
,
1
)
&
0x80
)))
{
rprintf
(
FERROR
,
"Integer overflow: attempted 64-bit offset
\n
"
);
...
...
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