Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
4152a44b
Commit
4152a44b
authored
May 17, 2011
by
Jakob Pfender
Committed by
Vicent Marti
May 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delta-apply.c: Move to new error handling mechanism
parent
21dcb75a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/delta-apply.c
+3
-3
No files found.
src/delta-apply.c
View file @
4152a44b
...
@@ -46,10 +46,10 @@ int git__delta_apply(
...
@@ -46,10 +46,10 @@ int git__delta_apply(
* base object, resulting in data corruption or segfault.
* base object, resulting in data corruption or segfault.
*/
*/
if
((
hdr_sz
(
&
base_sz
,
&
delta
,
delta_end
)
<
0
)
||
(
base_sz
!=
base_len
))
if
((
hdr_sz
(
&
base_sz
,
&
delta
,
delta_end
)
<
0
)
||
(
base_sz
!=
base_len
))
return
GIT_ERROR
;
return
git__throw
(
GIT_ERROR
,
"Failed to apply delta. Base size does not match given data"
)
;
if
(
hdr_sz
(
&
res_sz
,
&
delta
,
delta_end
)
<
0
)
if
(
hdr_sz
(
&
res_sz
,
&
delta
,
delta_end
)
<
0
)
return
GIT_ERROR
;
return
git__throw
(
GIT_ERROR
,
"Failed to apply delta. Base size does not match given data"
)
;
if
((
res_dp
=
git__malloc
(
res_sz
+
1
))
==
NULL
)
if
((
res_dp
=
git__malloc
(
res_sz
+
1
))
==
NULL
)
return
GIT_ENOMEM
;
return
GIT_ENOMEM
;
...
@@ -105,5 +105,5 @@ int git__delta_apply(
...
@@ -105,5 +105,5 @@ int git__delta_apply(
fail:
fail:
free
(
out
->
data
);
free
(
out
->
data
);
out
->
data
=
NULL
;
out
->
data
=
NULL
;
return
GIT_ERROR
;
return
git__throw
(
GIT_ERROR
,
"Failed to apply delta"
)
;
}
}
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