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]

Re: [PATCH][GOLD] Add ARM relocation property table.


Richard Earnshaw <rearnsha@arm.com> writes:

>> > +  // strtok needs a non-const string pointer.
>> > +  char* buffer = new char[s.size() + 1];
>
> Why +1?  Presumably the size contains the null terminator.

Here s is a std::string, and std::string::size() returns the number of
characters it contains (some of the characters may be '\0' though of
course that will not happen here).

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]