Commit 3e15f559 authored by Mark Andrews's avatar Mark Andrews
Browse files

move the calculation of remaining

parent 51f99a87
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dig.c,v 1.198 2004/09/16 01:01:25 marka Exp $ */
/* $Id: dig.c,v 1.199 2004/09/16 02:12:37 marka Exp $ */
#include <config.h>
#include <stdlib.h>
......@@ -636,9 +636,9 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
"; (%d server%s found)\n",
addresscount,
addresscount > 1 ? "s" : "");
strncat(lookup->cmdline, append, remaining);
remaining = sizeof(lookup->cmdline) -
strlen(lookup->cmdline) - 1;
strncat(lookup->cmdline, append, remaining);
}
if (first) {
snprintf(append, sizeof(append),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment