aboutsummaryrefslogtreecommitdiffhomepage
path: root/test.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-06-04 10:26:48 +0200
committerlemon <lsof@mailbox.org>2023-06-04 10:26:48 +0200
commit2075cfc9b395b413de1a540f6262e7b994907bee (patch)
tree2ee5114e0a5b288d40ac40e9d06f0e86157fd18f /test.c
parentbd390afdf4eabfe13c1dd18bde23f4246ad73514 (diff)
fix associativity of assignment expressions
Diffstat (limited to 'test.c')
-rw-r--r--test.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test.c b/test.c
index b89942a..a2a1a7c 100644
--- a/test.c
+++ b/test.c
@@ -56,9 +56,10 @@ struct f2 f2test(struct f2 *r) {
return *r;
}
-void memset(volatile char *p, int c, unsigned long n)
+void fill(char *p, int c, unsigned long n)
{
- if (n) do *p++ = c; while (--n);
+ int t;
+ if (n) do t = *p++ = c; while (--n);
}