Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jul 2001 18:01:24 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Harti Brandt <brandt@fokus.gmd.de>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Format checking for sbuf_printf... 
Message-ID:  <41148.995472084@critter>
In-Reply-To: Your message of "Wed, 18 Jul 2001 11:07:35 %2B0200." <20010718110432.P20739-100000@beagle.fokus.gmd.de> 

next in thread | previous in thread | raw e-mail | index | archive | help

done.

In message <20010718110432.P20739-100000@beagle.fokus.gmd.de>, Harti Brandt writes:
>
>hello,
>
>given that the various printf's in systm.h are format-checked, it probably
>makes sense to add this to sbuf_printf also. Could somebody please commit
>this?
>
>harti
>
>Index: sbuf.h
>===================================================================
>RCS file: /usr/ncvs/src/sys/sys/sbuf.h,v
>retrieving revision 1.6
>diff -c -r1.6 sbuf.h
>*** sbuf.h	2001/07/03 21:46:42	1.6
>--- sbuf.h	2001/07/17 12:05:28
>***************
>*** 58,64 ****
>  int		 sbuf_bcpy(struct sbuf *s, const char *str, size_t len);
>  int		 sbuf_cat(struct sbuf *s, const char *str);
>  int		 sbuf_cpy(struct sbuf *s, const char *str);
>! int		 sbuf_printf(struct sbuf *s, const char *fmt, ...);
>  int		 sbuf_putc(struct sbuf *s, int c);
>  int		 sbuf_overflowed(struct sbuf *s);
>  void		 sbuf_finish(struct sbuf *s);
>--- 58,64 ----
>  int		 sbuf_bcpy(struct sbuf *s, const char *str, size_t len);
>  int		 sbuf_cat(struct sbuf *s, const char *str);
>  int		 sbuf_cpy(struct sbuf *s, const char *str);
>! int		 sbuf_printf(struct sbuf *s, const char *fmt, ...) __printflike(2, 3);
>  int		 sbuf_putc(struct sbuf *s, int c);
>  int		 sbuf_overflowed(struct sbuf *s);
>  void		 sbuf_finish(struct sbuf *s);
>-- 
>harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private
>              brandt@fokus.gmd.de, harti@begemot.org
>
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-hackers" in the body of the message
>

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41148.995472084>