From 3b0595a951d60cdc66910758af0b6ed2a88f14b5 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Tue, 14 Jan 2020 13:21:03 -0500 Subject: [PATCH] Improve asterisk placement notes --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aafc66a..efdfcda 100644 --- a/README.md +++ b/README.md @@ -641,12 +641,14 @@ Programmers **MUST place \* next to the binding when declaring pointers.** Correct: ```c +void do_work(struct my_struct *in); struct my_struct *foobar = NULL; ``` Incorrect: ```c +void do_work(struct my_struct* in); struct my_struct* foobar = NULL; ``` @@ -657,8 +659,8 @@ statement, the asterisk will be misleading: struct my_struct* foobar, foobaz; ``` -The variable is not a pointer. For consistency, even single-variable -declarations must place the asterisk to the right. +The second variable is not a pointer. For consistency, however, even +single-variable declarations must place the asterisk to the right. Programmers **MUST USE a typedef for function pointers which are the parameters to other functions.** -- 2.45.2