diff --git a/include/freerdp/api.h b/include/freerdp/api.h index 5eef004da..812887648 100644 --- a/include/freerdp/api.h +++ b/include/freerdp/api.h @@ -85,35 +85,35 @@ #endif #endif -#define IFCALL(_cb, ...) \ - do \ - { \ - if (_cb != NULL) \ - _cb(__VA_ARGS__); \ - else \ - WLog_VRB("com.freerdp.api", "IFCALL(" #_cb ") == NULL"); \ - } while (0) -#define IFCALLRET(_cb, _ret, ...) \ +#define IFCALL(_cb, ...) \ do \ { \ - if (_cb != NULL) \ - _ret = _cb(__VA_ARGS__); \ + if (_cb != nullptr) \ + _cb(__VA_ARGS__); \ else \ - WLog_VRB("com.freerdp.api", "IFCALLRET(" #_cb ") == NULL"); \ + WLog_VRB("com.freerdp.api", "IFCALL(" #_cb ") == nullptr"); \ + } while (0) +#define IFCALLRET(_cb, _ret, ...) \ + do \ + { \ + if (_cb != nullptr) \ + _ret = _cb(__VA_ARGS__); \ + else \ + WLog_VRB("com.freerdp.api", "IFCALLRET(" #_cb ") == nullptr"); \ } while (0) #if defined(__GNUC__) || defined(__clang__) -#define IFCALLRESULT(_default_return, _cb, ...) \ - __extension__({ \ - if (_cb == NULL) \ - { \ - WLog_VRB("com.freerdp.api", "IFCALLRESULT(" #_cb ") == NULL"); \ - } \ - ((_cb != NULL) ? _cb(__VA_ARGS__) : (_default_return)); \ +#define IFCALLRESULT(_default_return, _cb, ...) \ + __extension__({ \ + if (_cb == nullptr) \ + { \ + WLog_VRB("com.freerdp.api", "IFCALLRESULT(" #_cb ") == nullptr"); \ + } \ + ((_cb != nullptr) ? _cb(__VA_ARGS__) : (_default_return)); \ }) #else #define IFCALLRESULT(_default_return, _cb, ...) \ - ((_cb != NULL) ? _cb(__VA_ARGS__) : (_default_return)) + ((_cb != nullptr) ? _cb(__VA_ARGS__) : (_default_return)) #endif #define ALIGN64 DECLSPEC_ALIGN(8) diff --git a/include/freerdp/channels/channels.h b/include/freerdp/channels/channels.h index 15715a892..d82f1f4cd 100644 --- a/include/freerdp/channels/channels.h +++ b/include/freerdp/channels/channels.h @@ -70,13 +70,13 @@ extern "C" * @note This function may be called even without the \b event-handle to be set, so it must be * capable of handling these calls properly. * - * @param channels A pointer to the channels instance to register with. Must not be \b NULL + * @param channels A pointer to the channels instance to register with. Must not be \b nullptr * @param handle A \b event-handle to be used to notify the RDP main thread that the callback * function should be called again. Must not be \b INVALID_HANDLE_PARAM * @param fkt The callback function responsible to handle the channel specifics. Must not be \b - * NULL + * nullptr * @param userdata A pointer to a channel specific context. Most likely the channel context. - * May be \b NULL if not required. + * May be \b nullptr if not required. * * @return \b TRUE if successful, \b FALSE if any error occurs. * @since version 3.9.0 */ @@ -87,7 +87,7 @@ extern "C" /** @brief Remove an existing registration for \b event-handle from the channels instance * - * @param channels A pointer to the channels instance to register with. Must not be \b NULL + * @param channels A pointer to the channels instance to register with. Must not be \b nullptr * @param handle A \b event-handle to be used to notify the RDP main thread that the callback * function should be called again. Must not be \b INVALID_HANDLE_PARAM * diff --git a/include/freerdp/codec/color.h b/include/freerdp/codec/color.h index af45587ee..e1fad439c 100644 --- a/include/freerdp/codec/color.h +++ b/include/freerdp/codec/color.h @@ -303,7 +303,7 @@ FREERDP_API DWORD FreeRDPAreColorFormatsEqualNoAlpha(DWORD first, DWORD second); * @param data source buffer, must be (nWidth + 7) / 8 bytes long * * @return A buffer allocated with winpr_aligned_malloc(width * height, 16) - * if successful, NULL otherwise. + * if successful, nullptr otherwise. */ WINPR_DEPRECATED_VAR("[since 3.21.0] use freerdp_glyph_convert_ex instead", @@ -320,7 +320,7 @@ FREERDP_API DWORD FreeRDPAreColorFormatsEqualNoAlpha(DWORD first, DWORD second); * @param len the length of \ref data in bytes * * @return A buffer allocated with winpr_aligned_malloc(width * height, 16) - * if successful, NULL otherwise. + * if successful, nullptr otherwise. * @since version 3.21.0 */ WINPR_ATTR_MALLOC(winpr_aligned_free, 1) diff --git a/include/freerdp/codec/nsc.h b/include/freerdp/codec/nsc.h index 6c201eb2f..a4fe79132 100644 --- a/include/freerdp/codec/nsc.h +++ b/include/freerdp/codec/nsc.h @@ -54,7 +54,7 @@ extern "C" /** @brief Set a \ref NSC_PARAMETER for a \ref NSC_CONTEXT * - * @param context The \ref NSC_CONTEXT context to work on. Must not be \b NULL + * @param context The \ref NSC_CONTEXT context to work on. Must not be \b nullptr * @param what A \ref NSC_PARAMETER to identify what to change * @param value The value to set * @@ -66,7 +66,7 @@ extern "C" /** @brief decode a NSC message * - * @param context The \ref NSC_CONTEXT context to work on. Must not be \b NULL + * @param context The \ref NSC_CONTEXT context to work on. Must not be \b nullptr * @param bpp The bit depth of the data * @param width The width in pixels of the NSC surface * @param height The height in pixels of the NSC surface @@ -94,8 +94,8 @@ extern "C" /** @brief Encode a bitmap with \b NSC * - * @param context The \ref NSC_CONTEXT context to work on. Must not be \b NULL - * @param s a \ref wStream used to write \b NSC encoded data to. Must not be \b NULL + * @param context The \ref NSC_CONTEXT context to work on. Must not be \b nullptr + * @param s a \ref wStream used to write \b NSC encoded data to. Must not be \b nullptr * @param bmpdata A pointer to the bitmap to encode. Format must match \b NSC_COLOR_FORMAT * @param width The width of the bitmap in pixels * @param height The height of the bitmap in pixels @@ -122,7 +122,7 @@ extern "C" /** @brief This function resets a \ref NSC_CONTEXT to a new resolution * - * @param context The \ref NSC_CONTEXT context to work on. Must not be \b NULL + * @param context The \ref NSC_CONTEXT context to work on. Must not be \b nullptr * @param width The width of the context in pixels * @param height The height of the context in pixels * diff --git a/include/freerdp/codec/region.h b/include/freerdp/codec/region.h index 82d367a9c..2f623c1dd 100644 --- a/include/freerdp/codec/region.h +++ b/include/freerdp/codec/region.h @@ -76,9 +76,9 @@ extern "C" FREERDP_API int region16_n_rects(const REGION16* region); /** returns a pointer to rectangles and the number of rectangles in this region. - * nbRects can be set to NULL if not interested in the number of rectangles. + * nbRects can be set to nullptr if not interested in the number of rectangles. * @param region the input region - * @param nbRects if non-NULL returns the number of rectangles + * @param nbRects if non-nullptr returns the number of rectangles * @return a pointer on the rectangles */ WINPR_ATTR_NODISCARD diff --git a/include/freerdp/codec/rfx.h b/include/freerdp/codec/rfx.h index 241d024f0..1ace01bda 100644 --- a/include/freerdp/codec/rfx.h +++ b/include/freerdp/codec/rfx.h @@ -187,7 +187,7 @@ extern "C" * * @since version 3.0.0 * - * @return The RFX palette that is currently in use or \b NULL + * @return The RFX palette that is currently in use or \b nullptr */ WINPR_ATTR_NODISCARD FREERDP_API const BYTE* rfx_context_get_palette(RFX_CONTEXT* WINPR_RESTRICT context); diff --git a/include/freerdp/codecs.h b/include/freerdp/codecs.h index 7f8e228fb..2807c4ad6 100644 --- a/include/freerdp/codecs.h +++ b/include/freerdp/codecs.h @@ -76,14 +76,14 @@ extern "C" /** * @brief Free a rdpCodecs instance - * @param codecs A pointer to a rdpCodecs instance or NULL + * @param codecs A pointer to a rdpCodecs instance or nullptr * @since version 3.6.0 */ FREERDP_API void freerdp_client_codecs_free(rdpCodecs* codecs); /** * @brief Allocate a rdpCodecs instance. - * @return A newly allocated instance or \b NULL in case of failure. + * @return A newly allocated instance or \b nullptr in case of failure. * @since version 3.6.0 */ WINPR_ATTR_MALLOC(freerdp_client_codecs_free, 1) diff --git a/include/freerdp/crypto/certificate.h b/include/freerdp/crypto/certificate.h index 0a007caf5..bfa4fd013 100644 --- a/include/freerdp/crypto/certificate.h +++ b/include/freerdp/crypto/certificate.h @@ -90,7 +90,7 @@ extern "C" * @param pLength A pointer to the size in bytes of the PEM string * @param withCertChain \b TRUE to export a full chain PEM, \b FALSE for only the last * certificate in the chain - * @return A newly allocated string containing the requested PEM (free to deallocate) or NULL + * @return A newly allocated string containing the requested PEM (free to deallocate) or nullptr * @since version 3.8.0 */ WINPR_ATTR_MALLOC(free, 1) diff --git a/include/freerdp/crypto/certificate_store.h b/include/freerdp/crypto/certificate_store.h index 4454fdf91..7c4049a6c 100644 --- a/include/freerdp/crypto/certificate_store.h +++ b/include/freerdp/crypto/certificate_store.h @@ -79,7 +79,7 @@ extern "C" * * @since version 3.0.0 * - * @return The certificate store file path or \b NULL + * @return The certificate store file path or \b nullptr */ WINPR_ATTR_MALLOC(free, 1) WINPR_ATTR_NODISCARD diff --git a/include/freerdp/crypto/crypto.h b/include/freerdp/crypto/crypto.h index 0588736f3..232dc52d2 100644 --- a/include/freerdp/crypto/crypto.h +++ b/include/freerdp/crypto/crypto.h @@ -49,7 +49,7 @@ extern "C" * * @since version 3.0.0 * - * @return The encoded BASE64 string or \b NULL if failed + * @return The encoded BASE64 string or \b nullptr if failed */ WINPR_ATTR_NODISCARD FREERDP_API char* crypto_base64_encode_ex(const BYTE* WINPR_RESTRICT data, size_t length, diff --git a/include/freerdp/crypto/privatekey.h b/include/freerdp/crypto/privatekey.h index ebc18780b..bc46bba5a 100644 --- a/include/freerdp/crypto/privatekey.h +++ b/include/freerdp/crypto/privatekey.h @@ -46,8 +46,8 @@ extern "C" /** @brief Create a private key from file \b keyfile with optional password \b password * * @param keyfile The file to read the key from - * @param password The optional password the key is enecrypted with, \b NULL for unencrypted - * @return An allocated private key, \b NULL in case of failure. + * @param password The optional password the key is enecrypted with, \b nullptr for unencrypted + * @return An allocated private key, \b nullptr in case of failure. * @since version 3.16.0 */ WINPR_ATTR_MALLOC(freerdp_key_free, 1) @@ -58,8 +58,8 @@ extern "C" /** @brief Create a private key from a PEM file with optional \b password * * @param pem The PEM string to use - * @param password The optional password, use \b NULL if no encryption is used. - * @return An allocated private key, \b NULL in case of failure. + * @param password The optional password, use \b nullptr if no encryption is used. + * @return An allocated private key, \b nullptr in case of failure. * @since version 3.16.0 */ WINPR_ATTR_MALLOC(freerdp_key_free, 1) @@ -76,8 +76,8 @@ extern "C" * * @param key The key to convert * @param plen Optional pointer, value set to strlen of the PEM - * @param password Optional password string. If \b NULL an unencrypted PEM is written. - * @return A PEM string or \b NULL in case of errors + * @param password Optional password string. If \b nullptr an unencrypted PEM is written. + * @return A PEM string or \b nullptr in case of errors * * @since version 3.16.0 */ diff --git a/include/freerdp/freerdp.h b/include/freerdp/freerdp.h index fd93d3b5a..26336f7cd 100644 --- a/include/freerdp/freerdp.h +++ b/include/freerdp/freerdp.h @@ -98,10 +98,10 @@ extern "C" * * \param instance A pointer to the instance to work on * \param username A pointer to the username string. On input the current username, on output - * the username that should be used. Must not be NULL. \param password A pointer to the password - * string. On input the current password, on output the password that sohould be used. Must not - * be NULL. \param domain A pointer to the domain string. On input the current domain, on output - * the domain that sohould be used. Must not be NULL. + * the username that should be used. Must not be nullptr. \param password A pointer to the + * password string. On input the current password, on output the password that sohould be used. + * Must not be nullptr. \param domain A pointer to the domain string. On input the current + * domain, on output the domain that sohould be used. Must not be nullptr. * * \return \b FALSE no valid credentials supplied, continue without \b TRUE valid credentials * should be available. @@ -117,11 +117,11 @@ extern "C" * * @param instance A pointer to the instance to work on * @param username A pointer to the username string. On input the current username, on output - * the username that should be used instead. Must not be NULL. + * the username that should be used instead. Must not be nullptr. * @param password A pointer to the password string. On input the current password, on output - * the password that sohould be used. Must not be NULL. + * the password that sohould be used. Must not be nullptr. * @param domain A pointer to the domain string. On input the current domain, on output the - * domain that sohould be used. Must not be NULL. + * domain that sohould be used. Must not be nullptr. * @param reason The reason the callback was called. (e.g. NLA, TLS, RDP, GATEWAY, ...) * * @return \b FALSE to abort the connection, \b TRUE otherwise. @@ -144,7 +144,7 @@ extern "C" * @param cert_list A list of smartcard certificates * @param count The number of smartcard certificates in the list * @param choice A pointer to an integer that will represent the selected certificate index. - * Must not be \b NULL + * Must not be \b nullptr * @param gateway A indicator if the authentication is for a session (\b FALSE) or a gateway * (\b TRUE) * @@ -481,13 +481,13 @@ owned by rdpRdp */ ContextNew; /**< (offset 33) Callback for context allocation Can be set before calling freerdp_context_new() to have it executed after - allocation and initialization. Must be set to NULL if not needed. */ + allocation and initialization. Must be set to nullptr if not needed. */ ALIGN64 pContextFree ContextFree; /**< (offset 34) Callback for context deallocation Can be set before calling freerdp_context_free() to have it executed before - deallocation. Must be set to NULL if not needed. */ + deallocation. Must be set to nullptr if not needed. */ UINT64 paddingC[47 - 35]; /* 35 */ ALIGN64 UINT ConnectionCallbackState; /* 47 */ @@ -496,13 +496,13 @@ owned by rdpRdp */ PreConnect; /**< (offset 48) Callback for pre-connect operations. Can be set before calling freerdp_connect() to have it executed before the - actual connection happens. Must be set to NULL if not needed. */ + actual connection happens. Must be set to nullptr if not needed. */ WINPR_ATTR_NODISCARD ALIGN64 pConnectCallback PostConnect; /**< (offset 49) Callback for post-connect operations. Can be set before calling freerdp_connect() to have it executed after the - actual connection has succeeded. Must be set to NULL if not needed. */ + actual connection has succeeded. Must be set to nullptr if not needed. */ WINPR_ATTR_NODISCARD ALIGN64 pAuthenticate Authenticate; /**< (offset 50) Callback for authentication. @@ -549,7 +549,7 @@ owned by rdpRdp */ Can be set after rdp_client_disconnect_and_clear and applying redirection settings but before rdp_client_connect() to have it executed after the actual connection has - succeeded. Must be set to NULL if not needed. */ + succeeded. Must be set to nullptr if not needed. */ WINPR_ATTR_NODISCARD ALIGN64 pConnectCallback LoadChannels; /**< (offset 59) * callback for loading channel configuration. Might be called multiple @@ -572,7 +572,7 @@ owned by rdpRdp */ WINPR_ATTR_NODISCARD ALIGN64 pReceiveChannelData ReceiveChannelData; /* (offset 65) Callback for receiving data from a channel. - This is called by freerdp_channel_process() (if not NULL). + This is called by freerdp_channel_process() (if not nullptr). Clients will typically use a function that calls freerdp_channels_data() to perform the needed tasks. */ @@ -911,7 +911,7 @@ owned by rdpRdp */ * is required. If a client modifies settings during runtime after pre-connect call this * function or the credentials will be lost on any reconnect, redirect, ... * - * \param context The RDP context to use, must not be \b NULL + * \param context The RDP context to use, must not be \b nullptr * * \return \b TRUE if successful, \b FALSE if settings could not be applied (wrong session * state, ...) @@ -922,8 +922,8 @@ owned by rdpRdp */ /** @brief set a new function to be called when an access token is requested. * - * @param context The rdp context to set the function for. Must not be \b NULL - * @param GetCommonAccessToken The function pointer to set, \b NULL to disable + * @param context The rdp context to set the function for. Must not be \b nullptr + * @param GetCommonAccessToken The function pointer to set, \b nullptr to disable * * @return \b TRUE for success, \b FALSE otherwise * @since version 3.16.0 @@ -934,8 +934,8 @@ owned by rdpRdp */ /** @brief get the current function pointer set as GetCommonAccessToken * - * @param context The rdp context to set the function for. Must not be \b NULL - * @return The current function pointer set or \b NULL + * @param context The rdp context to set the function for. Must not be \b nullptr + * @return The current function pointer set or \b nullptr * @since version 3.16.0 */ WINPR_ATTR_NODISCARD diff --git a/include/freerdp/input.h b/include/freerdp/input.h index 81e990c4f..e8ead25f0 100644 --- a/include/freerdp/input.h +++ b/include/freerdp/input.h @@ -134,7 +134,7 @@ extern "C" * @param buffer A buffer to store the resulting string * @param len The length of the buffer in bytes * - * @return A pointer to \ref buffer or \b NULL in case of failure + * @return A pointer to \ref buffer or \b nullptr in case of failure * @since version 3.19.0 */ WINPR_ATTR_NODISCARD diff --git a/include/freerdp/locale/keyboard.h b/include/freerdp/locale/keyboard.h index 3f1285a33..1cae2a689 100644 --- a/include/freerdp/locale/keyboard.h +++ b/include/freerdp/locale/keyboard.h @@ -258,7 +258,7 @@ FREERDP_API const char* freerdp_keyboard_get_layout_name_from_id(DWORD keyboardL /** @brief Get a keyboard layout id from a string * - * @param name The string to convert to a layout id. Must not be \b NULL + * @param name The string to convert to a layout id. Must not be \b nullptr * * @return The keyboard layout id or \b 0 in case of no mapping */ @@ -286,7 +286,7 @@ WINPR_DEPRECATED_VAR("since 3.11.0, implement yourself in client", /** @brief deallocate a \b FREERDP_REMAP_TABLE * - * @param table The table to deallocate, may be \b NULL + * @param table The table to deallocate, may be \b nullptr * * @since version 3.11.0 */ @@ -323,7 +323,7 @@ FREERDP_API DWORD freerdp_keyboard_remap_key(const FREERDP_REMAP_TABLE* remap_ta /** @brief deallocator for a \b RDP_CODEPAGE array allocated by \ref * freerdp_keyboard_get_matching_codepages * - * @param codepages The codepages to free, may be \b NULL + * @param codepages The codepages to free, may be \b nullptr */ FREERDP_API void freerdp_codepages_free(RDP_CODEPAGE* codepages); @@ -335,12 +335,12 @@ FREERDP_API void freerdp_codepages_free(RDP_CODEPAGE* codepages); * - 2 : RDP_CODEPAGE::PrimaryLanguageSymbol * - 3 : RDP_CODEPAGE::Sublanguage * - 4 : RDP_CODEPAGE::SublanguageSymbol - * @param filter A filter pattern or \b NULL for no filtering. Simple string match, no expressions - * supported (e.g. \b strstr match) - * @param count A pointer that will be set to the number of codepages found, may be \b NULL + * @param filter A filter pattern or \b nullptr for no filtering. Simple string match, no + * expressions supported (e.g. \b strstr match) + * @param count A pointer that will be set to the number of codepages found, may be \b nullptr * - * @return An allocated array of \b RDP_CODEPAGE of size \b count or \b NULL if no match. Must be - * freed by \ref freerdp_codepages_free + * @return An allocated array of \b RDP_CODEPAGE of size \b count or \b nullptr if no match. Must + * be freed by \ref freerdp_codepages_free */ WINPR_ATTR_MALLOC(freerdp_codepages_free, 1) WINPR_ATTR_NODISCARD @@ -351,7 +351,7 @@ FREERDP_API RDP_CODEPAGE* freerdp_keyboard_get_matching_codepages(DWORD column, * * @param scancode The RDP scancode to get a string for * - * @return A string describing the RDP scancode or \b NULL if it does not exist + * @return A string describing the RDP scancode or \b nullptr if it does not exist */ WINPR_ATTR_NODISCARD FREERDP_API const char* freerdp_keyboard_scancode_name(DWORD scancode); diff --git a/include/freerdp/locale/locale.h b/include/freerdp/locale/locale.h index 01e2dfdf0..945ab76ae 100644 --- a/include/freerdp/locale/locale.h +++ b/include/freerdp/locale/locale.h @@ -279,7 +279,7 @@ extern "C" /** * @brief Query the list of supported system locales * @param count A pointer to hold the number of locales found - * @return A pointer to @ref SYSTEM_LOCALE or \b NULL in case none found + * @return A pointer to @ref SYSTEM_LOCALE or \b nullptr in case none found * @since version 3.6.0 */ WINPR_ATTR_NODISCARD diff --git a/include/freerdp/primitives.h b/include/freerdp/primitives.h index b5eb9072f..2f5b0f627 100644 --- a/include/freerdp/primitives.h +++ b/include/freerdp/primitives.h @@ -338,7 +338,7 @@ FREERDP_API void primitives_uninit(void); * software) is returned * * @param type the type of primitives desired. - * @return A primitive implementation matching the hint closest or \b NULL in case of failure. + * @return A primitive implementation matching the hint closest or \b nullptr in case of failure. * @since version 3.11.0 */ WINPR_ATTR_NODISCARD diff --git a/include/freerdp/rail.h b/include/freerdp/rail.h index dabfa3766..c53b43ac9 100644 --- a/include/freerdp/rail.h +++ b/include/freerdp/rail.h @@ -592,7 +592,7 @@ FREERDP_API BOOL utf8_string_to_rail_string(const char* string, * @param buffer a string buffer to write to * @param len the size in bytes of the string buffer * - * @return A pointer to buffer or \b NULL in case of failure + * @return A pointer to buffer or \b nullptr in case of failure * @since version 3.5.0 */ WINPR_ATTR_NODISCARD diff --git a/include/freerdp/server/proxy/proxy_config.h b/include/freerdp/server/proxy/proxy_config.h index 802e1c5fd..9a4a16db7 100644 --- a/include/freerdp/server/proxy/proxy_config.h +++ b/include/freerdp/server/proxy/proxy_config.h @@ -132,7 +132,7 @@ extern "C" /** * @brief pf_server_config_free Releases all resources associated with proxyConfig * - * @param config A pointer to the proxyConfig to clean up. Might be NULL. + * @param config A pointer to the proxyConfig to clean up. Might be nullptr. */ FREERDP_API void pf_server_config_free(proxyConfig* config); @@ -140,9 +140,9 @@ extern "C" * @brief server_config_load_ini Create a proxyConfig from a already loaded * INI file. * - * @param ini A pointer to the parsed INI file. Must NOT be NULL. + * @param ini A pointer to the parsed INI file. Must NOT be nullptr. * - * @return A proxyConfig or NULL in case of failure. + * @return A proxyConfig or nullptr in case of failure. */ WINPR_ATTR_MALLOC(pf_server_config_free, 1) WINPR_ATTR_NODISCARD @@ -152,7 +152,7 @@ extern "C" * * @param path The path of the INI file * - * @return A proxyConfig or NULL in case of failure. + * @return A proxyConfig or nullptr in case of failure. */ WINPR_ATTR_MALLOC(pf_server_config_free, 1) WINPR_ATTR_NODISCARD @@ -164,7 +164,7 @@ extern "C" * * @param buffer A pointer to the '\0' terminated INI string. * - * @return A proxyConfig or NULL in case of failure. + * @return A proxyConfig or nullptr in case of failure. */ WINPR_ATTR_MALLOC(pf_server_config_free, 1) WINPR_ATTR_NODISCARD @@ -173,14 +173,14 @@ extern "C" /** * @brief pf_server_config_print Print the configuration to stdout * - * @param config A pointer to the configuration to print. Must NOT be NULL. + * @param config A pointer to the configuration to print. Must NOT be nullptr. */ FREERDP_API void pf_server_config_print(const proxyConfig* config); /** * @brief pf_config_required_plugins_count * - * @param config A pointer to the proxyConfig. Must NOT be NULL. + * @param config A pointer to the proxyConfig. Must NOT be nullptr. * * @return The number of required plugins configured. */ @@ -189,10 +189,10 @@ extern "C" /** * @brief pf_config_required_plugin - * @param config A pointer to the proxyConfig. Must NOT be NULL. + * @param config A pointer to the proxyConfig. Must NOT be nullptr. * @param index The index of the plugin to return * - * @return The name of the plugin or NULL. + * @return The name of the plugin or nullptr. */ WINPR_ATTR_NODISCARD FREERDP_API const char* pf_config_required_plugin(const proxyConfig* config, size_t index); @@ -200,7 +200,7 @@ extern "C" /** * @brief pf_config_modules_count * - * @param config A pointer to the proxyConfig. Must NOT be NULL. + * @param config A pointer to the proxyConfig. Must NOT be nullptr. * * @return The number of proxy modules configured. */ @@ -209,7 +209,7 @@ extern "C" /** * @brief pf_config_modules - * @param config A pointer to the proxyConfig. Must NOT be NULL. + * @param config A pointer to the proxyConfig. Must NOT be nullptr. * * @return An array of strings of size pf_config_modules_count with the module names. */ @@ -240,11 +240,11 @@ extern "C" /** * @brief pf_config_get get a value for a section/key - * @param config A pointer to the proxyConfig. Must NOT be NULL. - * @param section The name of the section the key is in, must not be \b NULL - * @param key The name of the key to look for. Must not be \b NULL + * @param config A pointer to the proxyConfig. Must NOT be nullptr. + * @param section The name of the section the key is in, must not be \b nullptr + * @param key The name of the key to look for. Must not be \b nullptr * - * @return A pointer to the value for \b section/key or \b NULL if not found + * @return A pointer to the value for \b section/key or \b nullptr if not found */ WINPR_ATTR_NODISCARD FREERDP_API const char* pf_config_get(const proxyConfig* config, const char* section, diff --git a/include/freerdp/server/proxy/proxy_server.h b/include/freerdp/server/proxy/proxy_server.h index 3d7bdf9b8..66915c44d 100644 --- a/include/freerdp/server/proxy/proxy_server.h +++ b/include/freerdp/server/proxy/proxy_server.h @@ -34,16 +34,16 @@ extern "C" /** * @brief pf_server_free Cleans up a (stopped) proxy server instance. * - * @param server The proxy server to clean up. Might be NULL. + * @param server The proxy server to clean up. Might be nullptr. */ FREERDP_API void pf_server_free(proxyServer* server); /** * @brief pf_server_new Creates a new proxy server instance * - * @param config The proxy server configuration to use. Must NOT be NULL. + * @param config The proxy server configuration to use. Must NOT be nullptr. * - * @return A new proxy server instance or NULL on failure. + * @return A new proxy server instance or nullptr on failure. */ WINPR_ATTR_MALLOC(pf_server_free, 1) WINPR_ATTR_NODISCARD @@ -54,9 +54,9 @@ extern "C" * built-in instead of shipped as separate * module loaded at runtime. * - * @param server A proxy instance to add the module to. Must NOT be NULL - * @param ep The proxy entry function to add. Must NOT be NULL - * @param userdata Custom data for the module. May be NULL + * @param server A proxy instance to add the module to. Must NOT be nullptr + * @param ep The proxy entry function to add. Must NOT be nullptr + * @param userdata Custom data for the module. May be nullptr * * @return TRUE for success, FALSE otherwise. */ @@ -67,7 +67,7 @@ extern "C" /** * @brief pf_server_start Starts the proxy, binding the configured port. * - * @param server The server instance. Must NOT be NULL. + * @param server The server instance. Must NOT be nullptr. * * @return TRUE for success, FALSE on error */ @@ -77,7 +77,7 @@ extern "C" /** * @brief pf_server_start_from_socket Starts the proxy using an existing bound socket * - * @param server The server instance. Must NOT be NULL. + * @param server The server instance. Must NOT be nullptr. * @param socket The bound socket to wait for events on. * * @return TRUE for success, FALSE on error @@ -88,7 +88,7 @@ extern "C" /** * @brief pf_server_start_with_peer_socket Use existing peer socket * - * @param server The server instance. Must NOT be NULL. + * @param server The server instance. Must NOT be nullptr. * @param socket Ready to use peer socket * * @return TRUE for success, FALSE on error @@ -99,7 +99,7 @@ extern "C" /** * @brief pf_server_stop Stops a server instance asynchronously. * Can be called from any thread to stop a running server instance. - * @param server A pointer to the server instance to stop. May be NULL. + * @param server A pointer to the server instance to stop. May be nullptr. */ FREERDP_API void pf_server_stop(proxyServer* server); @@ -107,7 +107,7 @@ extern "C" * @brief pf_server_run This (blocking) function runs the main loop of the * proxy. * - * @param server The server instance. Must NOT be NULL. + * @param server The server instance. Must NOT be nullptr. * * @return TRUE for successful termination, FALSE otherwise. */ diff --git a/include/freerdp/settings.h b/include/freerdp/settings.h index e5957f915..2e593617c 100644 --- a/include/freerdp/settings.h +++ b/include/freerdp/settings.h @@ -82,7 +82,7 @@ extern "C" /** \brief Free a settings struct with all data in it * - * \param settings A pointer to the settings to free, May be NULL + * \param settings A pointer to the settings to free, May be nullptr */ FREERDP_API void freerdp_settings_free(rdpSettings* settings); @@ -91,7 +91,7 @@ extern "C" * \param flags Flags for creation, use \b FREERDP_SETTINGS_SERVER_MODE for server settings, 0 * for client. * - * \return A newly allocated settings struct or NULL + * \return A newly allocated settings struct or nullptr */ WINPR_ATTR_MALLOC(freerdp_settings_free, 1) WINPR_ATTR_NODISCARD @@ -99,9 +99,9 @@ extern "C" /** \brief Creates a deep copy of settings * - * \param settings A pointer to a settings struct to copy. May be NULL (returns NULL) + * \param settings A pointer to a settings struct to copy. May be nullptr (returns nullptr) * - * \return A newly allocated copy of \b settings or NULL + * \return A newly allocated copy of \b settings or nullptr */ WINPR_ATTR_MALLOC(freerdp_settings_free, 1) WINPR_ATTR_NODISCARD @@ -111,8 +111,8 @@ extern "C" * * The function frees up all allocated data in \b dst before copying the data from \b src * - * \param dst A pointer for the settings to copy data to. May be NULL (fails copy) - * \param src A pointer to the settings to copy. May be NULL (fails copy) + * \param dst A pointer for the settings to copy data to. May be nullptr (fails copy) + * \param src A pointer to the settings to copy. May be nullptr (fails copy) * * \return \b TRUE for success, \b FALSE for failure. */ @@ -123,8 +123,8 @@ extern "C" * * The function frees up all allocated data in \b dst before copying the data from \b src * - * \param dst A pointer for the settings to copy data to. May be NULL (fails copy) - * \param src A pointer to the settings to copy. May be NULL (fails copy) + * \param dst A pointer for the settings to copy data to. May be nullptr (fails copy) + * \param src A pointer to the settings to copy. May be nullptr (fails copy) * \param id The settings identifier to copy * * \return \b TRUE for success, \b FALSE for failure. @@ -135,18 +135,18 @@ extern "C" /** \brief Dumps the contents of a settings struct to a WLog logger * - * \param log The logger to write to, must not be NULL + * \param log The logger to write to, must not be nullptr * \param level The WLog level to use for the log entries - * \param settings A pointer to the settings to dump. May be NULL. + * \param settings A pointer to the settings to dump. May be nullptr. */ FREERDP_API void freerdp_settings_dump(wLog* log, DWORD level, const rdpSettings* settings); /** \brief Dumps the difference between two settings structs to a WLog * - * \param log The logger to write to, must not be NULL. + * \param log The logger to write to, must not be nullptr. * \param level The WLog level to use for the log entries. - * \param settings A pointer to the settings to dump. May be NULL. - * \param other A pointer to the settings to dump. May be NULL. + * \param settings A pointer to the settings to dump. May be nullptr. + * \param other A pointer to the settings to dump. May be nullptr. * * \return \b TRUE if not equal, \b FALSE otherwise */ @@ -201,7 +201,7 @@ extern "C" * * \since version 3.4.0 * - * \return \b TRUE if the device was removed, \b FALSE if device was not found or is NULL + * \return \b TRUE if the device was removed, \b FALSE if device was not found or is nullptr */ WINPR_ATTR_NODISCARD FREERDP_API BOOL freerdp_device_collection_del(rdpSettings* settings, @@ -345,7 +345,7 @@ extern "C" /** \brief Returns a boolean settings value * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * * \return the value of the boolean key @@ -356,7 +356,7 @@ extern "C" /** \brief Sets a BOOL settings value. * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * \param val The value to set. * @@ -367,7 +367,7 @@ extern "C" /** \brief Returns a INT16 settings value * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * * \return the value of the INT16 key @@ -378,7 +378,7 @@ extern "C" /** \brief Sets a INT16 settings value. * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * \param val The value to set. * @@ -389,7 +389,7 @@ extern "C" /** \brief Returns a UINT16 settings value * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * * \return the value of the UINT16 key @@ -400,7 +400,7 @@ extern "C" /** \brief Sets a UINT16 settings value. * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * \param val The value to set. * @@ -411,7 +411,7 @@ extern "C" /** \brief Returns a INT32 settings value * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * * \return the value of the INT32 key @@ -422,7 +422,7 @@ extern "C" /** \brief Sets a INT32 settings value. * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * \param val The value to set. * @@ -433,7 +433,7 @@ extern "C" /** \brief Returns a UINT32 settings value * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * * \return the value of the UINT32 key @@ -444,7 +444,7 @@ extern "C" /** \brief Sets a UINT32 settings value. * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * \param val The value to set. * @@ -455,7 +455,7 @@ extern "C" /** \brief Returns a INT64 settings value * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * * \return the value of the INT64 key @@ -466,7 +466,7 @@ extern "C" /** \brief Sets a INT64 settings value. * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * \param val The value to set. * @@ -477,7 +477,7 @@ extern "C" /** \brief Returns a UINT64 settings value * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * * \return the value of the UINT64 key @@ -488,7 +488,7 @@ extern "C" /** \brief Sets a UINT64 settings value. * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * \param val The value to set. * @@ -499,7 +499,7 @@ extern "C" /** \brief Returns a immutable string settings value * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * * \return the immutable string pointer @@ -510,7 +510,7 @@ extern "C" /** \brief Returns a string settings value * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * * \return the string pointer @@ -521,9 +521,9 @@ extern "C" /** \brief Sets a string settings value. The \b val is copied. * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query - * \param val The value to set. If NULL allocates an empty string buffer of \b len size, + * \param val The value to set. If nullptr allocates an empty string buffer of \b len size, * otherwise a copy is created. \param len The length of \b val, 0 to remove the old entry. * * \return \b TRUE for success, \b FALSE for failure @@ -534,9 +534,9 @@ extern "C" /** \brief Sets a string settings value. The \b param is copied. * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query - * \param val The value to set. If NULL removes the old entry, otherwise a copy is + * \param val The value to set. If nullptr removes the old entry, otherwise a copy is * created. * * \return \b TRUE for success, \b FALSE for failure @@ -548,9 +548,9 @@ extern "C" * If the initial value of the setting was not empty, @code * @endcode is created * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query - * \param separator The separator string to use. May be NULL (no separator) + * \param separator The separator string to use. May be nullptr (no separator) * \param param The value to append * * \return \b TRUE for success, \b FALSE for failure @@ -562,9 +562,10 @@ extern "C" /** \brief Sets a string settings value. The \b param is converted to UTF-8 and the copy stored. * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query - * \param param The value to set. If NULL removes the old entry, otherwise a copy is created. + * \param param The value to set. If nullptr removes the old entry, otherwise a copy is + * created. * * \return \b TRUE for success, \b FALSE for failure */ @@ -574,9 +575,10 @@ extern "C" /** \brief Sets a string settings value. The \b param is converted to UTF-8 and the copy stored. * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query - * \param param The value to set. If NULL removes the old entry, otherwise a copy is created. + * \param param The value to set. If nullptr removes the old entry, otherwise a copy is + * created. * \param length The length of the WCHAR string in number of WCHAR characters * * \return \b TRUE for success, \b FALSE for failure @@ -589,7 +591,7 @@ extern "C" * \param settings A pointer to the settings struct to use * \param id The settings identifier * - * \return An allocated, '\0' terminated WCHAR string or NULL + * \return An allocated, '\0' terminated WCHAR string or nullptr */ WINPR_ATTR_MALLOC(free, 1) WINPR_ATTR_NODISCARD @@ -599,7 +601,7 @@ extern "C" /** \brief Returns a immutable pointer settings value * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * * \return the immutable pointer value @@ -610,7 +612,7 @@ extern "C" /** \brief Returns a mutable pointer settings value * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to query * * \return the mutable pointer value @@ -621,7 +623,7 @@ extern "C" /** \brief Set a pointer to value \b val * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to update * \param val The data to set (direct update, no copy created, previous value overwritten) * @@ -633,7 +635,7 @@ extern "C" /** \brief Set a pointer to value \b data * - * \param settings A pointer to the settings to query, must not be NULL. + * \param settings A pointer to the settings to query, must not be nullptr. * \param id The key to update * \param data The data to set (copy created, previous value freed) * @@ -666,10 +668,10 @@ extern "C" * - Strings are passed on as is * - Pointers are also passed as is * - * @param settings The settings instance to set the value, must not be \b NULL + * @param settings The settings instance to set the value, must not be \b nullptr * @param name The name of the settings key (like 'FreeRDP_Domain', same as output of \ref - * freerdp_settings_get_name_for_key ) Must not be \b NULL - * @param value The value of the setting. Must not be \b NULL + * freerdp_settings_get_name_for_key ) Must not be \b nullptr + * @param value The value of the setting. Must not be \b nullptr * * @note If the function fails check \ref wLog output for details * @@ -728,7 +730,7 @@ extern "C" /** \brief Returns the type name for a \b key * * \param key the key number to stringify - * \return the name of the key or \b NULL + * \return the name of the key or \b nullptr */ WINPR_ATTR_NODISCARD FREERDP_API const char* freerdp_settings_get_name_for_key(SSIZE_T key); @@ -771,9 +773,9 @@ extern "C" * The server name might be in key FreeRDP_ServerHostname or if used in * FreeRDP_UserSpecifiedServerName. This function returns the correct name to use. * - * \param settings The settings to query, must not be NULL. + * \param settings The settings to query, must not be nullptr. * - * \return A string pointer or NULL in case of failure. + * \return A string pointer or nullptr in case of failure. */ WINPR_ATTR_NODISCARD FREERDP_API const char* freerdp_settings_get_server_name(const rdpSettings* settings); @@ -784,7 +786,7 @@ extern "C" * \param buffer A pointer to the string buffer to write to * \param length The size of the string buffer * - * \return A pointer to \b buffer for success, NULL otherwise + * \return A pointer to \b buffer for success, nullptr otherwise */ WINPR_ATTR_NODISCARD FREERDP_API const char* freerdp_rail_support_flags_to_string(UINT32 flags, char* buffer, @@ -828,7 +830,7 @@ extern "C" size_t size); /** \brief return the configuration directory for the library - * @return The current configuration path or \b NULL + * @return The current configuration path or \b nullptr * @since version 3.6.0 * @note Since 3.17.1 this is a wrapper for \b freerdp_GetConfigFilePath(FALSE, "") */ @@ -863,8 +865,8 @@ extern "C" * @param settings The settings instance to serialize * @param pretty Format the resulting \b JSON human readable * @param plength An optional pointer that receives the length (strlen) of the returned string. - * @return A \b JSON string representing the serialized form of the \b rdpSettings or \b NULL - * in case of an error. + * @return A \b JSON string representing the serialized form of the \b rdpSettings or \b + * nullptr in case of an error. * @since version 3.16.0 */ WINPR_ATTR_MALLOC(free, 1) @@ -876,7 +878,7 @@ extern "C" * * @param jstr The \b JSON string * @param length The strlen of the \b JSON string - * @return An allocated \b rdpSettings struct or \b NULL in case of an error + * @return An allocated \b rdpSettings struct or \b nullptr in case of an error * @since version 3.16.0 */ WINPR_ATTR_MALLOC(freerdp_settings_free, 1) diff --git a/include/freerdp/timer.h b/include/freerdp/timer.h index fd3455062..972bc147e 100644 --- a/include/freerdp/timer.h +++ b/include/freerdp/timer.h @@ -74,7 +74,7 @@ extern "C" * * @param context The RDP context the timer belongs to * @param intervalNS The (first) timer expiration interval in nanoseconds - * @param callback The function to be called when the timer expires. Must not be \b NULL + * @param callback The function to be called when the timer expires. Must not be \b nullptr * @param userdata Custom userdata passed to the callback. The pointer is only passed, it is up * to the user to ensure the data exists when the timer expires. * @param mainloop \b true run the callback in mainloop context or \b false from background diff --git a/include/freerdp/transport_io.h b/include/freerdp/transport_io.h index 480047f01..69e98f9b3 100644 --- a/include/freerdp/transport_io.h +++ b/include/freerdp/transport_io.h @@ -159,7 +159,7 @@ extern "C" /** * @brief Free a transport layer instance - * @param layer A pointer to the layer to free or \b NULL + * @param layer A pointer to the layer to free or \b nullptr * @since version 3.9.0 */ FREERDP_API void transport_layer_free(rdpTransportLayer* layer); @@ -172,7 +172,7 @@ extern "C" * @param transport A pointer to the transport instance to use * @param contextSize The size of the context to use. If \b 0 no rdpTransportLayer::userContext * is allocated or freed. - * @return A new transport layer instance or \b NULL in case of failure + * @return A new transport layer instance or \b nullptr in case of failure * @since version 3.9.0 */ WINPR_ATTR_MALLOC(transport_layer_free, 1) diff --git a/include/freerdp/utils/aad.h b/include/freerdp/utils/aad.h index c8caef626..ebca094aa 100644 --- a/include/freerdp/utils/aad.h +++ b/include/freerdp/utils/aad.h @@ -74,7 +74,7 @@ extern "C" * * @since version 3.0.0 * - * @return The token string or \b NULL + * @return The token string or \b nullptr */ WINPR_ATTR_MALLOC(free, 1) WINPR_ATTR_NODISCARD @@ -95,7 +95,7 @@ extern "C" * * @param context The rdpContext to query for * @param which The enum value of the field to query - * @return A constant string to be used for queries or \b NULL in case it does not exist. + * @return A constant string to be used for queries or \b nullptr in case it does not exist. * * @since version 3.10.0 */ @@ -107,7 +107,7 @@ extern "C" * * @param context The rdpContext to query for * @param which The raw string name of the field to query - * @return A constant string to be used for queries or \b NULL in case it does not exist. + * @return A constant string to be used for queries or \b nullptr in case it does not exist. * * @since version 3.10.0 */ @@ -119,7 +119,8 @@ extern "C" * * @param context The rdpContext to query for * @param which The enum value of the field to query - * @return A \b WINPR_JSON object to be used for queries or \b NULL in case it does not exist. + * @return A \b WINPR_JSON object to be used for queries or \b nullptr in case it does not + * exist. * * @since version 3.10.0 */ @@ -131,7 +132,8 @@ extern "C" * * @param context The rdpContext to query for * @param which The raw string name of the field to query - * @return A \b WINPR_JSON object to be used for queries or \b NULL in case it does not exist. + * @return A \b WINPR_JSON object to be used for queries or \b nullptr in case it does not + * exist. * * @since version 3.10.0 */ @@ -144,7 +146,8 @@ extern "C" * @param log A logger instance to use * @param base the base URL to connect to * @param tenantid the tenant to use for the connection, use \b common for default - * @return A \b WINPR_JSON object to be used for queries or \b NULL in case it does not exist. + * @return A \b WINPR_JSON object to be used for queries or \b nullptr in case it does not + * exist. * * @since version 3.10.0 */ diff --git a/include/freerdp/utils/helpers.h b/include/freerdp/utils/helpers.h index 79affbda8..57ae78ae1 100644 --- a/include/freerdp/utils/helpers.h +++ b/include/freerdp/utils/helpers.h @@ -31,14 +31,14 @@ extern "C" #endif /** @brief Return the absolute path of a configuration file (the path of the configuration - * directory if \b filename is \b NULL) + * directory if \b filename is \b nullptr) * * @param system a boolean indicating the configuration base, \b TRUE for system configuration, * \b FALSE for user configuration * @param filename an optional configuration file name to append. * - * @return The absolute path of the desired configuration or \b NULL in case of failure. Use \b - * free to clean up the allocated string. + * @return The absolute path of the desired configuration or \b nullptr in case of failure. Use + * \b free to clean up the allocated string. * * * @since version 3.9.0 @@ -53,7 +53,7 @@ extern "C" * \b FALSE for user configuration * @param filename an optional configuration file name to append. * - * @return A parsed \b WINPR_JSON object or \b NULL in case of any failure. + * @return A parsed \b WINPR_JSON object or \b nullptr in case of any failure. * @since version 3.16.0 */ WINPR_ATTR_MALLOC(WINPR_JSON_Delete, 1) @@ -73,9 +73,9 @@ extern "C" * path will always have the format 'vendor/product' or 'vendor/product1' (1 for the actual * version set) * - * @param vendor A vendor name to use. Must not be \b NULL. Must not contain forbidden + * @param vendor A vendor name to use. Must not be \b nullptr. Must not contain forbidden * filesystem symbols for any os. Must be less than \b MAX_PATH bytes. - * @param product A product name to use. Must not be \b NULL. Must not contain forbidden + * @param product A product name to use. Must not be \b nullptr. Must not contain forbidden * filesystem symbols for any os. Must be less than \b MAX_PATH bytes. * @param version An optional versioning value to append to paths to settings. Use \b -1 to * disable. diff --git a/include/freerdp/utils/passphrase.h b/include/freerdp/utils/passphrase.h index 48d79509c..60172ba41 100644 --- a/include/freerdp/utils/passphrase.h +++ b/include/freerdp/utils/passphrase.h @@ -71,7 +71,7 @@ extern "C" * @param bufsiz The size of the buffer in bytes * @param from_stdin \b 0 if a terminal is expected, != 0 if data is read from stdin * - * @return A pointer to \ref buf containing the password or \ref NULL in case of an error. + * @return A pointer to \ref buf containing the password or \ref nullptr in case of an error. */ WINPR_ATTR_NODISCARD FREERDP_API const char* freerdp_passphrase_read(rdpContext* context, const char* prompt, diff --git a/include/freerdp/utils/pod_arrays.h b/include/freerdp/utils/pod_arrays.h index cf4122667..5a928a462 100644 --- a/include/freerdp/utils/pod_arrays.h +++ b/include/freerdp/utils/pod_arrays.h @@ -38,7 +38,7 @@ extern "C" static inline void array_##TLOWER##_init(Array##T* a) \ { \ WINPR_ASSERT(a); \ - a->values = NULL; \ + a->values = nullptr; \ a->nvalues = 0; \ } \ \ @@ -130,7 +130,7 @@ extern "C" WINPR_ASSERT(a); \ free(a->values); \ \ - a->values = NULL; \ + a->values = nullptr; \ a->nvalues = 0; \ } diff --git a/include/freerdp/utils/proxy_utils.h b/include/freerdp/utils/proxy_utils.h index bfb032e07..114ca93c2 100644 --- a/include/freerdp/utils/proxy_utils.h +++ b/include/freerdp/utils/proxy_utils.h @@ -31,8 +31,8 @@ extern "C" /** @brief parse a proxy environment variable string and populate settings from it * - * @param settings the settings to populate, must not be \b NULL - * @param uri_in the proxy string to parse, must not be \b NULL + * @param settings the settings to populate, must not be \b nullptr + * @param uri_in the proxy string to parse, must not be \b nullptr * * @return \b TRUE if parsed successfully */ diff --git a/include/freerdp/utils/rdpdr_utils.h b/include/freerdp/utils/rdpdr_utils.h index 4d1022782..bf7e72a26 100644 --- a/include/freerdp/utils/rdpdr_utils.h +++ b/include/freerdp/utils/rdpdr_utils.h @@ -94,7 +94,7 @@ extern "C" * @param ioCode1Mask A \ref RDPDR_CAPS_IRP_MJ value * @param buffer A pointer to a buffer that can hold the string representation * @param len The length of the buffer in bytes. - * @return A string representation of the constant mask or \b NULL in case the buffer is too + * @return A string representation of the constant mask or \b nullptr in case the buffer is too * small * * @since version 3.21.0 diff --git a/include/freerdp/utils/ringbuffer.h b/include/freerdp/utils/ringbuffer.h index 6caaf600a..cc639bf8e 100644 --- a/include/freerdp/utils/ringbuffer.h +++ b/include/freerdp/utils/ringbuffer.h @@ -95,7 +95,7 @@ extern "C" * * @param ringbuffer the ring buffer * @param sz the size to ensure - * @return a pointer on the write head, or NULL in case of OOM + * @return a pointer on the write head, or nullptr in case of OOM */ WINPR_ATTR_NODISCARD FREERDP_API BYTE* ringbuffer_ensure_linear_write(RingBuffer* ringbuffer, size_t sz); diff --git a/include/freerdp/utils/signal.h b/include/freerdp/utils/signal.h index 188099cef..17963c50a 100644 --- a/include/freerdp/utils/signal.h +++ b/include/freerdp/utils/signal.h @@ -38,7 +38,7 @@ extern "C" * This allows cleaning up resources like with \b atexit but for signals. * * \param context a context for the clenaup handler. - * \param handler the function to call on cleanup. Must not be \b NULL + * \param handler the function to call on cleanup. Must not be \b nullptr * * \return \b TRUE if registered successfully, \b FALSE otherwise. */ @@ -51,7 +51,7 @@ extern "C" * This allows removal of a cleanup handler for signals. * * \param context a context for the clenaup handler. - * \param handler the function to call on cleanup. Must not be \b NULL + * \param handler the function to call on cleanup. Must not be \b nullptr * * \return \b TRUE if unregistered successfully, \b FALSE otherwise. */ diff --git a/include/freerdp/utils/string.h b/include/freerdp/utils/string.h index 883d72241..5e25c4134 100644 --- a/include/freerdp/utils/string.h +++ b/include/freerdp/utils/string.h @@ -39,9 +39,9 @@ extern "C" /** @brief extracts = pairs from a string * - * @param str The string to extract data from, must not be \b NULL - * @param pkey A pointer to store the key value, must not be \b NULL - * @param pvalue A pointer to store the value, must not be \b NULL + * @param str The string to extract data from, must not be \b nullptr + * @param pkey A pointer to store the key value, must not be \b nullptr + * @param pvalue A pointer to store the value, must not be \b nullptr * * @return \b TRUE if successfully extracted, \b FALSE if no matching data was found *