plugins/out_kafka/librdkafka-1.5.0/src/rdkafka_admin.c
static void rd_kafka_admin_result_set_err0 (rd_kafka_op_t *rko,
                                            rd_kafka_resp_err_t err,
                                            const char *fmt, va_list ap) {
        char buf[512];

        rd_vsnprintf(buf, sizeof(buf), fmt, ap);

        rko->rko_err = err;

        if (rko->rko_u.admin_result.errstr)
                rd_free(rko->rko_u.admin_result.errstr);
        rko->rko_u.admin_result.errstr = rd_strdup(buf);

        rd_kafka_dbg(rko->rko_rk, ADMIN, "ADMINFAIL",
                     "Admin %s result error: %s",
                     rd_kafka_op2str(rko->rko_u.admin_result.reqtype),
                     rko->rko_u.admin_result.errstr);
}
/**
 * @brief Set error code and error string on admin_result op \p rko.
 */
@brief Set error code and error string on admin_result op \p rko.
@brief Set error code and error string on admin_result op \ p rko .
static void rd_kafka_admin_result_set_err0 (rd_kafka_op_t *rko,
                                            rd_kafka_resp_err_t err,
                                            const char *fmt, va_list ap) {
        char buf[512];
        rd_vsnprintf(buf, sizeof(buf), fmt, ap);
        rko->rko_err = err;
        if (rko->rko_u.admin_result.errstr)
                rd_free(rko->rko_u.admin_result.errstr);
        rko->rko_u.admin_result.errstr = rd_strdup(buf);
        rd_kafka_dbg(rko->rko_rk, ADMIN, "ADMINFAIL",
                     "Admin %s result error: %s",
                     rd_kafka_op2str(rko->rko_u.admin_result.reqtype),
                     rko->rko_u.admin_result.errstr);
}
static void rd_kafka_admin_result_set_err0 ( rd_kafka_op_t * rko , rd_kafka_resp_err_t err , const char * fmt , va_list ap ) { char buf [ 512 ] ; rd_vsnprintf ( buf , sizeof ( buf ) , fmt , ap ) ; rko -> rko_err = err ; if ( rko -> rko_u . admin_result . errstr ) rd_free ( rko -> rko_u . admin_result . errstr ) ; rko -> rko_u . admin_result . errstr = rd_strdup ( buf ) ; rd_kafka_dbg ( rko -> rko_rk , ADMIN , " " , " " , rd_kafka_op2str ( rko -> rko_u . admin_result . reqtype ) , rko -> rko_u . admin_result . errstr ) ; }
@brief Set error code and error string on admin_result op \p rko.
@brief Set error code and error string on admin_result op \ p rko .