aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/cpp/blaze_util.cc
diff options
context:
space:
mode:
authorGravatar Han-Wen Nienhuys <hanwen@google.com>2015-04-21 13:58:08 +0000
committerGravatar Laurent Le Brun <laurentlb@google.com>2015-04-22 12:30:00 +0000
commit36fbe63a68a81f1c4c921f83c4677bc4017c7151 (patch)
tree4683e3f17e27e1a23c4ef0336417f390f0195a71 /src/main/cpp/blaze_util.cc
parent051256dc2efcf5187a8e2ff1567f62e2187bdb82 (diff)
Header cleanups.
-- MOS_MIGRATED_REVID=91681168
Diffstat (limited to 'src/main/cpp/blaze_util.cc')
-rw-r--r--src/main/cpp/blaze_util.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main/cpp/blaze_util.cc b/src/main/cpp/blaze_util.cc
index 4f67533716..d94c048850 100644
--- a/src/main/cpp/blaze_util.cc
+++ b/src/main/cpp/blaze_util.cc
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "blaze_util.h"
+#include "src/main/cpp/blaze_util.h"
#include <errno.h>
#include <fcntl.h>
@@ -29,10 +29,11 @@
#include <unistd.h>
#include <sstream>
-#include "util/errors.h"
-#include "util/file.h"
-#include "util/numbers.h"
-#include "util/strings.h"
+#include "src/main/cpp/blaze_exit_code.h"
+#include "src/main/cpp/util/errors.h"
+#include "src/main/cpp/util/file.h"
+#include "src/main/cpp/util/numbers.h"
+#include "src/main/cpp/util/strings.h"
using blaze_util::die;
using blaze_util::pdie;
@@ -270,17 +271,16 @@ bool GetNullaryOption(const char *arg, const char *key) {
return true;
}
-blaze_exit_code::ExitCode CheckValidPort(
- const string &str, const string &option, string *error) {
+bool CheckValidPort(const string &str, const string &option, string *error) {
int number;
if (blaze_util::safe_strto32(str, &number) && number > 0 && number < 65536) {
- return blaze_exit_code::SUCCESS;
+ return true;
}
blaze_util::StringPrintf(error,
"Invalid argument to %s: '%s' (must be a valid port number).",
option.c_str(), str.c_str());
- return blaze_exit_code::BAD_ARGV;
+ return false;
}
bool VerboseLogging() {