Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
3b81805f
Commit
3b81805f
authored
Feb 26, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trivial: turn OPTS() to a function
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
660e35a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
ppsi.h
include/ppsi/ppsi.h
+5
-1
open-close.c
proto-ext-whiterabbit/open-close.c
+2
-2
open-close.c
proto-standard/open-close.c
+2
-2
No files found.
include/ppsi/ppsi.h
View file @
3b81805f
...
...
@@ -256,7 +256,11 @@ struct pp_instance {
waiting_for_follow
:
1
;
};
#define OPTS(x) ((x)->rt_opts)
/* We use data sets a lot, so have these helpers */
static
inline
struct
pp_runtime_opts
*
OPTS
(
struct
pp_instance
*
ppi
)
{
return
ppi
->
rt_opts
;
}
#define DSDEF(x) ((x)->defaultDS)
#define DSCUR(x) ((x)->currentDS)
...
...
proto-ext-whiterabbit/open-close.c
View file @
3b81805f
...
...
@@ -49,9 +49,9 @@ static struct wr_data_t wr_data; /* white rabbit specific global data */
int
pp_open_instance
(
struct
pp_instance
*
ppi
,
struct
pp_runtime_opts
*
rt_opts
)
{
if
(
rt_opts
)
OPTS
(
ppi
)
=
rt_opts
;
ppi
->
rt_opts
=
rt_opts
;
else
OPTS
(
ppi
)
=
&
default_rt_opts
;
ppi
->
rt_opts
=
&
default_rt_opts
;
ppi
->
ext_data
=
&
wr_data
;
...
...
proto-standard/open-close.c
View file @
3b81805f
...
...
@@ -45,9 +45,9 @@ struct pp_runtime_opts default_rt_opts = {
int
pp_open_instance
(
struct
pp_instance
*
ppi
,
struct
pp_runtime_opts
*
rt_opts
)
{
if
(
rt_opts
)
OPTS
(
ppi
)
=
rt_opts
;
ppi
->
rt_opts
=
rt_opts
;
else
OPTS
(
ppi
)
=
&
default_rt_opts
;
ppi
->
rt_opts
=
&
default_rt_opts
;
ppi
->
state
=
PPS_INITIALIZING
;
...
...
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