summaryrefslogtreecommitdiff
path: root/bson
diff options
context:
space:
mode:
authorDwight <dwight@10gen.com>2011-06-01 14:57:40 -0400
committerDwight <dwight@10gen.com>2011-06-01 14:57:40 -0400
commite104e01f8410cef79e29e766d66133458df85220 (patch)
treefd9d6ac6db17e9a82f16347ef9bed2906cc39e70 /bson
parent224069295263b672736845ba40d7f79f82ee42e6 (diff)
downloadmongo-e104e01f8410cef79e29e766d66133458df85220.tar.gz
use memcmp, not strcmp for comparing BSON strings
Diffstat (limited to 'bson')
-rw-r--r--bson/util/builder.h4
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);
}