diff options
author | Lynne <dev@lynne.ee> | 2022-02-22 06:29:42 +0100 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2022-02-22 06:30:12 +0100 |
commit | 9e2deba9a9a715eb5deca7fd8282df88ecdd5059 (patch) | |
tree | 944b4cbe521933d38bc0fcb7088874352cb432ef /libavutil | |
parent | 82ef4c708e64b7e41df1dd6e0440f5ac0d385c95 (diff) | |
download | ffmpeg-9e2deba9a9a715eb5deca7fd8282df88ecdd5059.tar.gz |
lavu/vulkan: avoid using strlen as a loop condition
Whatever.
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/vulkan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index 00df08b55e..403f0b1f27 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -829,11 +829,12 @@ void ff_vk_print_shader(void *ctx, FFVkSPIRVShader *shd, int prio) int line = 0; const char *p = shd->src.str; const char *start = p; + const size_t len = strlen(p); AVBPrint buf; av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED); - for (int i = 0; i < strlen(p); i++) { + for (int i = 0; i < len; i++) { if (p[i] == '\n') { av_bprintf(&buf, "%i\t", ++line); av_bprint_append_data(&buf, start, &p[i] - start + 1); |