Skip to contentSkip to conversation

proc: rename "catch" function argument

PATCH Applied Alexey Dobriyan 2 participants 4 messages Mar 31, 2020 – Apr 17, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 proc: rename "catch" function argument

"catch" is reserved keyword in C++, rename it to something both gcc and g++ accept.

Rename "ign" for symmetry.

---

 fs/proc/array.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
fs/proc/array.c +4 -4
@@ -248,8 +248,8 @@ void render_sigset_t(struct seq_file *m, const char *header,
 	seq_putc(m, '\n');
 }
 
-static void collect_sigign_sigcatch(struct task_struct *p, sigset_t *ign,
-				    sigset_t *catch)
+static void collect_sigign_sigcatch(struct task_struct *p, sigset_t *sigign,
+				    sigset_t *sigcatch)
 {
 	struct k_sigaction *k;
 	int i;
@@ -257,9 +257,9 @@ static void collect_sigign_sigcatch(struct task_struct *p, sigset_t *ign,
 	k = p->sighand->action;
 	for (i = 1; i <= _NSIG; ++i, ++k) {
 		if (k->sa.sa_handler == SIG_IGN)
-			sigaddset(ign, i);
+			sigaddset(sigign, i);
 		else if (k->sa.sa_handler != SIG_DFL)
-			sigaddset(catch, i);
+			sigaddset(sigcatch, i);
 	}
 }
 
#1 lore raw
Quoted 2 lines · On Wed, 1 Apr 2020 00:09:05 +0300 Alexey Dobriyan <[email protected]> wrote:

"catch" is reserved keyword in C++, rename it to something both gcc and g++ accept.

Why? Is someone compiling the kernel with g++?

Quoted 3 lines

Rename "ign" for symmetry.

Was this intentional?

#2 lore raw
Quoted 6 lines · Andrew Morton
Quoted 2 lines · On Wed, 1 Apr 2020 00:09:05 +0300 Alexey Dobriyan <[email protected]> wrote:

"catch" is reserved keyword in C++, rename it to something both gcc and g++ accept.

Why? Is someone compiling the kernel with g++?

I do!
https://marc.info/?l=linux-acpi&m=158343373912366&w=4

Quoted 5 lines
Quoted 3 lines

Rename "ign" for symmetry.

Was this intentional?

In Russia, C++ mangles you! :^)