# [PATCH] proper C syntax (inline has to be placed before the return type).

2 messages from 2006-08-23 to 2006-09-24. Participants: Pierre Habouzit, Petr Baudis.
Thread: https://gitlist.dev/t/5360

## Pierre Habouzit, 2006-08-23 02:41

Subject: [PATCH] proper C syntax (inline has to be placed before the return type).
Message-ID: <11563008693465-git-send-email-madcoder@debian.org>
URL: https://gitlist.dev/e/11563008693465-git-send-email-madcoder%40debian.org

```
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
---
 strbuf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/strbuf.c b/strbuf.c
index 9d9d8be..c8174b4 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -13,7 +13,7 @@ static void strbuf_begin(struct strbuf *
 	strbuf_init(sb);
 }
 
-static void inline strbuf_add(struct strbuf *sb, int ch) {
+static inline void strbuf_add(struct strbuf *sb, int ch) {
 	if (sb->alloc <= sb->len) {
 		sb->alloc = sb->alloc * 3 / 2 + 16;
 		sb->buf = xrealloc(sb->buf, sb->alloc);
-- 
1.4.1.1

```

## Petr Baudis, 2006-09-24 12:46

Subject: Re: [PATCH] proper C syntax (inline has to be placed before the return type).
Message-ID: <20060924124633.GP20017@pasky.or.cz>
URL: https://gitlist.dev/e/20060924124633.GP20017%40pasky.or.cz
In-Reply-To: <11563008693465-git-send-email-madcoder@debian.org>

```
Dear diary, on Wed, Aug 23, 2006 at 04:41:09AM CEST, I got a letter
where Pierre Habouzit <madcoder@debian.org> said that...
> Signed-off-by: Pierre Habouzit <madcoder@debian.org>
> ---
>  strbuf.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/strbuf.c b/strbuf.c
> index 9d9d8be..c8174b4 100644
> --- a/strbuf.c
> +++ b/strbuf.c
> @@ -13,7 +13,7 @@ static void strbuf_begin(struct strbuf *
>  	strbuf_init(sb);
>  }
>  
> -static void inline strbuf_add(struct strbuf *sb, int ch) {
> +static inline void strbuf_add(struct strbuf *sb, int ch) {
>  	if (sb->alloc <= sb->len) {
>  		sb->alloc = sb->alloc * 3 / 2 + 16;
>  		sb->buf = xrealloc(sb->buf, sb->alloc);

Bogus, look at C99 A.2.2:

   declaration-specifiers:
   storage-class-specifier declaration-specifiers
   type-specifier declaration-specifiers
   type-qualifier declaration-specifiers
   function-specifier declaration-specifiers

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)

```
