Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
fadf7291
Commit
fadf7291
authored
Nov 10, 2014
by
Evan Hunt
Browse files
[master] check creat() return
parent
0c3f2ff9
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/isc/tests/file_test.c
View file @
fadf7291
...
...
@@ -56,12 +56,12 @@ ATF_TC_BODY(isc_file_sanitize, tc) {
ATF_CHECK_EQ
(
result
,
ISC_R_SUCCESS
);
ATF_CHECK
(
strcmp
(
buf
,
F
(
NAME
))
==
0
);
creat
(
F
(
TRUNC_SHA
),
0644
);
ATF_CHECK
(
creat
(
F
(
TRUNC_SHA
),
0644
)
!=
-
1
)
;
result
=
isc_file_sanitize
(
"testdata/file"
,
NAME
,
"test"
,
buf
,
1024
);
ATF_CHECK_EQ
(
result
,
ISC_R_SUCCESS
);
ATF_CHECK
(
strcmp
(
buf
,
F
(
TRUNC_SHA
))
==
0
);
creat
(
F
(
SHA
),
0644
);
ATF_CHECK
(
creat
(
F
(
SHA
),
0644
)
!=
-
1
)
;
result
=
isc_file_sanitize
(
"testdata/file"
,
NAME
,
"test"
,
buf
,
1024
);
ATF_CHECK_EQ
(
result
,
ISC_R_SUCCESS
);
ATF_CHECK
(
strcmp
(
buf
,
F
(
SHA
))
==
0
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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