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

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

From: John Szakmeister <john_at_szakmeister.net>
Date: 2004-12-05 03:43:35 CET

On Monday 29 November 2004 07:36, Max Bowsher wrote:
> 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.

Check out r12157 and r12158 for fixes to all of the above.

-John

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Dec 5 03:44:44 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.