Print this page
12257 resync smatch to 0.6.1-rc1-il-4


1004                 return;
1005 
1006         FOR_EACH_PTR(get_all_return_strees(), stree) {
1007                 orig = __swap_cur_stree(stree);
1008 
1009                 if (is_impossible_path())
1010                         goto swap_stree;
1011 
1012                 return_sm = get_sm_state(RETURN_ID, "return_ranges", NULL);
1013                 if (!return_sm)
1014                         goto swap_stree;
1015                 line.value = return_sm->line;
1016 
1017                 sm = get_sm_state(my_id, name, sym);
1018                 if (!sm)
1019                         goto swap_stree;
1020 
1021                 if (parent_is_gone_var_sym(sm->name, sm->sym))
1022                         goto swap_stree;
1023 
1024                 if (sm->state != &locked && sm->state != &unlocked)


1025                         goto swap_stree;
1026 
1027                 if (sm->state == &unlocked && is_EINTR(estate_rl(return_sm->state)))

1028                         goto swap_stree;
1029 
1030                 bucket = success_fail_positive(estate_rl(return_sm->state));
1031                 if (sm->state == &locked) {
1032                         add_range(&locked_lines, line, line);
1033                         locked_buckets[bucket] = true;
1034                 }
1035                 if (sm->state == &unlocked) {
1036                         add_range(&unlocked_lines, line, line);
1037                         unlocked_buckets[bucket] = true;
1038                 }
1039 swap_stree:
1040                 __swap_cur_stree(orig);
1041         } END_FOR_EACH_PTR(stree);
1042 
1043 
1044         if (!locked_lines || !unlocked_lines)
1045                 return;
1046 
1047         for (i = 0; i < NUM_BUCKETS; i++) {
1048                 if (locked_buckets[i] && unlocked_buckets[i])
1049                         goto complain;
1050         }
1051         if (locked_buckets[NEGATIVE] &&
1052             (unlocked_buckets[ZERO] || unlocked_buckets[POSITIVE]))
1053                 goto complain;
1054 
1055         if (locked_buckets[ERR_PTR])




1004                 return;
1005 
1006         FOR_EACH_PTR(get_all_return_strees(), stree) {
1007                 orig = __swap_cur_stree(stree);
1008 
1009                 if (is_impossible_path())
1010                         goto swap_stree;
1011 
1012                 return_sm = get_sm_state(RETURN_ID, "return_ranges", NULL);
1013                 if (!return_sm)
1014                         goto swap_stree;
1015                 line.value = return_sm->line;
1016 
1017                 sm = get_sm_state(my_id, name, sym);
1018                 if (!sm)
1019                         goto swap_stree;
1020 
1021                 if (parent_is_gone_var_sym(sm->name, sm->sym))
1022                         goto swap_stree;
1023 
1024                 if (sm->state != &locked &&
1025                     sm->state != &unlocked &&
1026                     sm->state != &restore)
1027                         goto swap_stree;
1028 
1029                 if ((sm->state == &unlocked || sm->state == &restore) &&
1030                     is_EINTR(estate_rl(return_sm->state)))
1031                         goto swap_stree;
1032 
1033                 bucket = success_fail_positive(estate_rl(return_sm->state));
1034                 if (sm->state == &locked) {
1035                         add_range(&locked_lines, line, line);
1036                         locked_buckets[bucket] = true;
1037                 }
1038                 if (sm->state == &unlocked || sm->state == &restore) {
1039                         add_range(&unlocked_lines, line, line);
1040                         unlocked_buckets[bucket] = true;
1041                 }
1042 swap_stree:
1043                 __swap_cur_stree(orig);
1044         } END_FOR_EACH_PTR(stree);
1045 
1046 
1047         if (!locked_lines || !unlocked_lines)
1048                 return;
1049 
1050         for (i = 0; i < NUM_BUCKETS; i++) {
1051                 if (locked_buckets[i] && unlocked_buckets[i])
1052                         goto complain;
1053         }
1054         if (locked_buckets[NEGATIVE] &&
1055             (unlocked_buckets[ZERO] || unlocked_buckets[POSITIVE]))
1056                 goto complain;
1057 
1058         if (locked_buckets[ERR_PTR])