Print this page
patch fix-lint

*** 21,35 **** /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * Copyright 2012 Joshua M. Clulow <josh@sysmgr.org> */ #include <libdisasm.h> - #include <stdlib.h> - #include <stdio.h> #include "dis_tables.h" #include "libdisasm_impl.h" typedef struct dis_handle_i386 { --- 21,34 ---- /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * Copyright 2012 Joshua M. Clulow <josh@sysmgr.org> + * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ #include <libdisasm.h> #include "dis_tables.h" #include "libdisasm_impl.h" typedef struct dis_handle_i386 {
*** 124,134 **** dhx->dhx_mode = SIZE32; if (dhp->dh_flags & DIS_OCTAL) dhx->dhx_dis.d86_flags = DIS_F_OCTAL; ! dhx->dhx_dis.d86_sprintf_func = snprintf; dhx->dhx_dis.d86_get_byte = get_byte; dhx->dhx_dis.d86_sym_lookup = do_lookup; dhx->dhx_dis.d86_check_func = check_func; dhx->dhx_dis.d86_data = dhp; --- 123,133 ---- dhx->dhx_mode = SIZE32; if (dhp->dh_flags & DIS_OCTAL) dhx->dhx_dis.d86_flags = DIS_F_OCTAL; ! dhx->dhx_dis.d86_sprintf_func = dis_snprintf; dhx->dhx_dis.d86_get_byte = get_byte; dhx->dhx_dis.d86_sym_lookup = do_lookup; dhx->dhx_dis.d86_check_func = check_func; dhx->dhx_dis.d86_data = dhp;
*** 171,182 **** dis_i386_min_instrlen(dis_handle_t *dhp) { return (1); } - #define MIN(a, b) ((a) < (b) ? (a) : (b)) - /* * Return the previous instruction. On x86, we have no choice except to * disassemble everything from the start of the symbol, and stop when we have * reached our instruction address. If we're not in the middle of a known * symbol, then we return the same address to indicate failure. --- 170,179 ----