diff --git a/src/screencast/wlr_screencast.c b/src/screencast/wlr_screencast.c index d9a95bc..cb4634d 100644 --- a/src/screencast/wlr_screencast.c +++ b/src/screencast/wlr_screencast.c @@ -613,32 +613,6 @@ static void wlr_init_xdg_outputs(struct xdpw_screencast_context *ctx) { } } -// stolen from LLVM cuz it wouldnt include lol -static inline int vasprintf(char **strp, const char *fmt, va_list ap) { - const size_t buff_size = 256; - if ((*strp = (char *)malloc(buff_size)) == NULL) { - return -1; - } - - va_list ap_copy; - // va_copy may not be provided by the C library in C++ 03 mode. -#if defined(_LIBCPP_CXX03_LANG) && __has_builtin(__builtin_va_copy) - __builtin_va_copy(ap_copy, ap); -#else - va_copy(ap_copy, ap); -#endif - int str_size = vsnprintf(*strp, buff_size, fmt, ap_copy); - va_end(ap_copy); - - if ((size_t)str_size >= buff_size) { - if ((*strp = (char *)realloc(*strp, str_size + 1)) == NULL) { - return -1; - } - str_size = vsnprintf(*strp, str_size + 1, fmt, ap); - } - return str_size; -} - char *buildWindowList(struct xdpw_screencast_context *ctx) { char *rolling = calloc(1, 1);