summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Johnson <peter@tortall.net>2010-01-13 04:44:28 +0000
committerPeter Johnson <peter@tortall.net>2010-01-13 04:44:28 +0000
commite7185d2e24047e6af72911687f535562286a7fc5 (patch)
tree8dcb871c2d1df0c6face3006395519acfb744235
parentcc6301d9ced4800c0b7e7773868d5e6b719b45eb (diff)
downloadyasm-e7185d2e24047e6af72911687f535562286a7fc5.tar.gz
gas-preproc.c: Use sprintf instead of snprintf.
It's impossible for a decimal long string to be longer than 64 chars. Also remove workaround for MSVC added in r2267. svn path=/trunk/yasm/; revision=2273
-rw-r--r--modules/preprocs/gas/gas-preproc.c2
-rw-r--r--util.h4
2 files changed, 1 insertions, 5 deletions
diff --git a/modules/preprocs/gas/gas-preproc.c b/modules/preprocs/gas/gas-preproc.c
index 4c125066..0f659252 100644
--- a/modules/preprocs/gas/gas-preproc.c
+++ b/modules/preprocs/gas/gas-preproc.c
@@ -770,7 +770,7 @@ static void substitute_values(yasm_preproc_gas *pp, char *line)
int cursor = pp->expr_string_cursor;
int k, len = strlen(tokval.t_charptr);
char value[64];
- int value_length = snprintf(value, sizeof(value), "%ld", eval_expr(pp, tokval.t_charptr));
+ int value_length = sprintf(value, "%ld", eval_expr(pp, tokval.t_charptr));
int delta = value_length - len;
line_length += delta;
diff --git a/util.h b/util.h
index 27014f73..132cba1e 100644
--- a/util.h
+++ b/util.h
@@ -117,10 +117,6 @@
# define USE_OUR_OWN_STRCASECMP
#endif
-#ifdef _MSC_VER
-# define snprintf _snprintf
-#endif
-
#include <libyasm/compat-queue.h>
#ifdef HAVE_SYS_CDEFS_H