From: Mayank Agarwal Date: Fri, 15 Mar 2013 17:57:08 +0000 (-0700) Subject: Fixing a careless mistake in ldb X-Git-Tag: v1.5.8.1~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f04cc368f78cab7f1fd81191c112a21a051da5cc;p=rocksdb.git Fixing a careless mistake in ldb 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 --- diff --git a/util/ldb_cmd.h b/util/ldb_cmd.h index 12b5c4a5..bb47b919 100644 --- a/util/ldb_cmd.h +++ b/util/ldb_cmd.h @@ -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";