[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-11-29 19:28:23 CET

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

Not that it would help unless you had a Win9x machine anyways. :-)

> * 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.

All good nitpicks. I'll try and get to them all tonight. Thanks for
taking the time to look at it!

-John

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 29 19:29:36 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.