Print this page
Address Robert's feedback

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libsysdemangle/common/sysdemangle.c
          +++ new/usr/src/lib/libsysdemangle/common/sysdemangle.c
↓ open down ↓ 47 lines elided ↑ open up ↑
  48   48  char *
  49   49  sysdemangle(const char *str, sysdem_lang_t lang, sysdem_ops_t *ops)
  50   50  {
  51   51  
  52   52          if (ops == NULL)
  53   53                  ops = sysdem_ops_default;
  54   54  
  55   55          if (lang == SYSDEM_LANG_AUTO) {
  56   56                  lang = detect_lang(str);
  57   57                  if (lang == SYSDEM_LANG_AUTO) {
  58      -                        errno = ENOSYS;
       58 +                        errno = ENOTSUP;
  59   59                          return (NULL);
  60   60                  }
  61   61          }
  62   62  
  63   63          switch (lang) {
       64 +        case SYSDEM_LANG_AUTO:
       65 +                break;
  64   66          case SYSDEM_LANG_CPP:
  65   67                  return (cpp_demangle(str, ops));
  66      -
  67      -        default:
  68      -                break;
  69   68          }
  70   69  
  71      -        /* XXX: better return value? */
  72      -        errno = ENOSYS;
       70 +        errno = ENOTSUP;
  73   71          return (NULL);
  74   72  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX