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
86028553
Commit
86028553
authored
Sep 25, 2010
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tdb2: don't use probe arg to oob()
We want it to complain if it's wrong...
parent
96964cc8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
ccan/tdb2/check.c
ccan/tdb2/check.c
+2
-3
No files found.
ccan/tdb2/check.c
View file @
86028553
...
@@ -287,8 +287,8 @@ static bool check_free(struct tdb_context *tdb,
...
@@ -287,8 +287,8 @@ static bool check_free(struct tdb_context *tdb,
return
false
;
return
false
;
}
}
if
(
tdb
->
methods
->
oob
(
tdb
,
off
if
(
tdb
->
methods
->
oob
(
tdb
,
off
+
frec
->
data_len
-
sizeof
(
struct
tdb_used_record
),
+
frec
->
data_len
+
sizeof
(
struct
tdb_used_record
),
tru
e
))
fals
e
))
return
false
;
return
false
;
if
(
off
<
zone_off
||
off
>=
zone_off
+
(
1ULL
<<
frec_zone_bits
(
frec
)))
{
if
(
off
<
zone_off
||
off
>=
zone_off
+
(
1ULL
<<
frec_zone_bits
(
frec
)))
{
tdb
->
log
(
tdb
,
TDB_DEBUG_ERROR
,
tdb
->
log_priv
,
tdb
->
log
(
tdb
,
TDB_DEBUG_ERROR
,
tdb
->
log_priv
,
...
@@ -487,7 +487,6 @@ int tdb_check(struct tdb_context *tdb,
...
@@ -487,7 +487,6 @@ int tdb_check(struct tdb_context *tdb,
unsigned
max_zone_bits
=
INITIAL_ZONE_BITS
;
unsigned
max_zone_bits
=
INITIAL_ZONE_BITS
;
uint8_t
tailer
;
uint8_t
tailer
;
/* This always ensures the header is uptodate. */
if
(
tdb_allrecord_lock
(
tdb
,
F_RDLCK
,
TDB_LOCK_WAIT
,
false
)
!=
0
)
if
(
tdb_allrecord_lock
(
tdb
,
F_RDLCK
,
TDB_LOCK_WAIT
,
false
)
!=
0
)
return
-
1
;
return
-
1
;
...
...
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