diff options
author | Peter Stadler <peter.stadler@student.uibk.ac.at> | 2020-05-26 16:21:10 +0200 |
---|---|---|
committer | Peter Stadler <peter.stadler@student.uibk.ac.at> | 2020-05-26 18:36:03 +0200 |
commit | 2d359a45566ea02792d3f63d7fe4ec1bdb1de2ae (patch) | |
tree | dfafc29439d2569fef9a6c5771ace2c76db19659 /net/nginx-util/src/px5g.cpp | |
parent | 5e6b871e9ee1c10337d02f6049bfe780f381e25a (diff) |
nginx-util: fix issues and cleanup
* fix regex capture (to conform std)
* fix issues for Clang/libcxx (warnings/includes)
* fix CONFLICTS in the Makefile
* use /bin/sh in host scripts and shellcheck them
* add callback for setting arguments in ubus::call
Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
Diffstat (limited to 'net/nginx-util/src/px5g.cpp')
-rw-r--r-- | net/nginx-util/src/px5g.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/nginx-util/src/px5g.cpp b/net/nginx-util/src/px5g.cpp index 5ad13357b..e2a073d35 100644 --- a/net/nginx-util/src/px5g.cpp +++ b/net/nginx-util/src/px5g.cpp @@ -118,7 +118,7 @@ auto checkend(const argv_view & argv) -> int } catch (...) { auto errmsg = std::string{"checkend error: invalid time "}; errmsg += argv[i]; - std::throw_with_nested(std::runtime_error(errmsg.c_str())); + std::throw_with_nested(std::runtime_error(errmsg)); } seconds = static_cast<time_t>(num); @@ -126,7 +126,7 @@ auto checkend(const argv_view & argv) -> int if (num!=static_cast<intmax_t>(seconds)) { auto errmsg = std::string{"checkend error: time too big "}; errmsg += argv[i]; - throw std::runtime_error(errmsg.c_str()); + throw std::runtime_error(errmsg); } } } @@ -174,7 +174,7 @@ void eckey(const argv_view & argv) if (has_main_option) { throw std::runtime_error ("eckey error: more than one main option"); - } // else: + } //else: has_main_option = true; curve = parse_curve(argv[i]); @@ -223,7 +223,7 @@ void rsakey(const argv_view & argv) if (has_main_option) { throw std::runtime_error("rsakey error: more than one keysize"); - } // else: + } //else: has_main_option = true; try { @@ -231,7 +231,7 @@ void rsakey(const argv_view & argv) } catch (...) { std::string errmsg{"rsakey error: invalid keysize "}; errmsg += argv[i]; - std::throw_with_nested(std::runtime_error(errmsg.c_str())); + std::throw_with_nested(std::runtime_error(errmsg)); } } } @@ -264,7 +264,7 @@ void selfsigned(const argv_view & argv) } catch (...) { std::string errmsg{"selfsigned error: not a number for -days "}; errmsg += argv[i].substr(4); - std::throw_with_nested(std::runtime_error(errmsg.c_str())); + std::throw_with_nested(std::runtime_error(errmsg)); } } @@ -287,7 +287,7 @@ void selfsigned(const argv_view & argv) } catch (...) { std::string errmsg{"selfsigned error: invalid keysize "}; errmsg += argv[i].substr(4); - std::throw_with_nested(std::runtime_error(errmsg.c_str())); + std::throw_with_nested(std::runtime_error(errmsg)); } } else { throw std::runtime_error("selfsigned error: invalid algorithm"); |