diff options
author | Eric Engestrom <[email protected]> | 2018-11-20 11:59:28 +0000 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2019-07-19 22:39:38 +0100 |
commit | dffeaa55dd1155d7a1e8feb5ecfc54fff688fcd8 (patch) | |
tree | a232b3bef0f7251f90cd3a279674218c46a60d65 /src/gallium/auxiliary/util | |
parent | 00e23cd96998deae429508efa10545be13420379 (diff) |
util: use standard name for snprintf()
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_debug_flush.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_debug_image.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_debug_symbol.c | 12 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_network.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_simple_shaders.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_tests.c | 4 |
6 files changed, 14 insertions, 14 deletions
diff --git a/src/gallium/auxiliary/util/u_debug_flush.c b/src/gallium/auxiliary/util/u_debug_flush.c index c0be6681800..cc60ab1d7b7 100644 --- a/src/gallium/auxiliary/util/u_debug_flush.c +++ b/src/gallium/auxiliary/util/u_debug_flush.c @@ -364,8 +364,8 @@ debug_flush_might_flush_cb(UNUSED void *key, void *value, void *data) const char *reason = (const char *) data; char message[80]; - util_snprintf(message, sizeof(message), - "%s referenced mapped buffer detected.", reason); + snprintf(message, sizeof(message), + "%s referenced mapped buffer detected.", reason); debug_flush_alert(message, reason, 3, item->bt_depth, TRUE, TRUE, NULL); debug_flush_alert(NULL, "Map", 0, fbuf->bt_depth, TRUE, FALSE, diff --git a/src/gallium/auxiliary/util/u_debug_image.c b/src/gallium/auxiliary/util/u_debug_image.c index f0fd6cf8339..4e7984886d0 100644 --- a/src/gallium/auxiliary/util/u_debug_image.c +++ b/src/gallium/auxiliary/util/u_debug_image.c @@ -57,7 +57,7 @@ debug_dump_image(const char *prefix, unsigned char *rgb8; FILE *f; - util_snprintf(filename, sizeof(filename), "%s.ppm", prefix); + snprintf(filename, sizeof(filename), "%s.ppm", prefix); rgb8 = MALLOC(height * width * 3); if (!rgb8) { diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c b/src/gallium/auxiliary/util/u_debug_symbol.c index a3290142b33..5bc1c3d4fb2 100644 --- a/src/gallium/auxiliary/util/u_debug_symbol.c +++ b/src/gallium/auxiliary/util/u_debug_symbol.c @@ -191,9 +191,9 @@ debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size) if (GetModuleFileNameA(hModule, buffer, sizeof buffer) == sizeof buffer) { return FALSE; } - util_snprintf(buf, size, "%p at %s+0x%lx", - addr, buffer, - (unsigned long)((uintptr_t)addr - (uintptr_t)hModule)); + snprintf(buf, size, "%p at %s+0x%lx", + addr, buffer, + (unsigned long)((uintptr_t)addr - (uintptr_t)hModule)); return TRUE; } @@ -208,9 +208,9 @@ debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size) } if (Line.FileName) { - util_snprintf(buf, size, "%s at %s:%lu", pSymbol->Name, Line.FileName, Line.LineNumber); + snprintf(buf, size, "%s at %s:%lu", pSymbol->Name, Line.FileName, Line.LineNumber); } else { - util_snprintf(buf, size, "%s", pSymbol->Name); + snprintf(buf, size, "%s", pSymbol->Name); } return TRUE; @@ -258,7 +258,7 @@ debug_symbol_name(const void *addr, char* buf, unsigned size) } #endif /* defined(HAVE_EXECINFO_H) */ - util_snprintf(buf, size, "%p", addr); + snprintf(buf, size, "%p", addr); buf[size - 1] = 0; } diff --git a/src/gallium/auxiliary/util/u_network.c b/src/gallium/auxiliary/util/u_network.c index 89395f54ea5..15c30f375b0 100644 --- a/src/gallium/auxiliary/util/u_network.c +++ b/src/gallium/auxiliary/util/u_network.c @@ -119,7 +119,7 @@ u_socket_connect(const char *hostname, uint16_t port) hints.ai_family = AF_UNSPEC; // AF_INET or AF_INET6 to force version hints.ai_socktype = SOCK_STREAM; - util_snprintf(portString, sizeof(portString), "%d", port); + snprintf(portString, sizeof(portString), "%d", port); r = getaddrinfo(hostname, portString, NULL, &addr); if (r != 0) { diff --git a/src/gallium/auxiliary/util/u_simple_shaders.c b/src/gallium/auxiliary/util/u_simple_shaders.c index 2fdd60b0bb3..983307ead73 100644 --- a/src/gallium/auxiliary/util/u_simple_shaders.c +++ b/src/gallium/auxiliary/util/u_simple_shaders.c @@ -556,8 +556,8 @@ util_make_fs_blit_msaa_gen(struct pipe_context *pipe, assert(tgsi_tex == TGSI_TEXTURE_2D_MSAA || tgsi_tex == TGSI_TEXTURE_2D_ARRAY_MSAA); - util_snprintf(text, sizeof(text), shader_templ, type, samp_type, - output_semantic, conversion_decl, type, conversion, output_mask); + snprintf(text, sizeof(text), shader_templ, type, samp_type, + output_semantic, conversion_decl, type, conversion, output_mask); if (!tgsi_text_translate(text, tokens, ARRAY_SIZE(tokens))) { puts(text); diff --git a/src/gallium/auxiliary/util/u_tests.c b/src/gallium/auxiliary/util/u_tests.c index e9cbb464229..a5a54a4d2c9 100644 --- a/src/gallium/auxiliary/util/u_tests.c +++ b/src/gallium/auxiliary/util/u_tests.c @@ -623,8 +623,8 @@ test_texture_barrier(struct pipe_context *ctx, bool use_fbfetch, assert(num_samples >= 1 && num_samples <= 8); - util_snprintf(name, sizeof(name), "%s: %s, %u samples", __func__, - use_fbfetch ? "FBFETCH" : "sampler", MAX2(num_samples, 1)); + snprintf(name, sizeof(name), "%s: %s, %u samples", __func__, + use_fbfetch ? "FBFETCH" : "sampler", MAX2(num_samples, 1)); if (!ctx->screen->get_param(ctx->screen, PIPE_CAP_TEXTURE_BARRIER)) { util_report_result_helper(SKIP, name); |