From: mar77i Date: Sun, 22 Feb 2026 20:43:22 +0000 (+0100) Subject: more inline functions X-Git-Url: https://git.mar77i.info/?a=commitdiff_plain;h=6160ecf0098715a5abba3919dd464f4c04f4ee0d;p=perftrace more inline functions --- diff --git a/perftrace.c b/perftrace.c index 14ac928..e40a1f7 100644 --- a/perftrace.c +++ b/perftrace.c @@ -140,7 +140,7 @@ int parse_args(int argc, char **argv, struct args *a, long clock_ticks) { return 0; } -int run_proc(struct args *a) { +static inline int run_proc(struct args *a) { pid_t pid = fork(); switch (pid) { case -1: @@ -157,7 +157,9 @@ int run_proc(struct args *a) { } } -struct timespec timespec_diff(struct timespec tsa, struct timespec tsb) { +static inline struct timespec timespec_diff( + struct timespec tsa, struct timespec tsb +) { struct timespec result = { .tv_sec = tsa.tv_sec - tsb.tv_sec, .tv_nsec = tsa.tv_nsec,