mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-22 18:19:42 +00:00
Remove trailing whitespace
My editor doesn't like that!
This commit is contained in:
parent
2f88ce2d0d
commit
5d64d05be9
@ -21,7 +21,7 @@ variables:
|
|||||||
ASAN_SYMBOLIZER_PATH: /usr/lib/llvm-13/bin/llvm-symbolizer
|
ASAN_SYMBOLIZER_PATH: /usr/lib/llvm-13/bin/llvm-symbolizer
|
||||||
CLANG_FORMAT: clang-format-13
|
CLANG_FORMAT: clang-format-13
|
||||||
|
|
||||||
CFLAGS_COMMON: -fno-omit-frame-pointer -fno-optimize-sibling-calls -O1 -g -Wall -Wextra
|
CFLAGS_COMMON: -fno-omit-frame-pointer -fno-optimize-sibling-calls -O1 -g -Wall -Wextra
|
||||||
|
|
||||||
# Pass run-time flags to AddressSanitizer to get core dumps on error.
|
# Pass run-time flags to AddressSanitizer to get core dumps on error.
|
||||||
ASAN_OPTIONS: abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1
|
ASAN_OPTIONS: abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1
|
||||||
|
@ -78,7 +78,7 @@ conform well to BIND 9 C style:
|
|||||||
set showmode
|
set showmode
|
||||||
set autoindent
|
set autoindent
|
||||||
set expandtab
|
set expandtab
|
||||||
|
|
||||||
filetype plugin on
|
filetype plugin on
|
||||||
let c_syntax_for_h = 1
|
let c_syntax_for_h = 1
|
||||||
autocmd FileType c,cc,cpp set cindent
|
autocmd FileType c,cc,cpp set cindent
|
||||||
@ -86,7 +86,7 @@ conform well to BIND 9 C style:
|
|||||||
autocmd FileType c,cc,cpp set fo=rotcq
|
autocmd FileType c,cc,cpp set fo=rotcq
|
||||||
autocmd FileType c,cc,cpp set noexpandtab ts=8
|
autocmd FileType c,cc,cpp set noexpandtab ts=8
|
||||||
autocmd FileType python set ts=4 sw=4
|
autocmd FileType python set ts=4 sw=4
|
||||||
|
|
||||||
filetype indent on
|
filetype indent on
|
||||||
|
|
||||||
#### Vertical Whitespace
|
#### Vertical Whitespace
|
||||||
@ -136,7 +136,7 @@ Good:
|
|||||||
/*
|
/*
|
||||||
* Private variables.
|
* Private variables.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int a /* Description of 'a'. */
|
static int a /* Description of 'a'. */
|
||||||
static int b /* Description of 'b'. */
|
static int b /* Description of 'b'. */
|
||||||
static char * c /* Description of 'c'. */
|
static char * c /* Description of 'c'. */
|
||||||
@ -186,13 +186,13 @@ or for public files that do not declare any functions.
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/*****
|
/*****
|
||||||
***** Module Info
|
***** Module Info
|
||||||
*****/
|
*****/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (Module name here.)
|
* (Module name here.)
|
||||||
*
|
*
|
||||||
@ -216,20 +216,20 @@ or for public files that do not declare any functions.
|
|||||||
* Standards:
|
* Standards:
|
||||||
* (Any standards relevant to the module are listed here.)
|
* (Any standards relevant to the module are listed here.)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/***
|
/***
|
||||||
*** Imports
|
*** Imports
|
||||||
***/
|
***/
|
||||||
|
|
||||||
/* #includes here. */
|
/* #includes here. */
|
||||||
#include <isc/lang.h>
|
#include <isc/lang.h>
|
||||||
|
|
||||||
/***
|
/***
|
||||||
*** Types
|
*** Types
|
||||||
***/
|
***/
|
||||||
|
|
||||||
/* (Type definitions here.) */
|
/* (Type definitions here.) */
|
||||||
|
|
||||||
/***
|
/***
|
||||||
*** Functions
|
*** Functions
|
||||||
***/
|
***/
|
||||||
@ -273,7 +273,7 @@ list is more than one line long:
|
|||||||
func1(int i) {
|
func1(int i) {
|
||||||
/* whatever */
|
/* whatever */
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
func2(int first_argument, int next_argument,
|
func2(int first_argument, int next_argument,
|
||||||
int last_argument)
|
int last_argument)
|
||||||
@ -371,7 +371,7 @@ Good:
|
|||||||
|
|
||||||
os_result_t result;
|
os_result_t result;
|
||||||
os_descriptor_t s;
|
os_descriptor_t s;
|
||||||
|
|
||||||
result = os_socket_create(AF_INET, SOCK_STREAM, 0, &s);
|
result = os_socket_create(AF_INET, SOCK_STREAM, 0, &s);
|
||||||
if (result != OS_R_SUCCESS) {
|
if (result != OS_R_SUCCESS) {
|
||||||
/* Do something about the error. */
|
/* Do something about the error. */
|
||||||
@ -381,7 +381,7 @@ Good:
|
|||||||
Not so good:
|
Not so good:
|
||||||
|
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Obviously using interfaces like socket() (below) is allowed
|
* Obviously using interfaces like socket() (below) is allowed
|
||||||
* since otherwise you couldn't call operating system routines; the
|
* since otherwise you couldn't call operating system routines; the
|
||||||
@ -432,26 +432,26 @@ Good:
|
|||||||
|
|
||||||
/* Test if flag set. */
|
/* Test if flag set. */
|
||||||
if ((flags & FOO) != 0) {
|
if ((flags & FOO) != 0) {
|
||||||
|
|
||||||
}
|
}
|
||||||
/* Test if flag clear. */
|
/* Test if flag clear. */
|
||||||
if ((flags & BAR) == 0) {
|
if ((flags & BAR) == 0) {
|
||||||
|
|
||||||
}
|
}
|
||||||
/* Test if both flags set. */
|
/* Test if both flags set. */
|
||||||
if ((flags & (FOO|BAR)) == (FOO|BAR)) {
|
if ((flags & (FOO|BAR)) == (FOO|BAR)) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Bad:
|
Bad:
|
||||||
|
|
||||||
/* Test if flag set. */
|
/* Test if flag set. */
|
||||||
if (flags & FOO) {
|
if (flags & FOO) {
|
||||||
|
|
||||||
}
|
}
|
||||||
/* Test if flag clear. */
|
/* Test if flag clear. */
|
||||||
if (! (flags & BAR)) {
|
if (! (flags & BAR)) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#### Testing for Zero or Non-zero
|
#### Testing for Zero or Non-zero
|
||||||
@ -462,9 +462,9 @@ variables.
|
|||||||
Good:
|
Good:
|
||||||
|
|
||||||
int i = 10;
|
int i = 10;
|
||||||
|
|
||||||
/* ... */
|
/* ... */
|
||||||
|
|
||||||
if (i != 0) {
|
if (i != 0) {
|
||||||
/* Do something. */
|
/* Do something. */
|
||||||
}
|
}
|
||||||
@ -472,9 +472,9 @@ Good:
|
|||||||
Bad:
|
Bad:
|
||||||
|
|
||||||
int i = 10;
|
int i = 10;
|
||||||
|
|
||||||
/* ... */
|
/* ... */
|
||||||
|
|
||||||
if (i) {
|
if (i) {
|
||||||
/* Do something. */
|
/* Do something. */
|
||||||
}
|
}
|
||||||
@ -489,9 +489,9 @@ comparison; do not treat a pointer variable as if it were a boolean.
|
|||||||
Good:
|
Good:
|
||||||
|
|
||||||
char *c = NULL;
|
char *c = NULL;
|
||||||
|
|
||||||
/* ... */
|
/* ... */
|
||||||
|
|
||||||
if (c != NULL) {
|
if (c != NULL) {
|
||||||
/* Do something. */
|
/* Do something. */
|
||||||
}
|
}
|
||||||
@ -499,9 +499,9 @@ Good:
|
|||||||
Bad:
|
Bad:
|
||||||
|
|
||||||
char *c = NULL;
|
char *c = NULL;
|
||||||
|
|
||||||
/* ... */
|
/* ... */
|
||||||
|
|
||||||
if (c) {
|
if (c) {
|
||||||
/* Do something. */
|
/* Do something. */
|
||||||
}
|
}
|
||||||
@ -562,9 +562,9 @@ structure which is itself going to be freed immediately.
|
|||||||
Good:
|
Good:
|
||||||
|
|
||||||
char *text;
|
char *text;
|
||||||
|
|
||||||
/* text is initialized here. */
|
/* text is initialized here. */
|
||||||
|
|
||||||
isc_mem_free(mctx, text);
|
isc_mem_free(mctx, text);
|
||||||
text = NULL;
|
text = NULL;
|
||||||
|
|
||||||
@ -635,7 +635,7 @@ Good:
|
|||||||
int bar;
|
int bar;
|
||||||
int baz;
|
int baz;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct example x = { .foo = -1 };
|
struct example x = { .foo = -1 };
|
||||||
|
|
||||||
Bad:
|
Bad:
|
||||||
@ -644,9 +644,9 @@ Bad:
|
|||||||
int bar;
|
int bar;
|
||||||
int baz;
|
int baz;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct example x;
|
struct example x;
|
||||||
|
|
||||||
x.foo = -1;
|
x.foo = -1;
|
||||||
x.bar = 0;
|
x.bar = 0;
|
||||||
x.baz = 0;
|
x.baz = 0;
|
||||||
@ -657,9 +657,9 @@ Good:
|
|||||||
int bar;
|
int bar;
|
||||||
int baz;
|
int baz;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct example *x = isc_mem_get(mctx, sizeof(*x));
|
struct example *x = isc_mem_get(mctx, sizeof(*x));
|
||||||
|
|
||||||
*x = (struct example){ .foo = -1 };
|
*x = (struct example){ .foo = -1 };
|
||||||
|
|
||||||
Bad:
|
Bad:
|
||||||
@ -668,9 +668,9 @@ Bad:
|
|||||||
int bar;
|
int bar;
|
||||||
int baz;
|
int baz;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct example *x = isc_mem_get(mctx, sizeof(*x));
|
struct example *x = isc_mem_get(mctx, sizeof(*x));
|
||||||
|
|
||||||
x->foo = -1;
|
x->foo = -1;
|
||||||
x->bar = 0;
|
x->bar = 0;
|
||||||
x->baz = 0;
|
x->baz = 0;
|
||||||
@ -748,7 +748,7 @@ value of the format parameter:
|
|||||||
dns_zone_setfile(dns_zone_t *zone, const char *file) {
|
dns_zone_setfile(dns_zone_t *zone, const char *file) {
|
||||||
return (dns_zone_setfile2(zone, file, dns_masterformat_text);
|
return (dns_zone_setfile2(zone, file, dns_masterformat_text);
|
||||||
}
|
}
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
dns_zone_setfile2(dns_zone_t *zone, const char *file,
|
dns_zone_setfile2(dns_zone_t *zone, const char *file,
|
||||||
dns_masterformat_t format)
|
dns_masterformat_t format)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user