sp_cmd_generic_try_from_packet return struct directly

This commit is contained in:
Vinzenz Schroeter 2025-05-18 11:20:57 +02:00
parent 389ced492c
commit c9d2479f5e
3 changed files with 24 additions and 8 deletions

View file

@ -1564,6 +1564,8 @@ struct Command sp_cmd_generic_clone(struct Command command);
/**
* Deallocates an [SPCommand].
*
* Commands with an invalid `tag` do not have to be freed as the `data` pointer should be null.
*
* # Examples
*
* ```C
@ -1588,7 +1590,7 @@ struct Packet *sp_cmd_generic_into_packet(struct Command command);
*
* Returns: pointer to new [SPCommand] instance or NULL if parsing failed.
*/
struct Command *sp_cmd_generic_try_from_packet(struct Packet */*notnull*/ packet);
struct Command sp_cmd_generic_try_from_packet(struct Packet */*notnull*/ packet);
/**
* Deallocates a [HardResetCommand].