summaryrefslogtreecommitdiffhomepage
path: root/examples/malloc-cast.c
diff options
context:
space:
mode:
authorAndrew Clayton <ac@sigsegv.uk>2025-03-07 00:07:25 +0000
committerAndrew Clayton <ac@sigsegv.uk>2025-03-07 00:07:25 +0000
commit891c8fbd0c825b6716225e778a8f013afb858d57 (patch)
tree2b98bc47b6db420b10017ca4c0100e6abacd8cc8 /examples/malloc-cast.c
downloadcommon_c_mistakes-891c8fbd0c825b6716225e778a8f013afb858d57.tar.gz
common_c_mistakes-891c8fbd0c825b6716225e778a8f013afb858d57.tar.bz2
Initial commitHEADmaster
Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
Diffstat (limited to 'examples/malloc-cast.c')
-rw-r--r--examples/malloc-cast.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/malloc-cast.c b/examples/malloc-cast.c
new file mode 100644
index 0000000..5015147
--- /dev/null
+++ b/examples/malloc-cast.c
@@ -0,0 +1,4 @@
+void f(void)
+{
+ int *vals = malloc(sizeof(int) * 10);
+}