]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: applet: Simplify a bit comments for applet_put* functions
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 5 Jun 2025 13:43:53 +0000 (15:43 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 10 Jun 2025 06:16:10 +0000 (08:16 +0200)
Instead of repeating which buffer is used depending on the API used by the
applet, a reference to applet_get_outbuf() was added.

include/haproxy/applet.h

index 74437401df56c68598e9c983131a86f254ad620e..e9357e773611b46ac1a8788e50ddf0bc3a15bf04 100644 (file)
@@ -404,8 +404,7 @@ static inline int _applet_putchk(struct appctx *appctx, struct buffer *chunk,
        return ret;
 }
 
-/* writes chunk <chunk> into the applet's output buffer if it uses its own
- * bufferx or into the input channel of the stream attached to this applet.
+/* writes chunk <chunk> into the applet output buffer (see applet_get_outbuf).
  *
  * Returns the number of written bytes on success or -1 on error (lake of space,
  * shutdown, invalid call...)
@@ -421,8 +420,7 @@ static inline int applet_putchk_stress(struct appctx *appctx, struct buffer *chu
        return _applet_putchk(appctx, chunk, 1);
 }
 
-/* writes <len> chars from <blk> into the applet's output buffer if it uses its own
- * bufferx or into the input channel of the stream attached to this applet.
+/* writes <len> chars from <blk> into the applet output buffer (see applet_get_outbuf).
  *
  * Returns the number of written bytes on success or -1 on error (lake of space,
  * shutdown, invalid call...)
@@ -457,9 +455,8 @@ static inline int applet_putblk(struct appctx *appctx, const char *blk, int len)
        return ret;
 }
 
-/* writes chars from <str> up to the trailing zero (excluded) into the applet's
- * output buffer if it uses its own bufferx or into the input channel of the
- * stream attached to this applet.
+/* writes chars from <str> up to the trailing zero (excluded) into the applet
+ * output buffer (see applet_get_outbuf).
  *
  * Returns the number of written bytes on success or -1 on error (lake of space,
  * shutdown, invalid call...)
@@ -495,8 +492,7 @@ static inline int applet_putstr(struct appctx *appctx, const char *str)
        return ret;
 }
 
-/* writes character <chr> into the applet's output buffer if it uses its own
- * bufferx or into the input channel of the stream attached to this applet.
+/* writes character <chr> into the applet's output buffer (see applet_get_outbuf).
  *
  * Returns the number of written bytes on success or -1 on error (lake of space,
  * shutdown, invalid call...)