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
646a94be
Unverified
Commit
646a94be
authored
Nov 18, 2018
by
Edward Thomson
Committed by
GitHub
Nov 18, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4847 from noahp/noahp/null-arg-fixes
tests:
馃寑
address two null argument instances
parents
5c213e29
f127ce35
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
src/apply.c
+2
-1
tests/apply/fromfile.c
+2
-1
No files found.
src/apply.c
View file @
646a94be
...
@@ -348,8 +348,9 @@ static int apply_binary(
...
@@ -348,8 +348,9 @@ static int apply_binary(
&
patch
->
binary
.
old_file
))
<
0
)
&
patch
->
binary
.
old_file
))
<
0
)
goto
done
;
goto
done
;
/* Verify that the resulting file with the reverse patch applied matches the source file */
if
(
source_len
!=
reverse
.
size
||
if
(
source_len
!=
reverse
.
size
||
memcmp
(
source
,
reverse
.
ptr
,
source_len
)
!=
0
)
{
(
source_len
&&
memcmp
(
source
,
reverse
.
ptr
,
source_len
)
!=
0
)
)
{
error
=
apply_err
(
"binary patch did not apply cleanly"
);
error
=
apply_err
(
"binary patch did not apply cleanly"
);
goto
done
;
goto
done
;
}
}
...
...
tests/apply/fromfile.c
View file @
646a94be
...
@@ -43,7 +43,8 @@ static int apply_patchfile(
...
@@ -43,7 +43,8 @@ static int apply_patchfile(
if
(
error
==
0
)
{
if
(
error
==
0
)
{
cl_assert_equal_i
(
new_len
,
result
.
size
);
cl_assert_equal_i
(
new_len
,
result
.
size
);
cl_assert
(
memcmp
(
new
,
result
.
ptr
,
new_len
)
==
0
);
if
(
new_len
)
cl_assert
(
memcmp
(
new
,
result
.
ptr
,
new_len
)
==
0
);
cl_assert_equal_s
(
filename_expected
,
filename
);
cl_assert_equal_s
(
filename_expected
,
filename
);
cl_assert_equal_i
(
mode_expected
,
mode
);
cl_assert_equal_i
(
mode_expected
,
mode
);
...
...
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