Print this page
smatch clean rtld

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/rtld/common/locale.c
          +++ new/usr/src/cmd/sgs/rtld/common/locale.c
↓ open down ↓ 220 lines elided ↑ open up ↑
 221  221          Domain          *_domain;
 222  222          int             cnt;
 223  223  
 224  224          if (glcs[CI_LCMESSAGES].lc_un.lc_val == 0)
 225  225                  return ((char *)msgid);
 226  226  
 227  227          /*
 228  228           * Determine if we've initialized any domains yet.
 229  229           */
 230  230          if (domaincnt == 0) {
 231      -                if ((domains = calloc(sizeof (Domain), 2)) == NULL)
      231 +                if ((domains = calloc(2, sizeof (Domain))) == NULL)
 232  232                          return ((char *)msgid);
 233  233                  domains[0].dom_name = MSG_ORIG(MSG_SUNW_OST_SGS);
 234  234                  domains[1].dom_name = MSG_ORIG(MSG_SUNW_OST_OSLIB);
 235  235                  domaincnt = 2;
 236  236          }
 237  237  
 238  238          /*
 239  239           * If this is a new locale make sure we clean up any old ones.
 240  240           */
 241  241          if (rtld_flags & RT_FL_NEWLOCALE) {
↓ open down ↓ 57 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX