/illumos-gate/usr/src/common/crypto/blowfish/ |
H A D | blowfish_impl.c | 361 #define ROUND(left, right, i) \ argument 362 (left) ^= P[i]; \ 363 (right) ^= F((left)); \ 364 tmp = (left); \ 365 (left) = (right); \ 379 uint32_t left, right, tmp; in blowfish_encrypt_block() local 388 left = b32[0]; in blowfish_encrypt_block() 397 left = htonl(*(uint32_t *)(void *)&block[0]); in blowfish_encrypt_block() 400 left = ((uint32_t)block[0] << 24) in blowfish_encrypt_block() 411 ROUND(left, right, 0); in blowfish_encrypt_block() [all …]
|
/illumos-gate/usr/src/tools/smatch/src/ |
H A D | check_or_vs_and.c | 42 static int inconsistent_check(struct expression *left, struct expression *right) in inconsistent_check() argument 46 if (get_value(left->left, &sval)) { in inconsistent_check() 47 if (get_value(right->left, &sval)) in inconsistent_check() 48 return expr_equiv_no_inc_dec(left->right, right->right); in inconsistent_check() 50 return expr_equiv_no_inc_dec(left->right, right->left); in inconsistent_check() 53 if (get_value(left->right, &sval)) { in inconsistent_check() 54 if (get_value(right->left, &sval)) in inconsistent_check() 55 return expr_equiv_no_inc_dec(left->left, right->right); in inconsistent_check() 57 return expr_equiv_no_inc_dec(left->left, right->left); in inconsistent_check() 66 struct expression *left, *right; in check_or() local [all …]
|
H A D | check_signed_integer_overflow_check.c | 31 struct expression *left, *right; in match_condition() local 45 left = strip_expr(expr->left); in match_condition() 48 if (left->type != EXPR_BINOP) { in match_condition() 49 left = get_assigned_expr(left); in match_condition() 50 left = strip_expr(left); in match_condition() 51 if (!left || left->type != EXPR_BINOP) in match_condition() 55 if (left->op != '+' && left->op != '*' && left->op != SPECIAL_LEFTSHIFT) in match_condition() 58 if (has_variable(left, right) == 1) { in match_condition() 59 left_name = expr_to_str(left); in match_condition() 75 if (!get_value(expr->left, &left_val)) in match_binop()
|
H A D | smatch_sval.c | 462 static sval_t sval_binop_unsigned(struct symbol *type, sval_t left, int op, sval_t right) in sval_binop_unsigned() argument 469 ret.uvalue = left.uvalue * right.uvalue; in sval_binop_unsigned() 476 ret.uvalue = left.uvalue / right.uvalue; in sval_binop_unsigned() 480 ret.uvalue = left.uvalue + right.uvalue; in sval_binop_unsigned() 483 ret.uvalue = left.uvalue - right.uvalue; in sval_binop_unsigned() 490 ret.uvalue = left.uvalue % right.uvalue; in sval_binop_unsigned() 494 ret.uvalue = left.uvalue | right.uvalue; in sval_binop_unsigned() 497 ret.uvalue = left.uvalue & right.uvalue; in sval_binop_unsigned() 500 ret.uvalue = left.uvalue >> right.uvalue; in sval_binop_unsigned() 503 ret.uvalue = left.uvalue << right.uvalue; in sval_binop_unsigned() [all …]
|
H A D | smatch_struct_assignment.c | 149 static void handle_non_struct_assignments(struct expression *left, struct expression *right) in handle_non_struct_assignments() argument 155 right = strip_parens(right->left); in handle_non_struct_assignments() 157 type = get_type(left); in handle_non_struct_assignments() 161 left = deref_expression(left); in handle_non_struct_assignments() 165 right = unknown_value_expression(left); in handle_non_struct_assignments() 166 assign = assign_expression(left, '=', right); in handle_non_struct_assignments() 175 right = unknown_value_expression(left); in handle_non_struct_assignments() 176 assign = assign_expression(left, '=', right); in handle_non_struct_assignments() 180 static void set_inner_struct_members(int mode, struct expression *faked, struct expression *left, s… in set_inner_struct_members() argument 189 left = member_expression(left, '.', member->ident); in set_inner_struct_members() [all …]
|
H A D | smatch_extra.c | 615 unop_expr = condition->left; in get_countdown_info() 716 if (get_sm_state_expr(SMATCH_EXTRA, condition->left) != sm) in handle_canonical_for_inc() 769 if (get_sm_state_expr(SMATCH_EXTRA, condition->left) != sm) in handle_canonical_for_dec() 1002 int values_fit_type(struct expression *left, struct expression *right) in values_fit_type() argument 1007 type = get_type(left); in values_fit_type() 1022 static void save_chunk_info(struct expression *left, struct expression *right) in save_chunk_info() argument 1034 if (!get_value(right->left, &sval)) in save_chunk_info() 1039 add_expr = binop_expression(left, '+', right->right); in save_chunk_info() 1055 static void do_array_assign(struct expression *left, int op, struct expression *right) in do_array_assign() argument 1061 rl = cast_rl(get_type(left), rl); in do_array_assign() [all …]
|
H A D | smatch_integer_overflow.c | 56 struct expression *left, *right, *binop; in match_divide() local 69 left = strip_parens(expr->left); in match_divide() 74 if (!get_value(right->left, &max)) in match_divide() 87 binop = binop_expression(left, '*', right->right); in match_divide() 98 struct expression *left, *right; in match_overflow_to_less_than() local 109 left = strip_parens(expr->left); in match_overflow_to_less_than() 112 if (left->op != '+') in match_overflow_to_less_than() 121 if (!expr_equiv(left->left, right) && !expr_equiv(left->right, right)) in match_overflow_to_less_than() 124 name = save_links(left, &sym, &vsl); in match_overflow_to_less_than() 127 set_true_false_states(my_id, name, sym, NULL, safe_state(left)); in match_overflow_to_less_than() [all …]
|
H A D | smatch_comparison.c | 40 static void add_comparison(struct expression *left, int comparison, struct expression *right); 70 struct expression *left, in alloc_compare_state() argument 82 data->left = left; in alloc_compare_state() 209 struct range_list *left, *right; in comparison_from_extra() local 211 if (!get_implied_rl(a, &left)) in comparison_from_extra() 216 return rl_comparison(left, right); in comparison_from_extra() 260 return alloc_compare_state(data->left, data->left_var, data->left_vsl, in unmatched_comparison() 552 extra = comparison_from_extra(data->left, data->right); in pre_merge_hook() 562 alloc_compare_state(data->left, data->left_var, data->left_vsl, in pre_merge_hook() 577 data->left, data->left_var, data->left_vsl, in merge_compare_states() [all …]
|
H A D | check_unused_ret.c | 101 struct expression *left; in match_assign_call() local 114 left = strip_expr(expr->left); in match_assign_call() 115 if (!left || left->type != EXPR_SYMBOL) in match_assign_call() 117 if (left->symbol->ctype.modifiers & (MOD_TOPLEVEL | MOD_EXTERN | MOD_STATIC)) in match_assign_call() 120 skip_this = left; in match_assign_call() 122 set_state_expr(my_id, left, alloc_state_num(assign_id)); in match_assign_call() 126 assign->name = expr_to_var(left); in match_assign_call() 134 struct expression *left; in match_assign() local 138 left = strip_expr(expr->left); in match_assign() 139 if (!left || left->type != EXPR_SYMBOL) in match_assign() [all …]
|
H A D | smatch_impossible.c | 33 static void handle_compare(struct expression *left, int op, struct expression *right) in handle_compare() argument 38 left = strip_expr(left); in handle_compare() 39 while (left && left->type == EXPR_ASSIGNMENT) in handle_compare() 40 left = strip_expr(left->left); in handle_compare() 42 if (!possibly_true(left, op, right)) in handle_compare() 44 if (!possibly_false(left, op, right)) in handle_compare() 65 handle_compare(expr->left, expr->op, expr->right); in match_condition()
|
H A D | check_shift_to_zero.c | 33 type = get_type(expr->left); in match_binop() 45 struct expression *left; in match_binop2() local 52 left = strip_expr(expr->left); in match_binop2() 53 tmp = get_assigned_expr(left); in match_binop2() 55 left = tmp; in match_binop2() 56 if (left->type != EXPR_BINOP || left->op != '&') in match_binop2() 61 if (!get_value(left->right, &mask)) in match_binop2() 80 type = get_type(expr->left); in match_assign()
|
H A D | smatch_bits.c | 202 static struct bit_info *binfo_AND(struct bit_info *left, struct bit_info *right) in binfo_AND() argument 207 if (!left && !right) { in binfo_AND() 209 } else if (!left) { in binfo_AND() 212 possible = left->possible; in binfo_AND() 214 set = left->set & right->set; in binfo_AND() 215 possible = left->possible & right->possible; in binfo_AND() 221 static struct bit_info *binfo_OR(struct bit_info *left, struct bit_info *right) in binfo_OR() argument 226 if (!left && !right) { in binfo_OR() 228 } else if (!left) { in binfo_OR() 231 set = left->set; in binfo_OR() [all …]
|
H A D | smatch_constraints_required.c | 99 struct expression *left, *right; in handle_zero_size_arrays() local 124 left = strip_expr(size->left); in handle_zero_size_arrays() 127 if (!get_implied_value(left, &struct_size)) in handle_zero_size_arrays() 136 mult_left = strip_expr(right->left); in handle_zero_size_arrays() 193 mult_left = strip_expr(size->left); in match_alloc_helper() 209 save_constraint_required(pointer, SPECIAL_LTE, size->left); in match_alloc_helper() 222 match_alloc_helper(expr->left, arg, 1); in match_alloc() 232 pointer = strip_expr(expr->left); in match_calloc() 270 limit = get_constraint_str(expr->left); in match_assign_size() 295 match_alloc_helper(expr->left, size, 1); in match_assign_has_buf_comparison() [all …]
|
H A D | expand.c | 204 struct expression *left = expr->left, *right = expr->right; in simplify_int_binop() local 216 if (left->type != EXPR_VALUE) in simplify_int_binop() 218 l = left->value; r = right->value; in simplify_int_binop() 306 expr->taint = left->taint | right->taint; in simplify_int_binop() 320 struct expression *left = expr->left, *right = expr->right; in simplify_cmp_binop() local 324 if (left->type != EXPR_VALUE || right->type != EXPR_VALUE) in simplify_cmp_binop() 326 l = left->value; r = right->value; in simplify_cmp_binop() 346 expr->taint = left->taint | right->taint; in simplify_cmp_binop() 352 struct expression *left = expr->left, *right = expr->right; in simplify_float_binop() local 356 if (left->type != EXPR_FVALUE || right->type != EXPR_FVALUE) in simplify_float_binop() [all …]
|
H A D | check_precedence.c | 64 if (expr->left->type == EXPR_COMPARE || expr->right->type == EXPR_COMPARE) in match_condition() 66 if (expr->left->type == EXPR_PREOP && expr->left->op == '!') { in match_condition() 67 if (expr->left->unop->type == EXPR_PREOP && expr->left->unop->op == '!') in match_condition() 73 if (is_bool(expr->left->unop)) in match_condition() 75 if (is_bool_from_context(expr->left->unop)) in match_condition() 82 if (expr->left->type == EXPR_COMPARE || expr->right->type == EXPR_COMPARE) in match_condition() 94 if (is_bool_op(expr->left)) in match_condition() 107 if (expr->left->op == '!') in match_binop()
|
H A D | smatch_ranges.c | 1128 int true_comparison_range(struct data_range *left, int comparison, struct data_range *right) in true_comparison_range() argument 1133 if (sval_cmp(left->min, right->max) < 0) in true_comparison_range() 1138 if (sval_cmp(left->min, right->max) <= 0) in true_comparison_range() 1142 if (sval_cmp(left->max, right->min) < 0) in true_comparison_range() 1144 if (sval_cmp(left->min, right->max) > 0) in true_comparison_range() 1149 if (sval_cmp(left->max, right->min) >= 0) in true_comparison_range() 1154 if (sval_cmp(left->max, right->min) > 0) in true_comparison_range() 1158 if (sval_cmp(left->min, left->max) != 0) in true_comparison_range() 1162 if (sval_cmp(left->min, right->min) != 0) in true_comparison_range() 1172 … true_comparison_range_LR(int comparison, struct data_range *var, struct data_range *val, int left) in true_comparison_range_LR() argument [all …]
|
H A D | smatch_conditions.c | 81 if (expr_is_zero(expr->left)) { in handle_zero_comparisons() 82 zero = strip_expr(expr->left); in handle_zero_comparisons() 84 __split_expr(expr->left); in handle_zero_comparisons() 87 zero = strip_expr(expr->left); in handle_zero_comparisons() 90 tmp = expr->left; in handle_zero_comparisons() 190 split_conditions(expr->left); in handle_logical() 359 __split_expr(expr->left); in handle_comma() 423 expr_set_parent_expr(expr->left, expr); in split_conditions() 431 expr_set_parent_expr(expr->left, expr); in split_conditions() 437 expr_set_parent_expr(expr->left, expr); in split_conditions() [all …]
|
H A D | check_testing_index_after_use.c | 70 int left; in match_condition() local 80 if (get_implied_value(expr->left, &sval)) in match_condition() 81 left = 1; in match_condition() 83 left = 0; in match_condition() 87 if (left) in match_condition() 90 slist = get_possible_states_expr(my_used_id, expr->left); in match_condition() 101 name = expr_to_var(left ? expr->right : expr->left); in match_condition()
|
H A D | smatch_kernel_user_data.c | 129 if (expr->op == '-' && get_user_rl(expr->left, &left_rl)) { in binop_capped() 130 if (user_rl_capped(expr->left)) in binop_capped() 132 comparison = get_comparison(expr->left, expr->right); in binop_capped() 139 if (is_capped(expr->left) || is_capped(expr->right)) in binop_capped() 141 if (user_rl_capped(expr->left) || user_rl_capped(expr->right)) in binop_capped() 146 if (user_rl_capped(expr->left) && in binop_capped() 380 return is_skb_data(expr->left); in is_skb_data() 461 if (points_to_user_data(expr->left)) in points_to_user_data() 511 expr = strip_expr(expr->left); in comes_from_skb_data() 521 left_type = get_type(expr->left); in handle_struct_assignment() [all …]
|
/illumos-gate/usr/src/cmd/cron/ |
H A D | elm.c | 94 struct notice *left; member 111 struct key *left; member 153 n->left = NULL; in el_init() 160 k->left = NULL; in el_init() 173 n->left = nprev; in el_init() 180 k->left = kprev; in el_init() 195 n->left = nprev; in el_init() 203 k->left = kprev; in el_init() 256 k = (ind->key)->left; in el_add() 257 while (k->time > time) k = k->left; in el_add() [all …]
|
/illumos-gate/usr/src/lib/libdevinfo/ |
H A D | devinfo_realpath.c | 86 char left[PATH_MAX], next_token[PATH_MAX], symlink[PATH_MAX]; in s_realpath() local 96 left_len = strlcpy(left, path + 1, sizeof (left)); in s_realpath() 103 left_len = strlcpy(left, path, sizeof (left)); in s_realpath() 105 if (left_len >= sizeof (left) || resolved_len >= PATH_MAX) { in s_realpath() 118 p = strchr(left, '/'); in s_realpath() 119 s = p ? p : left + left_len; in s_realpath() 120 if (s - left >= sizeof (next_token)) { in s_realpath() 124 (void) memcpy(next_token, left, s - left); in s_realpath() 125 next_token[s - left] = '\0'; in s_realpath() 126 left_len -= s - left; in s_realpath() [all …]
|
/illumos-gate/usr/src/lib/libresolv2/common/isc/ |
H A D | tree.c | 112 RET(tree_srch(&(**ppr_tree).left, in tree_srch() 156 if (!tree_trav(&(**ppr_tree).left, pfi_uar)) in tree_trav() 169 tree_mung(&(**ppr_tree).left, pfv_uar); in tree_mung() 195 (*ppr)->left = NULL; in sprout() 212 sub = sprout(&(*ppr)->left, p_data, pi_balance, in sprout() 231 p1 = (*ppr)->left; in sprout() 234 (*ppr)->left = p1->right; in sprout() 242 p1->right = p2->left; in sprout() 243 p2->left = p1; in sprout() 245 (*ppr)->left = p2->right; in sprout() [all …]
|
/illumos-gate/usr/src/cmd/isns/isnsd/ |
H A D | sched.c | 94 fk->left->right = fk->right; in il_shift() 95 fk->right->left = fk->left; in il_shift() 123 fk->left = k->left; in il_shift() 125 k->left->right = fk; in il_shift() 126 k->left = fk; in il_shift() 204 k->left = NULL; in el_init() 237 k->left = kleft; in el_init() 266 k->left = kleft; in el_init() 357 k = (il[i])->left; in el_add() 359 k = k->left; in el_add() [all …]
|
/illumos-gate/usr/src/psm/stand/boot/common/ |
H A D | heap_kmem.c | 93 Freehdr left; /* Left tree pointer */ member 226 tree = &x->left; in insert() 242 left_hook = &newhdr->left; in insert() 245 newhdr->left = NIL; in insert() 273 right_hook = &x->left; in insert() 274 x = x->left; in insert() 306 left_branch = x->left; in delete() 326 p = &right_branch->left; in delete() 327 right_branch = right_branch->left; in delete() 370 left_branch = x->left; in demote() [all …]
|
/illumos-gate/usr/src/lib/libeti/menu/common/ |
H A D | link.c | 42 int left, up; in link_col_major() local 71 left = n + r; in link_col_major() 72 if (left >= Nitems(m)) { in link_col_major() 73 left -= Rows(m); in link_col_major() 75 Left(IthItem(m, n)) = IthItem(m, left); in link_col_major() 76 Right(IthItem(m, left)) = IthItem(m, n); in link_col_major() 99 int left, up; in link_row_major() local 135 left = n + Cols(m) - 1; in link_row_major() 136 if (left >= Nitems(m)) { in link_row_major() 137 left = Nitems(m) - 1; in link_row_major() [all …]
|