aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c b/src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c
index 7c9d1779df5..422bdb04405 100644
--- a/src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c
+++ b/src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c
@@ -28,6 +28,7 @@
*/
#include <errno.h>
+#include <limits.h>
#include <regex.h>
#include <stdlib.h>
#include <stdio.h>
@@ -528,7 +529,6 @@ void init_compiler(
}
#define MAX_LINE_LENGTH 100
-#define MAX_PATH_LENGTH 100
unsigned load_program(
struct radeon_compiler *c,
@@ -536,14 +536,14 @@ unsigned load_program(
const char *filename)
{
char line[MAX_LINE_LENGTH];
- char path[MAX_PATH_LENGTH];
+ char path[PATH_MAX];
FILE *file;
unsigned *count;
char **string_store;
unsigned i = 0;
memset(line, 0, sizeof(line));
- snprintf(path, MAX_PATH_LENGTH, TEST_PATH "/%s", filename);
+ snprintf(path, PATH_MAX, TEST_PATH "/%s", filename);
file = fopen(path, "r");
if (!file) {
return 0;