Job Snijders <[email protected]> wrote:
> @@ -24,15 +24,16 @@ output_csv(FILE *out, struct vrp_tree *v
...
> +
> + if (fprintf(out, "AS%u,%s,%u,%s,%lld\n", v->asid, buf,
> + v->maxlength, v->tal, v->until) < 0)
> return -1;
This needs a cast from time_t to long long, otherwise the code won't compile
or operate correctly on laggard legacy 32-bit time_t systems.
> + if (fprintf(out, "AS%u,%s,%u,%s,%lld\n", v->asid, buf,
> + v->maxlength, v->tal, (long long)v->until) < 0)
> return -1;
and there is a second one to fix:
> if (fprintf(out, "\t\t{ \"asn\": \"AS%u\", \"prefix\": \"%s\", "
> - "\"maxLength\": %u, \"ta\": \"%s\" }",
> - v->asid, buf, v->maxlength, v->tal) < 0)
> + "\"maxLength\": %u, \"ta\": \"%s\", \"until\": %lld }",
> + v->asid, buf, v->maxlength, v->tal, v->until) < 0)