Home
last modified time | relevance | path

Searched refs:limit_type (Results 1 – 6 of 6) sorted by relevance

/illumos-gate/usr/src/tools/smatch/src/
H A Dsmatch_buf_comparison.c102 const char *limit_type_str(unsigned int limit_type) in limit_type_str() argument
104 if (limit_type - BYTE_COUNT >= ARRAY_SIZE(limit_map)) { in limit_type_str()
105 sm_msg("internal: wrong size type %u", limit_type); in limit_type_str()
109 return limit_map[limit_type - BYTE_COUNT]; in limit_type_str()
112 static struct smatch_state *alloc_compare_size(int limit_type, struct expression *expr) in alloc_compare_size() argument
121 snprintf(buf, sizeof(buf), "%s %s", limit_type_str(limit_type), name); in alloc_compare_size()
157 int limit_type = ELEM_COUNT; in match_alloc_helper() local
195 limit_type = ELEM_LAST; in match_alloc_helper()
198 db_save_type_links(pointer, limit_type, size); in match_alloc_helper()
199 sm = set_state_expr(size_id, pointer, alloc_compare_size(limit_type, size)); in match_alloc_helper()
[all …]
H A Dcheck_buffer_too_small_for_struct.c29 int limit_type; in match_assign() local
52 size_expr = get_size_variable(expr->right, &limit_type); in match_assign()
55 if (limit_type != ELEM_COUNT) in match_assign()
73 int limit_type; in match_dereferences() local
91 size_expr = get_size_variable(right, &limit_type); in match_dereferences()
94 if (limit_type != ELEM_COUNT) in match_dereferences()
H A Dcheck_off_by_one_relative.c36 int limit_type; in array_check() local
43 size = get_size_variable(array, &limit_type); in array_check()
44 if (!size || limit_type != ELEM_COUNT) in array_check()
H A Dsmatch_constraints_required.c284 int limit_type; in match_assign_has_buf_comparison() local
290 size = get_size_variable(expr->right, &limit_type); in match_assign_has_buf_comparison()
293 if (limit_type != ELEM_COUNT) in match_assign_has_buf_comparison()
H A Dcheck_debug.c392 int limit_type; in match_buf_size() local
401 comp = get_size_variable(arg, &limit_type); in match_buf_size()
412 snprintf(buf + n, sizeof(buf) - n, "[size_var=%s %s]", limit_type_str(limit_type), name); in match_buf_size()
H A Dsmatch.h1234 const char *limit_type_str(unsigned int limit_type);
1235 struct expression *get_size_variable(struct expression *buf, int *limit_type);