From 66451e039ebde7c1c3ab5316e2b765f6de9ee123 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 14 Dec 2017 12:04:54 +0000 Subject: [PATCH] kernel: remove a single use variable Tidying up - and shorter cc65 code. Bizarrely sdcc also can't figure out that this could just be a temporary so it also saves 12 bytes --- Kernel/process.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Kernel/process.c b/Kernel/process.c index 96f4bc81..fe26acb5 100644 --- a/Kernel/process.c +++ b/Kernel/process.c @@ -586,21 +586,17 @@ rescan: /* * Send signal, avoid touching uarea */ -/* SDCC bug #2472: SDCC generates hideous code for this function due to bad - code generation when masking longs. Not clear we can do much about it but - file a bug */ void ssig(ptptr proc, uint8_t sig) { struct sigbits *m = proc->p_sig; uint16_t sigm; - uint8_t sigbit = sig & 0x0F; irqflags_t irq; if (sig > 15) m++; - sigm = 1 << sigbit; + sigm = 1 << (sig & 0x0F); irq = di(); -- 2.34.1