rem: if (-1 != (n = snprintf(buf, sizeof(buf), "%d%c", (int)(num / *dp), *up)) && width >= n) return buf;
add: if (width >= snprintf(buf, sizeof(buf), "%d%c", (int)(num / *dp), *up)) return buf;
context: static const char *scale_num (unsigned num, const int width, const unsigned type){      /* kilobytes, megabytes, gigabytes, duh! */   static float scale[] = { 1024, 1024*1024, 1024*1024*1024, 0 };      /* kilo, mega, giga, none */#ifdef CASEUP_SCALE   static char nextup[] =  { 'K', 'M', 'G', 0 };#else   static char nextup[] =  { 'k', 'm', 'g', 0 };#endif   static char buf[TNYBUFSIZ];   float *dp;   char *up;   int n;      /* try an unscaled version first... */   if (-1 != (n = snprintf(buf, sizeof(buf), "%u", num))   && width >= n) return buf;      /* now try successively higher types until it fits */   for (up = nextup + type, dp = scale; *dp; ++dp, ++up) {         /* the most accurate version */      if (-1 != (n = snprintf(buf, sizeof(buf), "%.1f%c", num / *dp, *up))      && width >= n) return buf;         /* the integer version */      if (-1 != (n = snprintf(buf, sizeof(buf), "%d%c", (int)(num / *dp), *up))      && width >= n) return buf;   }      /* well shoot, this outta' fit... */   return "?";}