[riot-notifications] [RIOT-OS/RIOT] sys/net/gnrc_pktbuf: deduplicate code (#15839)

Marian Buschsieweke notifications at github.com
Sat Jan 23 15:32:56 CET 2021

@maribu commented on this pull request.

+ * @brief   Release an internal buffer
+ *
+ * @warning This function is ***internal***. Use @ref gnrc_pktbuf_release to
+ *          release a packet buffer
+ *
+ * @param   data    pointer to the internal buffer to release
+ * @param   size    size of @p data in bytes
+ */
+void gnrc_pktbuf_free_internal(void *data, size_t size);
+static inline void gnrc_pktbuf_free_internal(void *data, size_t size)
+    (void)size;
+    free(data);

> There are some more functions for which you can do this ;-).

Are you referring to this? This would only work, if the function would be `inline`able in both cases. But in case of the static version, I think it is better without `inline`.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210123/2b7d2acb/attachment.htm>

More information about the notifications mailing list