aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorChen Gang <gang.chen.5i5j@gmail.com>2014-06-13 15:52:55 +0100
committerNick Clifton <nickc@redhat.com>2014-06-13 15:52:55 +0100
commit2132b4072fb1368afbc0405f909bdf67fcfee427 (patch)
treeea1e4825b3749b403de72a6f01c9eb8742a674b2 /gas
parentb94ade42840d1b0fbf818db49d98da9ba80c1d53 (diff)
downloadgdb-2132b4072fb1368afbc0405f909bdf67fcfee427.zip
gdb-2132b4072fb1368afbc0405f909bdf67fcfee427.tar.gz
gdb-2132b4072fb1368afbc0405f909bdf67fcfee427.tar.bz2
A simple replacement of sprintf (xxx, "%s", xxx) with strcpy.
* config/tc-score7.c: Replace sprintf with strcpy where appropriate.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-score7.c10
2 files changed, 10 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index fd331d7..265a272 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2014-06-13 Chen Gang <gang.chen.5i5j@gmail.com>
+
+ * config/tc-score7.c: Replace sprintf with strcpy where
+ appropriate.
+
2014-06-07 Alan Modra <amodra@gmail.com>
* config/tc-ppc.c (ppc_insert_operand): Handle PPC_OPERAND_SIGNOPT
diff --git a/gas/config/tc-score7.c b/gas/config/tc-score7.c
index 0a0db2d..4719680 100644
--- a/gas/config/tc-score7.c
+++ b/gas/config/tc-score7.c
@@ -2795,7 +2795,7 @@ s7_parse_16_32_inst (char *insnstr, bfd_boolean gen_frag_p)
*p = c;
memset (&s7_inst, '\0', sizeof (s7_inst));
- sprintf (s7_inst.str, "%s", insnstr);
+ strcpy (s7_inst.str, insnstr);
if (opcode)
{
s7_inst.instruction = opcode->value;
@@ -2804,7 +2804,7 @@ s7_parse_16_32_inst (char *insnstr, bfd_boolean gen_frag_p)
s7_inst.size = s7_GET_INSN_SIZE (s7_inst.type);
s7_inst.relax_size = 0;
s7_inst.bwarn = 0;
- sprintf (s7_inst.name, "%s", opcode->template_name);
+ strcpy (s7_inst.name, opcode->template_name);
strcpy (s7_inst.reg, "");
s7_inst.error = NULL;
s7_inst.reloc.type = BFD_RELOC_NONE;
@@ -5308,12 +5308,12 @@ s7_parse_pce_inst (char *insnstr)
p = strstr (insnstr, "||");
c = *p;
*p = '\0';
- sprintf (first, "%s", insnstr);
+ strcpy (first, insnstr);
/* Get second part string of PCE. */
*p = c;
p += 2;
- sprintf (second, "%s", p);
+ strcpy (second, p);
s7_parse_16_32_inst (first, FALSE);
if (s7_inst.error)
@@ -5337,7 +5337,7 @@ s7_parse_pce_inst (char *insnstr)
|| ((pec_part_1.size == s7_INSN16_SIZE) && (s7_inst.size == s7_INSN_SIZE)))
{
s7_inst.error = _("pce instruction error (16 bit || 16 bit)'");
- sprintf (s7_inst.str, insnstr);
+ strcpy (s7_inst.str, insnstr);
return;
}