FreeRDP/winpr
ilammy 228916bcec wClipboard: improve error handling
Unify error handling in ClipboardInitFormats() and actually handle the
return value of ClipboardInitSynthesizers(). Currently it always returns
TRUE, but this may change, so we'd better be clean.

Declare 'formatName' in wClipboardFormat as non-const. It is customary
in C to declare owned pointers as non-const because various deallocation
functions like free() take non-const pointers as arguments. Furthermore,
const char* is tightly associated with "string literals" which must not
be freed. Thus declaring this field as non-const is more accurate, and
removes that ugly void* cast from ClipboardInitFormats().

Unify error handling in ClipboardCreate(). The cleanup snippet should
not be repeated as it's prone to errors, like leaking the allocation of
clipboard->formats when ClipboardInitFormats() fails. Unified error
handling makes it much harder to forget resource cleanup on errors.
2017-04-09 03:15:48 +03:00
..
include winpr: define file attribute flags 2017-04-09 03:15:48 +03:00
libwinpr wClipboard: improve error handling 2017-04-09 03:15:48 +03:00
test fix string format specifiers 2016-12-16 13:48:43 +01:00
tools Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
.gitignore Add library libwinpr-tools 2016-05-03 14:42:08 +02:00
CMakeLists.txt Install man pages 2017-01-16 11:34:32 +01:00
winpr.pc.in Include major version number in library names 2017-01-16 11:11:58 +01:00
WinPRConfig.cmake.in build: remove FREERDP_MONOLITHIC_BUILD 2016-01-12 17:32:32 +01:00
wlog.7 Fix issues in wlog man page 2016-12-01 15:36:31 +01:00