diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2024-01-20 16:52:31 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2024-01-20 17:28:53 -0800 |
commit | b6ed79b71ccb3df8df05531d473ff9510cf9a39f (patch) | |
tree | cea1f448b8e163fc0972b09774f075f9c2277372 /lib-src | |
parent | 0a47a5a4bef0a33c012302346685ecab861cc306 (diff) | |
download | emacs-b6ed79b71ccb3df8df05531d473ff9510cf9a39f.tar.gz |
Be more systematic about parens in C source code
Be more systematic about putting space before paren in calls,
and in avoiding unnecessary parentheses in macros.
This was partly inspired by my wading through gcc -E output
while debugging something else, and seeing too many parens.
This patch does not change the generated .o files on my platform.
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/etags.c | 6 | ||||
-rw-r--r-- | lib-src/seccomp-filter.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c index 506366141e6..032cfa8010b 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -3825,7 +3825,7 @@ C_entries (int c_ext, /* extension of C */ { case fstartlist: /* This prevents tagging fb in - void (__attribute__((noreturn)) *fb) (void); + void (__attribute__ ((noreturn)) *fb) (void); Fixing this is not easy and not very important. */ fvdef = finlist; continue; @@ -4380,14 +4380,14 @@ Yacc_entries (FILE *inf) #define LOOKING_AT(cp, kw) /* kw is the keyword, a literal string */ \ ((assert ("" kw), true) /* syntax error if not a literal string */ \ - && strneq ((cp), kw, sizeof (kw)-1) /* cp points at kw */ \ + && strneq (cp, kw, sizeof (kw) - 1) /* cp points at kw */ \ && notinname ((cp)[sizeof (kw)-1]) /* end of kw */ \ && ((cp) = skip_spaces ((cp) + sizeof (kw) - 1), true)) /* skip spaces */ /* Similar to LOOKING_AT but does not use notinname, does not skip */ #define LOOKING_AT_NOCASE(cp, kw) /* the keyword is a literal string */ \ ((assert ("" kw), true) /* syntax error if not a literal string */ \ - && strncaseeq ((cp), kw, sizeof (kw)-1) /* cp points at kw */ \ + && strncaseeq (cp, kw, sizeof (kw) - 1) /* cp points at kw */ \ && ((cp) += sizeof (kw) - 1, true)) /* skip spaces */ /* diff --git a/lib-src/seccomp-filter.c b/lib-src/seccomp-filter.c index 8846e6aedae..0aeb6e8d88a 100644 --- a/lib-src/seccomp-filter.c +++ b/lib-src/seccomp-filter.c @@ -114,7 +114,7 @@ set_attribute (enum scmp_filter_attr attr, uint32_t value) { \ const struct scmp_arg_cmp arg_array[] = {__VA_ARGS__}; \ enum { arg_cnt = sizeof arg_array / sizeof *arg_array }; \ - int status = seccomp_rule_add_array (ctx, (action), (syscall), \ + int status = seccomp_rule_add_array (ctx, action, syscall, \ arg_cnt, arg_array); \ if (status < 0) \ fail (-status, "seccomp_rule_add_array (%s, %s, %d, {%s})", \ @@ -143,7 +143,7 @@ export_filter (const char *file, } #define EXPORT_FILTER(file, function) \ - export_filter ((file), (function), #function) + export_filter (file, function, #function) int main (int argc, char **argv) |