Liste des Groupes | Revenir à co vms |
In article <68669c25$0$690$14726298@news.sunsite.dk>,
Arne Vajhøj <arne@vajhoej.dk> wrote:On 7/1/2025 3:57 PM, Arne Vajhøj wrote:On 6/25/2025 8:15 AM, Craig A. Berry wrote:>feel free to take a crack at it and submit a PR. To>
work against current sources, you either need to use autoconf with a git
checkout or get a nightly snapshot from <https://www.freetds.org>.
I may take a look.
>
Submitting a PR may be a problem. I have never had a personal
Github account and I suspect that my work Github account has
been deactivated. But I will worry about that when/if I have
a good fix.
First take:
>
https://www.vajhoej.dk/arne/temp/tds_vasprintf.c
Ouch.Total rewrite. I did not like the old code at all.Your code is incorrect.
Note that `vsnprintf` et al do not include space for the NUL
terminator in their return value, and you do not account for
this when you malloc your destination buffer.
As the main logic is the same in each case (find out the bufferAs states in the comments then it was a design goal to have
size, allocate, and then assign and return), and the only real
difference is in finding out the buffer length, your code would
be more readable with some helper functions that you delegated
to.
You refer to `_PATH_DEVNULL` but do not `#include <paths.h>`, asThis must support non *nix systems (as an example
required by POSIX.
Les messages affichés proviennent d'usenet.