iio_strndup : fix off by one error
iio_strndup : fix off by one error

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 <c66e5a86ef9317cf35cecb2ed063996b2100ed4b@analog.com>

analogdevicesinc/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio