This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
+ name = bfd_alloc (abfd, (is_rela ? 6 : 5) + strlen (old_name)); + if (is_rela) + strcpy (name, ".rela"); + else + strcpy (name, ".rel"); + strcat (name, old_name);
const char * prefix = is_rela ? ".rela" : ".rel"; name = bfd_alloc (abfd, strlen (prefix) + strlen (old_name) + 1); sprintf (name, "%s%s", prefix, old_name);
Why not just use (is_rela ? sizeof (.rela) -1: sizeof (.rel) - 1)
Cheers Nick
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |