|
From: Hans-Bernhard B. <br...@ph...> - 2001-10-10 15:25:57
|
On Tue, 9 Oct 2001, Petr Sorfa wrote:
> /* compute its path from higher view path source dirs */
> for (i = 1; i < nvpsrcdirs; ++i) {
> ! (void) snprintf(path, PATHLEN+1,
> ! "%s/%s", srcdirs[i], dir);
> addincdir(dir, path);
> }
Bad plan, I'd say. Please note snprintf() is not a reliably existing
functions. This change just broke the cscope build on my
alphaev5-dec-osf4.0d box here.
Moreover, snprintf isn't even strictly necessary in this case. With a bit
of arithmetics, and the help of the "%.*s" sprintf format, we would
limit the output without having to use snprintf().
--
Hans-Bernhard Broeker (br...@ph...)
Even if all the snow were burnt, ashes would remain.
|