Print this page
10138 smatch fixes for usr/src/cmd/sgs

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/dump/common/dump.c
          +++ new/usr/src/cmd/sgs/dump/common/dump.c
↓ open down ↓ 825 lines elided ↑ open up ↑
 826  826          sym_size = 0;
 827  827          reloc_size = 0;
 828  828  
 829  829          if ((sym_data = elf_getdata(reloc_symtab->p_sd, NULL)) == NULL) {
 830  830                  (void) fprintf(stderr,
 831  831                  "%s: %s: no symbol table data\n", prog_name, filename);
 832  832                  return;
 833  833          }
 834  834          sym_size = sym_data->d_size;
 835  835  
 836      -        if (p_scns == NULL) {
 837      -                (void) fprintf(stderr,
 838      -                "%s: %s: no section table data\n", prog_name, filename);
 839      -                return;
 840      -        }
 841      -
 842  836          if (p_scns->p_shdr.sh_type == SHT_RELA) {
 843  837                  if (!n_flag && r_flag)
 844  838                          (void) printf("\n%s:\n", p_scns->scn_name);
 845  839                  if (!p_flag && (!n_flag && r_flag))
 846  840                          (void) printf("%-*s%-*s%-*s%s\n\n",
 847  841                              12 + adj, "Offset", 22, "Symndx",
 848  842                              18, "Type", "Addend");
 849  843                  if ((rel_data = elf_getdata(p_scns->p_sd, NULL)) == NULL) {
 850  844                          (void) fprintf(stderr,
 851  845  "%s: %s: no relocation information\n", prog_name, filename);
↓ open down ↓ 1285 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX