rem: __strtol_t product = *x * scale_factor; if (*x != product / scale_factor) return 1; *x = product; return 0;
add: if (TYPE_SIGNED (__strtol_t) && *x < STRTOL_T_MINIMUM / scale_factor) { *x = STRTOL_T_MINIMUM; return LONGINT_OVERFLOW; } if (STRTOL_T_MAXIMUM / scale_factor < *x) { *x = STRTOL_T_MAXIMUM; return LONGINT_OVERFLOW; } *x *= scale_factor; return LONGINT_OK;
context: bkm_scale (__strtol_t *x, int scale_factor){  __strtol_t product = *x * scale_factor;  if (*x != product / scale_factor)    return 1;  *x = product;  return 0;}