diff options
author | Dwight <dwight@10gen.com> | 2011-06-01 14:57:40 -0400 |
---|---|---|
committer | Dwight <dwight@10gen.com> | 2011-06-01 14:57:40 -0400 |
commit | e104e01f8410cef79e29e766d66133458df85220 (patch) | |
tree | fd9d6ac6db17e9a82f16347ef9bed2906cc39e70 /bson | |
parent | 224069295263b672736845ba40d7f79f82ee42e6 (diff) | |
download | mongo-e104e01f8410cef79e29e766d66133458df85220.tar.gz |
use memcmp, not strcmp for comparing BSON strings
Diffstat (limited to 'bson')
-rw-r--r-- | bson/util/builder.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bson/util/builder.h b/bson/util/builder.h index 816aa7c484a..710c2d43699 100644 --- a/bson/util/builder.h +++ b/bson/util/builder.h @@ -169,8 +169,8 @@ namespace mongo { appendBuf(&s, sizeof(T)); } - void appendStr(const StringData &str , bool includeEOO = true ) { - const int len = str.size() + ( includeEOO ? 1 : 0 ); + void appendStr(const StringData &str , bool includeEndingNull = true ) { + const int len = str.size() + ( includeEndingNull ? 1 : 0 ); memcpy(grow(len), str.data(), len); } |