rsaenh: Convert handle type from unsigned int to HCRYPTKEY (part 1)

Yuval Fledel yuvalfl at gmail.com
Sat Apr 21 14:48:57 CDT 2007


Exported functions in rsaenh use HCRYPTKEY and HCRYPTPROV types for
handles (both are unsigned long). Non exported functions use both
unsigned int and unsigned long. There are many casts everywhere.

This patch and part 2 unifies the variable type and prevent the
scattered casts. It also allows to add semantics that the passed
variable is a handle and not an index, thus help prevent off-by-one
errors.

Part 1 includes prototypes, printf format and casts that are needed to
prevent compiler warnings. Part 2 includes the rest of the casts.

 handle.c |   30 +++++++++++++++---------------
 handle.h |   12 +++++++-----
 rsaenh.c |   20 ++++++++++----------
 3 files changed, 32 insertions(+), 30 deletions(-)

Changelog:
Convert handle type from unsigned int to HCRYPTKEY. Prototypes, printf
format and important casts.

-- 
Yuval Fledel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rsaenh-hcryptkey-prototypes.patch
Type: text/x-patch
Size: 9920 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070421/7a2a53b1/rsaenh-hcryptkey-prototypes.bin


More information about the wine-patches mailing list