summaryrefslogtreecommitdiffhomepage
path: root/src/exec.c
diff options
context:
space:
mode:
authorSean Kurtz <seankurtz75@gmail.com>2026-11-25 15:44:24 -0600
committerGitHub <noreply@github.com>2026-11-25 15:44:24 -0600
commit0ebef9da03f1952e8d0189a48cd7b946a7369f4f (patch)
treec1b25c3d68c1f0f57b4542e20b26d6b568faa651 /src/exec.c
parent235385520335d3c403a9f4857b2e1975e2d3be59 (diff)
parente85914ec27f202a277a5a3e2a41a5f5328ab70cf (diff)
downloadzash-0ebef9da03f1952e8d0189a48cd7b946a7369f4f.tar.gz
Merge pull request #29 from skurtz97/chore/c23-idioms
C23 idioms, 64-bit default link, script charset; docs at the new numbers
Diffstat (limited to 'src/exec.c')
-rw-r--r--src/exec.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/exec.c b/src/exec.c
index fbc46ba..c0267a8 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -215,10 +215,14 @@ static int eval_time(const node *n, unsigned flags) {
getrusage(RUSAGE_SELF, &s1);
getrusage(RUSAGE_CHILDREN, &c1);
bool posix = n->u.time.posix;
- long long self[2] = {tv_diff(s0.ru_utime, s1.ru_utime),
- tv_diff(s0.ru_stime, s1.ru_stime)};
- long long kids[2] = {tv_diff(c0.ru_utime, c1.ru_utime),
- tv_diff(c0.ru_stime, c1.ru_stime)};
+ long long self[2] = {
+ tv_diff(s0.ru_utime, s1.ru_utime),
+ tv_diff(s0.ru_stime, s1.ru_stime),
+ };
+ long long kids[2] = {
+ tv_diff(c0.ru_utime, c1.ru_utime),
+ tv_diff(c0.ru_stime, c1.ru_stime),
+ };
static const char *const label[2] = {"user", "sys"};
out_flush(&out1);
put_time("real", tv_diff(t0, t1), posix);
@@ -877,7 +881,10 @@ static void assign_temp(const simple_cmd *sc) {
*/
static bool tag_prefix_begin(const simple_cmd *sc, tag_mode saved[3]) {
static const char *const name[3] = {
- "_TAG_REDIR_IN=", "_TAG_REDIR_OUT=", "_TAG_REDIR_ERR="};
+ "_TAG_REDIR_IN=",
+ "_TAG_REDIR_OUT=",
+ "_TAG_REDIR_ERR=",
+ };
bool any = false;
memcpy(saved, tag_redir, sizeof tag_redir);
for (int i = 0; i < sc->nassign; i++) {