>From <various>:

> [...]
>    char filecopy[2048];
>    if (file[0] != '"') {
>      sprintf(filecopy, "\"%.2047s\"", file);
>    } else {
>      strncpy(filecopy, file, 2047);
>    }
> [...]
> It should be:
> 
>      sprintf(filecopy, "\"%.2045s\"", file);
> [...]

   I'll admit to being old and grumpy, but am I the only one who
shudders when one small code segment contains "2048", "2047", and "2045"
as separate, independent literal constants, instead of using a macro, or
"sizeof", or something which would let the next fellow change one buffer
size in one place, instead of hunting all over the code looking for
every "20xx" which might be related?

   Just a thought.

------------------------------------------------------------------------

   Steven M. Schweda               [EMAIL PROTECTED]
   382 South Warwick Street        (+1) 651-699-9818
   Saint Paul  MN  55105-2547

Reply via email to