/illumos-gate/usr/src/tools/smatch/src/ |
H A D | check_frees_param_strict.c | 33 static struct smatch_state *unmatched_state(struct sm_state *sm) in unmatched_state() argument 35 if (sm->state != &freed) in unmatched_state() 37 if (parent_is_null_var_sym(sm->name, sm->sym)) in unmatched_state() 42 static void set_ignore(struct sm_state *sm, struct expression *mod_expr) in set_ignore() argument 44 set_state(my_id, sm->name, sm->sym, &ignore); in set_ignore() 119 struct sm_state *sm; in param_freed_info() local 126 FOR_EACH_MY_SM(my_id, __get_cur_stree(), sm) { in param_freed_info() 127 if (sm->state != &freed) in param_freed_info() 130 param = get_param_num_from_sym(sm->sym); in param_freed_info() 134 param_name = get_param_name(sm); in param_freed_info() [all …]
|
H A D | smatch_stored_conditions.c | 131 expr_list = sm->state->data; in match_link_modify() 138 set_state(link_id, sm->name, sm->sym, &undefined); in match_link_modify() 260 if (!sm) in filter_by_sm() 267 add_ptr_list(true_stack, sm); in filter_by_sm() 269 add_ptr_list(false_stack, sm); in filter_by_sm() 272 if (sm->merged) { in filter_by_sm() 282 struct sm_state *sm; in stored_condition_implication_hook() local 297 if (!sm) in stored_condition_implication_hook() 299 if (!sm->merged) in stored_condition_implication_hook() 306 sm = NULL; in stored_condition_implication_hook() [all …]
|
H A D | check_debug.c | 51 struct sm_state *sm; in match_state() local 70 sm_msg("'%s' = '%s'", sm->name, sm->state->name); in match_state() 72 } END_FOR_EACH_SM(sm); in match_state() 609 if (!sm) in print_left_right() 611 if (!sm->left && !sm->right) in print_left_right() 615 if (sm->left) in print_left_right() 616 sm_printf("(%d: %s->'%s')", get_stree_id(sm->left->pool), sm->left->name, sm->left->state->name); in print_left_right() 623 if (sm->right) in print_left_right() 624 …sm_printf("(%d: %s->'%s')", get_stree_id(sm->right->pool), sm->right->name, sm->right->state->nam… in print_left_right() 641 if (!sm) { in match_print_merge_tree() [all …]
|
H A D | check_snprintf.c | 24 static void ok_to_use(struct sm_state *sm, struct expression *mod_expr) in ok_to_use() argument 26 set_state(my_id, sm->name, sm->sym, &undefined); in ok_to_use() 42 static int get_old_buflen(struct sm_state *sm) in get_old_buflen() argument 47 FOR_EACH_PTR(sm->possible, tmp) { in get_old_buflen() 57 struct sm_state *sm; in match_call() local 62 sm = get_sm_state_expr(my_id, arg); in match_call() 63 if (!sm) in match_call() 65 old_buflen = get_old_buflen(sm); in match_call() 70 sm->name, old_buflen); in match_call()
|
H A D | smatch_return_to_param.c | 48 set_state(my_id, sm->name, sm->sym, &undefined); in undef() 74 if (sm->state->data != sym) in map_my_state_long_to_short() 76 len = strlen(sm->state->name); in map_my_state_long_to_short() 77 if (strncmp(name, sm->state->name, len) != 0) in map_my_state_long_to_short() 84 snprintf(buf, sizeof(buf), "%s%s", sm->name, name + len); in map_my_state_long_to_short() 85 *new_sym = sm->sym; in map_my_state_long_to_short() 101 struct sm_state *sm; in map_long_to_short_name_sym() local 105 FOR_EACH_SM(__get_cur_stree(), sm) { in map_long_to_short_name_sym() 106 if (sm->owner == my_id) { in map_long_to_short_name_sym() 111 __func__, name, show_sm(sm)); in map_long_to_short_name_sym() [all …]
|
H A D | avl.h | 46 struct sm_state *avl_lookup(const struct stree *avl, const struct sm_state *sm); 49 #define avl_member(avl, sm) (!!avl_lookup_node(avl, sm)) argument 55 bool avl_insert(struct stree **avl, const struct sm_state *sm); 62 bool avl_remove(struct stree **avl, const struct sm_state *sm); 90 _sm = _i.sm; 97 _sm = _i.sm; \ 107 struct sm_state *sm; member 127 const struct sm_state *sm; member 133 AvlNode *avl_lookup_node(const struct stree *avl, const struct sm_state *sm);
|
H A D | check_deref_check.c | 25 static void underef(struct sm_state *sm, struct expression *mod_expr) in underef() argument 27 set_state(my_id, sm->name, sm->sym, &undefined); in underef() 68 struct sm_state *sm; in match_condition() local 82 sm = get_sm_state_expr(my_id, expr); in match_condition() 83 if (!sm || sm->state != &derefed) in match_condition() 86 sm_warning("variable dereferenced before check '%s' (see line %d)", sm->name, sm->line); in match_condition()
|
H A D | smatch_db.c | 727 if (sm) in db_return_vals() 1584 if (!sm || !sm->merged) in split_possible_helper() 1708 if (!sm) in split_positive_from_negative() 1774 if (!sm) in call_return_state_hooks_split_null_non_null_zero() 1878 if (!sm) in call_return_state_hooks_split_success_fail() 1959 if (!sm) in find_bool_param() 1981 return sm; in find_bool_param() 1993 if (!sm || !sm->merged) in split_on_bool_sm() 2035 if (!sm || estate_get_single_value(sm->state, &sval)) in split_by_bool_param() 2062 if (!sm) in split_by_null_nonnull_param() [all …]
|
H A D | check_dma_mapping_error.c | 27 static void ok_to_use(struct sm_state *sm, struct expression *mod_expr) in ok_to_use() argument 29 if (sm->state != &ok) in ok_to_use() 30 set_state(my_id, sm->name, sm->sym, &ok); in ok_to_use() 55 struct sm_state *sm; in match_return() local 58 sm = get_sm_state_expr(my_id, ret_value); in match_return() 59 if (!sm) in match_return() 61 if (!slist_has_state(sm->possible, &positive)) in match_return()
|
H A D | check_kunmap.c | 54 struct sm_state *sm; in match_kunmap_atomic() local 57 sm = get_sm_state_expr(my_id, arg); in match_kunmap_atomic() 58 if (!sm) in match_kunmap_atomic() 60 if (slist_has_state(sm->possible, &no_unmap)) in match_kunmap_atomic() 67 struct sm_state *sm; in match_kunmap() local 71 sm = get_sm_state_expr(check_assigned_expr_id, arg); in match_kunmap() 72 if (!sm) in match_kunmap() 74 FOR_EACH_PTR(sm->possible, tmp) { in match_kunmap()
|
H A D | check_missing_break.c | 109 static struct smatch_state *unmatched_state(struct sm_state *sm) in unmatched_state() argument 148 struct sm_state *sm; in delete_my_states() local 150 FOR_EACH_MY_SM(owner, __get_cur_stree(), sm) { in delete_my_states() 151 add_ptr_list(&slist, sm); in delete_my_states() 152 } END_FOR_EACH_SM(sm); in delete_my_states() 154 FOR_EACH_PTR(slist, sm) { in delete_my_states() 155 delete_state(sm->owner, sm->name, sm->sym); in delete_my_states() 156 } END_FOR_EACH_PTR(sm); in delete_my_states()
|
H A D | smatch_comparison.c | 688 if (strncmp(sm->name, tmp, strlen(sm->name)) != 0 || in match_inc() 793 set_state(link_id, sm->name, sm->sym, &undefined); in reset_sm() 1791 if (!sm) in possible_comparison() 1794 FOR_EACH_PTR(sm->possible, sm) { in possible_comparison() 1832 if (!sm) in get_all_comparisons() 1856 if (!sm) in get_all_possible_equal_comparisons() 1886 if (!sm) in get_all_possible_not_equal_comparisons() 2580 if (!sm) in impossibly_high_comparison() 2678 if (is_merged(sm) || sm->left || sm->right) in create_fake_history() 2704 if (!sm) in filter_by_sm() [all …]
|
H A D | check_uninitialized.c | 101 struct sm_state *sm; in match_negative_comparison() local 125 FOR_EACH_MY_SM(my_id, __get_cur_stree(), sm) { in match_negative_comparison() 126 if (sm->state == &initialized) in match_negative_comparison() 127 set_true_false_states(my_id, sm->name, sm->sym, NULL, &initialized); in match_negative_comparison() 128 } END_FOR_EACH_SM(sm); in match_negative_comparison() 135 struct sm_state *sm; in is_initialized() local 140 sm = get_sm_state_expr(my_id, expr); in is_initialized() 141 if (!sm) in is_initialized() 237 struct sm_state *sm; in match_call_struct_members() local 259 if (sm->sym != sym) in match_call_struct_members() [all …]
|
H A D | smatch_extra.c | 386 if (sm) in clear_array_states() 662 if (!sm) in handle_canonical_while_count_down() 709 if (!sm) in handle_canonical_for_inc() 762 if (!sm) in handle_canonical_for_dec() 840 if (!sm) in __iterator_unchanged() 842 if (get_sm_state(my_id, sm->name, sm->sym) == sm) in __iterator_unchanged() 933 if (parent_is_gone_var_sym(sm->name, sm->sym)) in unmatched_state() 935 if (get_global_rl(sm->name, sm->sym, &rl)) in unmatched_state() 2394 if (!is_kzalloc_info(sm) && !is_really_long(sm)) in filter_unused_param_value_info() 2613 if (sm) in db_param_limit_filter() [all …]
|
H A D | check_return_efault.c | 33 static void ok_to_use(struct sm_state *sm, struct expression *mod_expr) in ok_to_use() argument 35 if (sm->state != &ok) in ok_to_use() 36 set_state(my_id, sm->name, sm->sym, &ok); in ok_to_use() 64 struct sm_state *sm; in match_return_var() local 67 sm = get_sm_state_expr(my_id, ret_value); in match_return_var() 68 if (!sm) in match_return_var() 70 if (!slist_has_state(sm->possible, &remaining)) in match_return_var()
|
H A D | check_dereferences_param.c | 34 static void set_ignore(struct sm_state *sm, struct expression *mod_expr) in set_ignore() argument 36 if (sm->state == &derefed) in set_ignore() 38 set_state(my_id, sm->name, sm->sym, &ignore); in set_ignore() 58 struct sm_state *sm; in check_deref() local 71 sm = get_sm_state_expr(my_id, expr); in check_deref() 72 if (sm && slist_has_state(sm->possible, &ignore)) in check_deref()
|
H A D | smatch_strings.c | 76 struct sm_state *sm; in get_strings() local 81 sm = alloc_sm_state(my_id, expr->string->data, NULL, state); in get_strings() 82 add_ptr_list(&ret, sm); in get_strings() 103 sm = get_sm_state_expr(my_id, expr); in get_strings() 104 if (!sm) in get_strings() 107 return clone_slist(sm->possible); in get_strings() 113 struct sm_state *sm; in match_assignment() local 123 sm = first_ptr_list((struct ptr_list *)slist); in match_assignment() 124 set_state_expr(my_id, expr->left, sm->state); in match_assignment()
|
H A D | check_return_enomem.c | 31 struct sm_state *sm; in match_return() local 48 FOR_EACH_MY_SM(SMATCH_EXTRA, stree, sm) { in match_return() 49 if (!estate_get_single_value(sm->state, &sval) || sval.value != 0) in match_return() 51 expr = get_assigned_expr_name_sym(sm->name, sm->sym); in match_return() 70 } END_FOR_EACH_SM(sm); in match_return()
|
H A D | smatch_conditions.c | 245 struct sm_state *sm; in handle_select() local 341 } END_FOR_EACH_SM(sm); in handle_select() 344 } END_FOR_EACH_SM(sm); in handle_select() 557 struct sm_state *sm; in __handle_condition_assigns() local 583 } END_FOR_EACH_SM(sm); in __handle_condition_assigns() 598 } END_FOR_EACH_SM(sm); in __handle_condition_assigns() 605 __set_sm(sm); in __handle_condition_assigns() 606 } END_FOR_EACH_SM(sm); in __handle_condition_assigns() 631 struct sm_state *sm; in __handle_select_assigns() local 671 __set_sm(sm); in __handle_select_assigns() [all …]
|
H A D | check_double_checking.c | 35 static void set_modified(struct sm_state *sm, struct expression *mod_expr) in set_modified() argument 37 set_state(my_id, sm->name, sm->sym, &modified); in set_modified() 225 int get_check_line(struct sm_state *sm) in get_check_line() argument 229 FOR_EACH_PTR(sm->possible, tmp) { in get_check_line() 239 struct sm_state *check, *sm; in after_loop() local 250 sm = get_sm_state(my_id, check->name, check->sym); in after_loop() 252 if (!sm) in after_loop() 254 if (slist_has_state(sm->possible, &modified)) in after_loop() 257 sm_printf("%s:%d %s() ", get_filename(), get_check_line(sm), get_function()); in after_loop()
|
H A D | check_dev_queue_xmit.c | 31 static void ok_to_use(struct sm_state *sm, struct expression *mod_expr) in ok_to_use() argument 33 set_state(my_id, sm->name, sm->sym, &undefined); in ok_to_use() 62 struct sm_state *sm; in match_symbol() local 65 sm = get_sm_state_expr(my_id, expr); in match_symbol() 66 if (!sm || !slist_has_state(sm->possible, &do_not_use)) in match_symbol()
|
H A D | smatch_buf_comparison.c | 44 return sm->state; in unmatched_state() 64 expr = sm->state->data; in match_link_modify() 67 set_state(link_id, sm->name, sm->sym, &undefined); in match_link_modify() 76 set_state(link_id, sm->name, sm->sym, &undefined); in match_link_modify() 156 struct sm_state *sm; in match_alloc_helper() local 200 if (!sm) in match_alloc_helper() 421 struct sm_state *sm; in array_check_data_info() local 457 } END_FOR_EACH_PTR(sm); in array_check_data_info() 664 struct sm_state *sm; in munge_start_states() local 681 } END_FOR_EACH_SM(sm); in munge_start_states() [all …]
|
H A D | smatch_constraints.c | 426 if (sm->state == &merged || sm->state == &undefined) in struct_member_callback() 428 sql_insert_caller_info(call, CONSTRAINT, param, printed_name, sm->state->name); in struct_member_callback() 476 struct sm_state *sm; in print_return_implies_constrained() local 480 FOR_EACH_MY_SM(my_id, __get_cur_stree(), sm) { in print_return_implies_constrained() 481 if (sm->state == &merged || sm->state == &undefined) in print_return_implies_constrained() 484 param = get_param_num_from_sym(sm->sym); in print_return_implies_constrained() 488 orig = get_state_stree(get_start_states(), my_id, sm->name, sm->sym); in print_return_implies_constrained() 489 if (orig && strcmp(sm->state->name, orig->name) == 0) in print_return_implies_constrained() 492 param_name = get_param_name(sm); in print_return_implies_constrained() 497 param, param_name, sm->state->name); in print_return_implies_constrained() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/ |
H A D | syncloop.c | 100 struct scc_mode sm; in main() local 211 sioc.ic_dp = (char *)&sm; in main() 243 sm.sm_config |= CONN_LPBK; in main() 250 sm.sm_rxclock = RXC_IS_RXC; in main() 253 sm.sm_config &= ~CONN_LPBK; in main() 269 sm.sm_baudrate = speed; in main() 274 sioc.ic_dp = (char *)&sm; in main() 287 sioc.ic_dp = (char *)&sm; in main() 295 sm.sm_baudrate, in main() 298 txnames[sm.sm_txclock], in main() [all …]
|
/illumos-gate/usr/src/lib/libldap5/sources/ldap/common/ |
H A D | srchpref.c | 209 for ( sm = so->so_smlist; sm != NULL; sm = nextsm ) { in free_searchobj() 210 nextsm = sm->sm_next; in free_searchobj() 211 if ( sm->sm_matchprompt != NULL ) { in free_searchobj() 214 if ( sm->sm_filter != NULL ) { in free_searchobj() 215 NSLDAPI_FREE( sm->sm_filter ); in free_searchobj() 217 NSLDAPI_FREE( sm ); in free_searchobj() 251 struct ldap_searchmatch **sm; in read_next_searchobj() local 402 sm = &( so->so_smlist ); in read_next_searchobj() 416 ( *sm )->sm_filter = toks[ 1 ]; in read_next_searchobj() 418 sm = &(( *sm )->sm_next ); in read_next_searchobj() [all …]
|