diff options
author | Dwight <dmerriman@gmail.com> | 2008-06-29 22:33:59 -0400 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2008-06-29 22:33:59 -0400 |
commit | 0bc5be592deca0fa4fa869931fd340035295d5c7 (patch) | |
tree | df2bd84e9a6511247b6df1c6712c28f3a4bfe0b9 /db/storage.h | |
parent | d85e75b674f5ea45e936ca3a5409b54d937f361a (diff) | |
download | mongo-0bc5be592deca0fa4fa869931fd340035295d5c7.tar.gz |
validate a little smarter
Diffstat (limited to 'db/storage.h')
-rw-r--r-- | db/storage.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/db/storage.h b/db/storage.h index 3bd70604118..dd15a38df8e 100644 --- a/db/storage.h +++ b/db/storage.h @@ -30,6 +30,12 @@ public: DiskLoc(const DiskLoc& l) { fileNo=l.fileNo; ofs=l.ofs; } + bool questionable() { + return ofs < -1 || + fileNo < -1 || + fileNo > 20; + } + bool isNull() const { return ofs == NullOfs; } void Null() { fileNo = -1; ofs = NullOfs; } void setInvalid() { fileNo = -2; } |