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

(-)smartmontools-5.36.orig/ataprint.c (-3 / +3 lines)
Lines 445-451 Link Here
445
  unsigned short lba_64         = drive->words088_255[103-88];
445
  unsigned short lba_64         = drive->words088_255[103-88];
446
  uint64_t capacity_short=0, capacity=0, threedigits, power_of_ten;
446
  uint64_t capacity_short=0, capacity=0, threedigits, power_of_ten;
447
  int started=0,k=1000000000;
447
  int started=0,k=1000000000;
448
  char separator=',';
448
  char *separator=",";
449
449
450
  // get correct character to use as thousands separator
450
  // get correct character to use as thousands separator
451
#ifdef HAVE_LOCALE_H
451
#ifdef HAVE_LOCALE_H
Lines 453-459 Link Here
453
  setlocale (LC_ALL, "");
453
  setlocale (LC_ALL, "");
454
  currentlocale=localeconv();
454
  currentlocale=localeconv();
455
  if (*(currentlocale->thousands_sep))
455
  if (*(currentlocale->thousands_sep))
456
    separator=*(currentlocale->thousands_sep);
456
    separator=currentlocale->thousands_sep;
457
#endif // #ifdef HAVE_LOCALE_H
457
#endif // #ifdef HAVE_LOCALE_H
458
458
459
  // if drive supports LBA addressing, determine 32-bit LBA capacity
459
  // if drive supports LBA addressing, determine 32-bit LBA capacity
Lines 485-491 Link Here
485
    capacity   -= threedigits*power_of_ten;
485
    capacity   -= threedigits*power_of_ten;
486
    if (started)
486
    if (started)
487
      // we have already printed some digits
487
      // we have already printed some digits
488
      pstring += sprintf(pstring, "%c%03"PRIu64, separator, threedigits);
488
      pstring += sprintf(pstring, "%s%03"PRIu64, separator, threedigits);
489
    else if (threedigits || k==6) {
489
    else if (threedigits || k==6) {
490
      // these are the first digits that we are printing
490
      // these are the first digits that we are printing
491
      pstring += sprintf(pstring, "%"PRIu64, threedigits);
491
      pstring += sprintf(pstring, "%"PRIu64, threedigits);

Return to bug 139409