Print this page
6067 libdisasm: use C99 designated initializers for arch ops

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libdisasm/common/dis_sparc.c
          +++ new/usr/src/lib/libdisasm/common/dis_sparc.c
↓ open down ↓ 340 lines elided ↑ open up ↑
 341  341          int archflags = flags & DIS_ARCH_MASK;
 342  342  
 343  343          if (archflags == DIS_SPARC_V8 ||
 344  344              (archflags & (DIS_SPARC_V9 | DIS_SPARC_V8)) == DIS_SPARC_V9)
 345  345                  return (1);
 346  346  
 347  347          return (0);
 348  348  }
 349  349  
 350  350  const dis_arch_t dis_arch_sparc = {
 351      -        dis_sparc_supports_flags,
 352      -        dis_sparc_handle_attach,
 353      -        dis_sparc_handle_detach,
 354      -        dis_sparc_disassemble,
 355      -        dis_sparc_previnstr,
 356      -        dis_sparc_min_instrlen,
 357      -        dis_sparc_max_instrlen,
 358      -        dis_sparc_instrlen
      351 +        .da_supports_flags      = dis_sparc_supports_flags,
      352 +        .da_handle_attach       = dis_sparc_handle_attach,
      353 +        .da_handle_detach       = dis_sparc_handle_detach,
      354 +        .da_disassemble         = dis_sparc_disassemble,
      355 +        .da_previnstr           = dis_sparc_previnstr,
      356 +        .da_min_instrlen        = dis_sparc_min_instrlen,
      357 +        .da_max_instrlen        = dis_sparc_max_instrlen,
      358 +        .da_instrlen            = dis_sparc_instrlen
 359  359  };
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX