From owner-freebsd-hackers Wed Jul 18 9: 1:44 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 2A05137B406 for ; Wed, 18 Jul 2001 09:01:38 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.3/8.11.3) with ESMTP id f6IG1On41150; Wed, 18 Jul 2001 18:01:28 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Harti Brandt Cc: hackers@FreeBSD.ORG Subject: Re: Format checking for sbuf_printf... In-Reply-To: Your message of "Wed, 18 Jul 2001 11:07:35 +0200." <20010718110432.P20739-100000@beagle.fokus.gmd.de> Date: Wed, 18 Jul 2001 18:01:24 +0200 Message-ID: <41148.995472084@critter> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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