servalproject/serval-dna — pull request #63 by rom1v (2013-05-29 22:29:57+00:00)
Title: Fix varargs use

[forum thread](https://groups.google.com/forum/#!topic/serval-project-developers/tCF8hP1j6KM)

`man stdarg` says:
> If ap is passed to a function that uses va_arg(ap,type) then the value
> of ap is undefined after the return of that function.

`va_start(…)` and `va_end(…)` must be called at each iteration.

By chance, it worked in 32 bits, but it segfaulted in 64 bits.

See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31484