Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent
Commits
d84cc955
Commit
d84cc955
authored
Apr 20, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor the declaration and initialization of VSBs in format.c
parent
c1ffcdd6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
format.c
src/format.c
+4
-9
No files found.
src/format.c
View file @
d84cc955
...
@@ -52,8 +52,8 @@ typedef struct compiled_fmt_t {
...
@@ -52,8 +52,8 @@ typedef struct compiled_fmt_t {
unsigned
n
;
unsigned
n
;
}
compiled_fmt_t
;
}
compiled_fmt_t
;
static
struct
vsb
*
payload
;
static
struct
vsb
payload_storage
,
*
const
payload
=
&
payload_storage
,
static
struct
vsb
*
bintag
;
bintag_storage
,
*
const
bintag
=
&
bintag_storage
;
static
char
*
scratch
=
NULL
;
static
char
*
scratch
=
NULL
;
static
char
empty
[]
=
""
;
static
char
empty
[]
=
""
;
...
@@ -1200,13 +1200,8 @@ FMT_Init(char *err)
...
@@ -1200,13 +1200,8 @@ FMT_Init(char *err)
if
(
scratch
==
NULL
)
if
(
scratch
==
NULL
)
return
errno
;
return
errno
;
payload
=
VSB_new
(
NULL
,
NULL
,
config
.
max_reclen
+
1
,
VSB_FIXEDLEN
);
AN
(
VSB_new
(
payload
,
NULL
,
config
.
max_reclen
+
1
,
VSB_FIXEDLEN
));
if
(
payload
==
NULL
)
AN
(
VSB_new
(
bintag
,
NULL
,
config
.
max_reclen
+
1
,
VSB_FIXEDLEN
));
return
ENOMEM
;
bintag
=
VSB_new
(
NULL
,
NULL
,
config
.
max_reclen
+
1
,
VSB_FIXEDLEN
);
if
(
bintag
==
NULL
)
return
ENOMEM
;
includes
=
0
;
includes
=
0
;
for
(
int
i
=
0
;
i
<
MAX_VSL_TAG
;
i
++
)
{
for
(
int
i
=
0
;
i
<
MAX_VSL_TAG
;
i
++
)
{
...
...
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