[BACK]Return to smi.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / snmp

Diff for /src/usr.bin/snmp/smi.c between version 1.2 and 1.3

version 1.2, 2019/08/11 14:41:20 version 1.3, 2019/08/11 15:52:46
Line 181 
Line 181 
         fprintf(stderr, "(%u) encoding %u ",          fprintf(stderr, "(%u) encoding %u ",
             root->be_type, root->be_encoding);              root->be_type, root->be_encoding);
   
         if ((value = smi_print_element(root, 1, smi_os_default, smi_oidl_numeric)) == NULL)          if ((value = smi_print_element(root, 1, smi_os_default,
               smi_oidl_numeric)) == NULL)
                 goto invalid;                  goto invalid;
   
         switch (root->be_encoding) {          switch (root->be_encoding) {
Line 256 
Line 257 
                         if (asprintf(&str, "INTEGER: %s(%d)",                          if (asprintf(&str, "INTEGER: %s(%d)",
                             d ? "true" : "false", d) == -1)                              d ? "true" : "false", d) == -1)
                                 goto fail;                                  goto fail;
                 }                  } else
                 else  
                         if (asprintf(&str, "%s", d ? "true" : "false") == -1)                          if (asprintf(&str, "%s", d ? "true" : "false") == -1)
                                 goto fail;                                  goto fail;
                 break;                  break;
Line 329 
Line 329 
                         else if (root->be_type == SNMP_T_COUNTER64)                          else if (root->be_type == SNMP_T_COUNTER64)
                                 hint = "Counter64: ";                                  hint = "Counter64: ";
                 }                  }
                 if (asprintf(&str, "%s%lld", print_hint ? hint : "", v)                  if (asprintf(&str, "%s%lld", print_hint ? hint : "", v) == -1)
                     == -1)  
                         goto fail;                          goto fail;
                 break;                  break;
         case BER_TYPE_BITSTRING:          case BER_TYPE_BITSTRING:

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3