Print this page
Reduce lint

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/tmpfs/tmp_subr.c
          +++ new/usr/src/uts/common/fs/tmpfs/tmp_subr.c
↓ open down ↓ 181 lines elided ↑ open up ↑
 182  182          if (ddi_strtoull(str, &c, 10, &num) != 0) {
 183  183                  return (EINVAL);
 184  184          }
 185  185  
 186  186          /*
 187  187           * Handle a size in percent. Anything other than a single percent
 188  188           * modifier is invalid. We use either the zone's swap limit or the
 189  189           * system's total available swap size as the initial value. Perform the
 190  190           * intermediate calculation in pages to avoid overflow.
 191  191           */
 192      -        if (*c == '\%') {
      192 +        if (*c == '%') {
 193  193                  u_longlong_t cap;
 194  194  
 195  195                  if (*(c + 1) != '\0')
 196  196                          return (EINVAL);
 197  197  
 198  198                  if (num > 100)
 199  199                          return (EINVAL);
 200  200  
 201  201                  cap = (u_longlong_t)curproc->p_zone->zone_max_swap_ctl;
 202  202                  if (cap == UINT64_MAX) {
↓ open down ↓ 85 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX