]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Fixing a careless mistake in ldb
authorMayank Agarwal <amayank@fb.com>
Fri, 15 Mar 2013 17:57:08 +0000 (10:57 -0700)
committerMayank Agarwal <amayank@fb.com>
Fri, 15 Mar 2013 20:59:11 +0000 (13:59 -0700)
Summary: negation of the condition checked currently had to be checkd actually

Test Plan: make ldb; python ldb_test.py

Reviewers: sheki, dhruba

Reviewed By: sheki

Differential Revision: https://reviews.facebook.net/D9459

util/ldb_cmd.h

index 12b5c4a52000305b664b213823204f13a6689f63..bb47b919db1e345c30d67bfc21c061f8d5da5cc8 100644 (file)
@@ -99,7 +99,7 @@ public:
 
   static string HexToString(const string& str) {
     string parsed;
-    if (str[0] == '0' && str[1] == 'x') {
+    if (str[0] != '0' || str[1] != 'x') {
       fprintf(stderr, "Invalid hex input %s.  Must start with 0x\n",
               str.c_str());
       throw "Invalid hex input";