Date: Thu, 14 Dec 2000 10:00:06 +0200 From: Peter Pentchev <roam@orbitel.bg> To: arch@FreeBSD.org Subject: Re: add -I ignoremask option to du(1) Message-ID: <20001214100006.E575@ringworld.oblivion.bg> In-Reply-To: <5lwvd3sfv7.fsf@assaris.sics.se>; from assar@FreeBSD.ORG on Thu, Dec 14, 2000 at 06:59:08AM %2B0100 References: <20001214034803.C575@ringworld.oblivion.bg> <5lwvd3sfv7.fsf@assaris.sics.se>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Dec 14, 2000 at 06:59:08AM +0100, assar@FreeBSD.ORG wrote: > Peter Pentchev <roam@orbitel.bg> writes: > > +void > > +ignoreadd(mask) > > + char *mask; > > +{ > > + char *newmask, **newign; > > + unsigned l; > > + > > + l = strlen(mask) + 1; > > + if (newmask = (char *) malloc(l + 1), newmask == NULL) > > + err(1, "can't allocate memory"); > > + strlcpy(newmask, mask, l+1); /* strcpy? playing it safe.. */ > > Why not newmask = strdup(mask); or even do the strdup:ing below ? Ah.. my oversight, thanks! I'll submit a new diff as soon as there's some consensus on which option letter(s) should be used, and should there be an 'unignore' option, too (see my reply to David O'Brien's message in the thread). G'luck, Peter -- I've heard that this sentence is a rumor. 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?20001214100006.E575>