Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 275905
Collapse All | Expand All

(-)ledger-2.6.1.old/gnucash.cc (-1 / +1 lines)
Lines 201-207 Link Here
201
{
201
{
202
  const char * num = number.c_str();
202
  const char * num = number.c_str();
203
203
204
  if (char * p = std::strchr(num, '/')) {
204
  if (const char * p = std::strchr(num, '/')) {
205
    std::string numer_str(num, p - num);
205
    std::string numer_str(num, p - num);
206
    std::string denom_str(p + 1);
206
    std::string denom_str(p + 1);
207
207
(-)ledger-2.6.1.old/option.cc (-1 / +1 lines)
Lines 893-899 Link Here
893
namespace {
893
namespace {
894
  void parse_price_setting(const char * optarg)
894
  void parse_price_setting(const char * optarg)
895
  {
895
  {
896
    char * equals = std::strchr(optarg, '=');
896
    const char * equals = std::strchr(optarg, '=');
897
    if (! equals)
897
    if (! equals)
898
      return;
898
      return;
899
899
(-)ledger-2.6.1.old/textual.cc (-2 / +2 lines)
Lines 298-305 Link Here
298
      DEBUG_PRINT("ledger.textual.parse", "line " << linenum << ": " <<
298
      DEBUG_PRINT("ledger.textual.parse", "line " << linenum << ": " <<
299
		  "Parsed a note '" << xact->note << "'");
299
		  "Parsed a note '" << xact->note << "'");
300
300
301
      if (char * b = std::strchr(xact->note.c_str(), '['))
301
      if (const char * b = std::strchr(xact->note.c_str(), '['))
302
	if (char * e = std::strchr(xact->note.c_str(), ']')) {
302
	if (const char * e = std::strchr(xact->note.c_str(), ']')) {
303
	  char buf[256];
303
	  char buf[256];
304
	  std::strncpy(buf, b + 1, e - b - 1);
304
	  std::strncpy(buf, b + 1, e - b - 1);
305
	  buf[e - b - 1] = '\0';
305
	  buf[e - b - 1] = '\0';

Return to bug 275905