[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

libsvn_subr/cmdline.c "GetModuleFileNameA" change - further nitpicks

From: Max Bowsher <maxb_at_ukf.net>
Date: 2004-11-29 13:36:48 CET

I have no Windows build environment, so I'm not committing these directly,
for lack of ability to test the build.

* No longer necessary to #include <mbctype.h> now we no longer use
_getmbcp().

* The current use of "lstrlenA (ansi_path)" will cause the value of
"*ucs2_path" to be MISSING A TERMINATING NULL. Change the lstrlenA() call to
a simple constant -1 to have MultiByteToWideChar convert up-to-and-including
the terminating null.

* Why use lstrlenW() to get the length of the string, when the various
functions called will return the number of characters written anyway?

* Error handling is lax - if GetModuleFileNameW and MultiByteToWideChar
fail, then ucs2_path could be used uninitialized.

Max.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 29 13:41:08 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.