Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
f1069e4a
Commit
f1069e4a
authored
Mar 23, 2011
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tdb2: avoid C++ reserved words (ie. private)
parent
e6862ec8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
ccan/tdb2/check.c
ccan/tdb2/check.c
+4
-3
ccan/tdb2/tdb2.h
ccan/tdb2/tdb2.h
+6
-6
No files found.
ccan/tdb2/check.c
View file @
f1069e4a
...
...
@@ -759,8 +759,8 @@ static enum TDB_ERROR check_linear(struct tdb_context *tdb,
enum
TDB_ERROR
tdb_check_
(
struct
tdb_context
*
tdb
,
enum
TDB_ERROR
(
*
check
)(
TDB_DATA
key
,
TDB_DATA
data
,
void
*
private
),
void
*
private
)
void
*
private
_data
),
void
*
private
_data
)
{
tdb_off_t
*
fr
=
NULL
,
*
used
=
NULL
,
ft
,
recovery
;
size_t
num_free
=
0
,
num_used
=
0
,
num_found
=
0
,
num_ftables
=
0
;
...
...
@@ -801,7 +801,8 @@ enum TDB_ERROR tdb_check_(struct tdb_context *tdb,
}
/* FIXME: Check key uniqueness? */
ecode
=
check_hash
(
tdb
,
used
,
num_used
,
num_ftables
,
check
,
private
);
ecode
=
check_hash
(
tdb
,
used
,
num_used
,
num_ftables
,
check
,
private_data
);
if
(
ecode
!=
TDB_SUCCESS
)
goto
out
;
...
...
ccan/tdb2/tdb2.h
View file @
f1069e4a
...
...
@@ -462,7 +462,7 @@ enum TDB_ERROR tdb_wipe_all(struct tdb_context *tdb);
* tdb_check - check a TDB for consistency
* @tdb: the tdb context returned from tdb_open()
* @check: function to check each key/data pair (or NULL)
* @private: argument for @check, must match type.
* @private
_data
: argument for @check, must match type.
*
* This performs a consistency check of the open database, optionally calling
* a check() function on each record so you can do your own data consistency
...
...
@@ -471,18 +471,18 @@ enum TDB_ERROR tdb_wipe_all(struct tdb_context *tdb);
*
* Returns TDB_SUCCESS or an error.
*/
#define tdb_check(tdb, check, private
)
\
#define tdb_check(tdb, check, private
_data)
\
tdb_check_((tdb), typesafe_cb_preargs(enum TDB_ERROR, \
(check), (private), \
(check), (private
_data
), \
struct tdb_data, \
struct tdb_data), \
(private))
(private
_data
))
enum
TDB_ERROR
tdb_check_
(
struct
tdb_context
*
tdb
,
enum
TDB_ERROR
(
*
check
)(
struct
tdb_data
key
,
struct
tdb_data
data
,
void
*
private
),
void
*
private
);
void
*
private
_data
),
void
*
private
_data
);
/**
* tdb_error - get the last error (not threadsafe)
...
...
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