summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/driver_ddebug
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/driver_ddebug')
-rw-r--r--src/gallium/auxiliary/driver_ddebug/dd_util.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/driver_ddebug/dd_util.h b/src/gallium/auxiliary/driver_ddebug/dd_util.h
index bcf026f2ef9..20aca94cc67 100644
--- a/src/gallium/auxiliary/driver_ddebug/dd_util.h
+++ b/src/gallium/auxiliary/driver_ddebug/dd_util.h
@@ -35,6 +35,7 @@
#include "os/os_process.h"
#include "util/u_atomic.h"
#include "util/u_debug.h"
+#include "util/u_string.h"
#include "pipe/p_config.h"
#if defined(PIPE_OS_UNIX)
@@ -61,13 +62,13 @@ dd_get_debug_filename_and_mkdir(char *buf, size_t buflen, bool verbose)
strcpy(proc_name, "unknown");
}
- snprintf(dir, sizeof(dir), "%s/"DD_DIR, debug_get_option("HOME", "."));
+ util_snprintf(dir, sizeof(dir), "%s/"DD_DIR, debug_get_option("HOME", "."));
if (mkdir(dir, 0774) && errno != EEXIST)
fprintf(stderr, "dd: can't create a directory (%i)\n", errno);
- snprintf(buf, buflen, "%s/%s_%u_%08u", dir, proc_name, getpid(),
- p_atomic_inc_return(&index) - 1);
+ util_snprintf(buf, buflen, "%s/%s_%u_%08u", dir, proc_name, getpid(),
+ p_atomic_inc_return(&index) - 1);
if (verbose)
fprintf(stderr, "dd: dumping to file %s\n", buf);