From 84b7e98b805b86e4d63e2ce38a490e86541ed0da Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 28 Oct 2019 09:24:13 -0500 Subject: hscript: Make line a long for alignment --- hscript/disk.cc | 3 ++- hscript/key.hh | 6 +++--- hscript/script.cc | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'hscript') diff --git a/hscript/disk.cc b/hscript/disk.cc index aafa08c..3de34e1 100644 --- a/hscript/disk.cc +++ b/hscript/disk.cc @@ -38,7 +38,8 @@ using namespace Horizon::Keys; * @returns true if _block is valid, false otherwise. * @note Will output_error if an error occurs. */ -bool is_block_device(const std::string &key, int line, const std::string &_block) { +bool is_block_device(const std::string &key, long line, + const std::string &_block) { struct stat blk_stat; const char *block_c = _block.c_str(); if(access(block_c, F_OK) != 0 || stat(block_c, &blk_stat) != 0) { diff --git a/hscript/key.hh b/hscript/key.hh index 786df2d..0a53124 100644 --- a/hscript/key.hh +++ b/hscript/key.hh @@ -26,8 +26,8 @@ namespace Keys { class Key { protected: /*! The line number where this Key appeared. */ - int line; - Key(int _line) : line(_line) {} + long line; + Key(long _line) : line(_line) {} public: virtual ~Key(); @@ -56,7 +56,7 @@ public: */ virtual bool execute(ScriptOptions) const = 0; - int lineno() const { return this->line; } + long lineno() const { return this->line; } }; diff --git a/hscript/script.cc b/hscript/script.cc index 5849296..3815d1c 100644 --- a/hscript/script.cc +++ b/hscript/script.cc @@ -570,7 +570,7 @@ int validate_one_account(const std::string &name, UserDetail *detail, /* REQ: Runner.Validate.userpw.None */ if(!detail->passphrase) { - int line = detail->name->lineno(); + long line = detail->name->lineno(); output_warning("installfile:" + std::to_string(line), "username: " + name + " has no set passphrase", "This account will not be able to log in."); -- cgit v1.2.3-60-g2f50