Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When debugging some weirdness between the windows code and linux code running mds, I noticed that iio_strndup() was behaving differently. :( That is because the local implmentation for Windows was wrong. Checking against: https://github.com/gcc-mirror/gcc/blob/master/libiberty/strndup.c (Which we can't use directly since it is GPL3, and not compatible with LGPL), and checking against (which is BSD): https://opensource.apple.com/source/Libc/Libc-1158.30.7/string/FreeBSD/strndup.c.auto.html we can see the strlen we should be using is n, not n+1, which is what it was before. :( So, fix it. Signed-off-by: Robin Getz <[email protected]>
- Loading branch information