Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
4957255d
Commit
4957255d
authored
Sep 05, 2019
by
Ondřej Surý
Browse files
Use the semantic patch to change the usage isc_mem_create() to new API
parent
6bd2eb06
Changes
85
Hide whitespace changes
Inline
Side-by-side
bin/check/check-tool.c
View file @
4957255d
...
...
@@ -127,9 +127,7 @@ add(char *key, int value) {
isc_symvalue_t
symvalue
;
if
(
sym_mctx
==
NULL
)
{
result
=
isc_mem_create
(
0
,
0
,
&
sym_mctx
);
if
(
result
!=
ISC_R_SUCCESS
)
return
;
isc_mem_create
(
&
sym_mctx
);
}
if
(
symtab
==
NULL
)
{
...
...
bin/check/named-checkconf.c
View file @
4957255d
...
...
@@ -585,7 +585,7 @@ main(int argc, char **argv) {
}
isc_commandline_reset
=
true
;
RUNTIME_CHECK
(
isc_mem_create
(
0
,
0
,
&
mctx
)
==
ISC_R_SUCCESS
);
isc_mem_create
(
&
mctx
);
while
((
c
=
isc_commandline_parse
(
argc
,
argv
,
CMDLINE_FLAGS
))
!=
EOF
)
{
switch
(
c
)
{
...
...
bin/check/named-checkzone.c
View file @
4957255d
...
...
@@ -517,7 +517,7 @@ main(int argc, char **argv) {
InitSockets
();
#endif
RUNTIME_CHECK
(
isc_mem_create
(
0
,
0
,
&
mctx
)
==
ISC_R_SUCCESS
);
isc_mem_create
(
&
mctx
);
if
(
!
quiet
)
RUNTIME_CHECK
(
setup_logging
(
mctx
,
errout
,
&
lctx
)
==
ISC_R_SUCCESS
);
...
...
bin/confgen/ddns-confgen.c
View file @
4957255d
...
...
@@ -207,7 +207,7 @@ main(int argc, char **argv) {
/* Use canonical algorithm name */
algname
=
alg_totext
(
alg
);
DO
(
"create memory context"
,
isc_mem_create
(
0
,
0
,
&
mctx
)
)
;
isc_mem_create
(
&
mctx
);
if
(
keyname
==
NULL
)
{
const
char
*
suffix
=
NULL
;
...
...
bin/confgen/rndc-confgen.c
View file @
4957255d
...
...
@@ -209,7 +209,7 @@ main(int argc, char **argv) {
keysize
=
alg_bits
(
alg
);
algname
=
alg_totext
(
alg
);
DO
(
"create memory context"
,
isc_mem_create
(
0
,
0
,
&
mctx
)
)
;
isc_mem_create
(
&
mctx
);
isc_buffer_init
(
&
key_txtbuffer
,
&
key_txtsecret
,
sizeof
(
key_txtsecret
));
generate_key
(
mctx
,
alg
,
keysize
,
&
key_txtbuffer
);
...
...
bin/delv/delv.c
View file @
4957255d
...
...
@@ -1642,9 +1642,7 @@ main(int argc, char *argv[]) {
if
(
result
!=
ISC_R_SUCCESS
)
fatal
(
"dns_lib_init failed: %d"
,
result
);
result
=
isc_mem_create
(
0
,
0
,
&
mctx
);
if
(
result
!=
ISC_R_SUCCESS
)
fatal
(
"failed to create mctx"
);
isc_mem_create
(
&
mctx
);
CHECK
(
isc_appctx_create
(
mctx
,
&
actx
));
CHECK
(
isc_taskmgr_createinctx
(
mctx
,
1
,
0
,
&
taskmgr
));
...
...
bin/dig/dighost.c
View file @
4957255d
...
...
@@ -1365,8 +1365,7 @@ setup_libs(void) {
if
(
!
have_ipv6
&&
!
have_ipv4
)
fatal
(
"can't find either v4 or v6 networking"
);
result
=
isc_mem_create
(
0
,
0
,
&
mctx
);
check_result
(
result
,
"isc_mem_create"
);
isc_mem_create
(
&
mctx
);
isc_mem_setname
(
mctx
,
"dig"
,
NULL
);
result
=
isc_log_create
(
mctx
,
&
lctx
,
&
logconfig
);
...
...
bin/dnssec/dnssec-cds.c
View file @
4957255d
...
...
@@ -1074,10 +1074,7 @@ main(int argc, char *argv[]) {
int
ch
;
char
*
endp
;
result
=
isc_mem_create
(
0
,
0
,
&
mctx
);
if
(
result
!=
ISC_R_SUCCESS
)
{
fatal
(
"out of memory"
);
}
isc_mem_create
(
&
mctx
);
#if USE_PKCS11
pk11_result_register
();
...
...
bin/dnssec/dnssec-dsfromkey.c
View file @
4957255d
...
...
@@ -350,10 +350,7 @@ main(int argc, char **argv) {
usage
();
}
result
=
isc_mem_create
(
0
,
0
,
&
mctx
);
if
(
result
!=
ISC_R_SUCCESS
)
{
fatal
(
"out of memory"
);
}
isc_mem_create
(
&
mctx
);
#if USE_PKCS11
pk11_result_register
();
...
...
bin/dnssec/dnssec-importkey.c
View file @
4957255d
...
...
@@ -300,9 +300,7 @@ main(int argc, char **argv) {
if
(
argc
==
1
)
usage
();
result
=
isc_mem_create
(
0
,
0
,
&
mctx
);
if
(
result
!=
ISC_R_SUCCESS
)
fatal
(
"out of memory"
);
isc_mem_create
(
&
mctx
);
#if USE_PKCS11
pk11_result_register
();
...
...
bin/dnssec/dnssec-keyfromlabel.c
View file @
4957255d
...
...
@@ -163,7 +163,7 @@ main(int argc, char **argv) {
if
(
argc
==
1
)
usage
();
RUNTIME_CHECK
(
isc_mem_create
(
0
,
0
,
&
mctx
)
==
ISC_R_SUCCESS
);
isc_mem_create
(
&
mctx
);
#if USE_PKCS11
pk11_result_register
();
...
...
bin/dnssec/dnssec-keygen.c
View file @
4957255d
...
...
@@ -259,7 +259,7 @@ main(int argc, char **argv) {
}
isc_commandline_reset
=
true
;
RUNTIME_CHECK
(
isc_mem_create
(
0
,
0
,
&
mctx
)
==
ISC_R_SUCCESS
);
isc_mem_create
(
&
mctx
);
isc_stdtime_get
(
&
now
);
...
...
bin/dnssec/dnssec-revoke.c
View file @
4957255d
...
...
@@ -88,9 +88,7 @@ main(int argc, char **argv) {
if
(
argc
==
1
)
usage
();
result
=
isc_mem_create
(
0
,
0
,
&
mctx
);
if
(
result
!=
ISC_R_SUCCESS
)
fatal
(
"Out of memory"
);
isc_mem_create
(
&
mctx
);
#if HAVE_PKCS11
pk11_result_register
();
...
...
bin/dnssec/dnssec-settime.c
View file @
4957255d
...
...
@@ -167,9 +167,7 @@ main(int argc, char **argv) {
if
(
argc
==
1
)
usage
();
result
=
isc_mem_create
(
0
,
0
,
&
mctx
);
if
(
result
!=
ISC_R_SUCCESS
)
fatal
(
"Out of memory"
);
isc_mem_create
(
&
mctx
);
setup_logging
(
mctx
,
&
log
);
...
...
bin/dnssec/dnssec-signzone.c
View file @
4957255d
...
...
@@ -3230,9 +3230,7 @@ main(int argc, char *argv[]) {
check_result
(
isc_app_start
(),
"isc_app_start"
);
result
=
isc_mem_create
(
0
,
0
,
&
mctx
);
if
(
result
!=
ISC_R_SUCCESS
)
fatal
(
"out of memory"
);
isc_mem_create
(
&
mctx
);
#if USE_PKCS11
pk11_result_register
();
...
...
bin/dnssec/dnssec-verify.c
View file @
4957255d
...
...
@@ -209,9 +209,7 @@ main(int argc, char *argv[]) {
isc_commandline_reset
=
true
;
check_result
(
isc_app_start
(),
"isc_app_start"
);
result
=
isc_mem_create
(
0
,
0
,
&
mctx
);
if
(
result
!=
ISC_R_SUCCESS
)
fatal
(
"out of memory"
);
isc_mem_create
(
&
mctx
);
#if USE_PKCS11
pk11_result_register
();
...
...
bin/named/main.c
View file @
4957255d
...
...
@@ -1462,10 +1462,7 @@ main(int argc, char *argv[]) {
named_g_chrootdir
);
}
result
=
isc_mem_create
(
0
,
0
,
&
named_g_mctx
);
if
(
result
!=
ISC_R_SUCCESS
)
named_main_earlyfatal
(
"isc_mem_create() failed: %s"
,
isc_result_totext
(
result
));
isc_mem_create
(
&
named_g_mctx
);
isc_mem_setname
(
named_g_mctx
,
"main"
,
NULL
);
setup
();
...
...
bin/named/server.c
View file @
4957255d
...
...
@@ -4349,9 +4349,9 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
* cache, for the main cache memory and the heap
* memory.
*/
CHECK
(
isc_mem_create
(
0
,
0
,
&
cmctx
)
)
;
isc_mem_create
(
&
cmctx
);
isc_mem_setname
(
cmctx
,
"cache"
,
NULL
);
CHECK
(
isc_mem_create
(
0
,
0
,
&
hmctx
)
)
;
isc_mem_create
(
&
hmctx
);
isc_mem_setname
(
hmctx
,
"cache_heap"
,
NULL
);
CHECK
(
dns_cache_create
(
cmctx
,
hmctx
,
named_g_taskmgr
,
named_g_timermgr
,
view
->
rdclass
,
...
...
bin/named/unix/dlz_dlopen_driver.c
View file @
4957255d
...
...
@@ -225,9 +225,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
return
(
ISC_R_FAILURE
);
}
result
=
isc_mem_create
(
0
,
0
,
&
mctx
);
if
(
result
!=
ISC_R_SUCCESS
)
return
(
result
);
isc_mem_create
(
&
mctx
);
cd
=
isc_mem_get
(
mctx
,
sizeof
(
*
cd
));
memset
(
cd
,
0
,
sizeof
(
*
cd
));
...
...
bin/named/win32/dlz_dlopen_driver.c
View file @
4957255d
...
...
@@ -224,7 +224,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
return
(
ISC_R_FAILURE
);
}
isc_mem_create
(
0
,
0
,
&
mctx
);
isc_mem_create
(
&
mctx
);
cd
=
isc_mem_get
(
mctx
,
sizeof
(
*
cd
));
memset
(
cd
,
0
,
sizeof
(
*
cd
));
...
...
Prev
1
2
3
4
5
Next
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