Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
unique-xids
Commits
a8e77732
Commit
a8e77732
authored
Sep 22, 2011
by
Poul-Henning Kamp
Committed by
Tollef Fog Heen
Feb 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A quick style polish
parent
d04d9c99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
+18
-12
vre.c
lib/libvarnish/vre.c
+18
-12
No files found.
lib/libvarnish/vre.c
View file @
a8e77732
...
...
@@ -38,41 +38,47 @@ struct vre {
pcre
*
re
;
};
vre_t
*
VRE_compile
(
const
char
*
pattern
,
int
options
,
const
char
**
errptr
,
int
*
erroffset
)
{
vre_t
*
VRE_compile
(
const
char
*
pattern
,
int
options
,
const
char
**
errptr
,
int
*
erroffset
)
{
vre_t
*
v
;
*
errptr
=
NULL
;
*
erroffset
=
0
;
ALLOC_OBJ
(
v
,
VRE_MAGIC
);
AN
(
v
);
if
(
v
==
NULL
)
return
(
NULL
);
v
->
re
=
pcre_compile
(
pattern
,
options
,
errptr
,
erroffset
,
NULL
);
if
(
v
->
re
==
NULL
)
{
VRE_free
(
&
v
);
return
NULL
;
return
(
NULL
)
;
}
return
v
;
return
(
v
)
;
}
int
VRE_exec
(
const
vre_t
*
code
,
const
char
*
subject
,
int
length
,
int
startoffset
,
int
options
,
int
*
ovector
,
int
ovecsize
)
{
int
VRE_exec
(
const
vre_t
*
code
,
const
char
*
subject
,
int
length
,
int
startoffset
,
int
options
,
int
*
ovector
,
int
ovecsize
)
{
CHECK_OBJ_NOTNULL
(
code
,
VRE_MAGIC
);
int
ov
[
30
];
if
(
ovector
==
NULL
)
{
ovector
=
ov
;
ovecsize
=
sizeof
(
ov
)
/
sizeof
(
ov
[
0
]);
}
return
pcre_exec
(
code
->
re
,
NULL
,
subject
,
length
,
startoffset
,
options
,
ovector
,
ovecsize
);
return
(
pcre_exec
(
code
->
re
,
NULL
,
subject
,
length
,
startoffset
,
options
,
ovector
,
ovecsize
)
);
}
void
VRE_free
(
vre_t
**
vv
)
{
void
VRE_free
(
vre_t
**
vv
)
{
vre_t
*
v
=
*
vv
;
*
vv
=
NULL
;
CHECK_OBJ
(
v
,
VRE_MAGIC
);
pcre_free
(
v
->
re
);
v
->
magic
=
0
;
FREE_OBJ
(
v
);
}
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