Date: Mon, 26 Feb 2001 12:56:17 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: dillon@earth.backplane.com (Matt Dillon) Cc: ken@kdm.org (Kenneth D. Merry), arch@FreeBSD.ORG Subject: Re: sbufs in userland Message-ID: <200102261256.FAA16315@usr05.primenet.com> In-Reply-To: <200102260749.f1Q7nGZ30306@earth.backplane.com> from "Matt Dillon" at Feb 25, 2001 11:49:16 PM
next in thread | previous in thread | raw e-mail | index | archive | help
> char * > safe_replacef(char **pptr, const char *ctl, ...) > { > va_list va; > char *optr = *pptr; > > if (ctl) { > va_start(va, ctl); > if (vasprintf(pptr, ctl, va) < 0) > fatalmem(); > va_end(va); > } > safe_free(&optr); > return(*pptr); > } So basically, why is there an "if (ctl)"? Is it so you can pass a NULL as the second argument to turn it into a "safe_free" call? That's weird... Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102261256.FAA16315>