diff options
author | junior rantila <junior.rantila@gmail.com> | 2021-10-03 01:04:34 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-23 11:41:18 +0200 |
commit | 658eac5c4603aac37e2a21333d511526155d48af (patch) | |
tree | f308faf7fb1a4c222bddd6e223d305bd2a5c236d /Userland/Utilities/watch.cpp | |
parent | dd2655c1fb37a9a04e6d23d61df04d73de65d40d (diff) | |
download | serenity-658eac5c4603aac37e2a21333d511526155d48af.zip |
Utilities: Change watch utility to use eastconst style
Diffstat (limited to 'Userland/Utilities/watch.cpp')
-rw-r--r-- | Userland/Utilities/watch.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Utilities/watch.cpp b/Userland/Utilities/watch.cpp index aa96f360ea..71e94cefb6 100644 --- a/Userland/Utilities/watch.cpp +++ b/Userland/Utilities/watch.cpp @@ -24,7 +24,7 @@ static bool flag_beep_on_fail = false; static volatile int exit_code = 0; static volatile pid_t child_pid = -1; -static String build_header_string(const Vector<const char*>& command, const struct timeval& interval) +static String build_header_string(Vector<char const*> const& command, struct timeval const& interval) { StringBuilder builder; builder.appendff("Every {}", interval.tv_sec); @@ -43,7 +43,7 @@ static struct timeval get_current_time() return tv; } -static int64_t usecs_from(const struct timeval& start, const struct timeval& end) +static int64_t usecs_from(struct timeval const& start, struct timeval const& end) { struct timeval diff; timeval_sub(end, start, diff); @@ -66,7 +66,7 @@ static void handle_signal(int signal) exit(exit_code); } -static int run_command(const Vector<const char*>& command) +static int run_command(Vector<char const*> const& command) { if ((errno = posix_spawnp(const_cast<pid_t*>(&child_pid), command[0], nullptr, nullptr, const_cast<char**>(command.data()), environ))) { exit_code = 1; @@ -101,7 +101,7 @@ int main(int argc, char** argv) return 1; } - Vector<const char*> command; + Vector<char const*> command; Core::ArgsParser args_parser; args_parser.set_stop_on_first_non_option(true); args_parser.set_general_help("Execute a command repeatedly, and watch its output over time."); |