From: Simon Rozman
---
src/openvpnserv/automatic.c | 14 --
src/openvpnserv/interactive.c | 12 ++--
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/src/openvpnserv/automatic.c b/src/openvpnserv/automatic.c
index 6c39aaa..3e8f6ed 100644
--- a/src/openvpnser
Hi,
Some of these changes are of dubious value as the string lengths
involved are guaranteed to be small and there is no scope
for overflow. And casting only stops the compiler warning, not potential
overflow, if any..
As for the offending mixed int/size_t arithmetic, a better option is
to just t
Hi,
> Some of these changes are of dubious value as the string lengths involved
> are guaranteed to be small and there is no scope for overflow. And casting
> only stops the compiler warning, not potential overflow, if any..
Exactly. Where there's no scope for an overflow and compiler is too dumb
Hi,
> > const char *p = _tcsrchr(find->cFileName, TEXT('.'));
> > return p && p != find->cFileName && !_tcsicmp(p+1, ext);
> >
> > No _tcslen() and no offending size variables.
> > And that convoluted original is then gone.
>
> The resulting code would look a lot nicer indeed. Stay tuned