protected bool FileMatchesAssemblyName ( AssemblyNameExtension assemblyName, .... ResolutionSearchLocation searchLocation ) { searchLocation.FileNameAttempted = // <= pathToCandidateAssembly; .... if (String.Compare(assemblyName.Name, ....) != 0) // <= { .... } .... if (searchLocation != null) { .... } .... bool isSimpleAssemblyName = assemblyName == null ? false : assemblyName.IsSimpleName; .... searchLocation.Reason = // <= NoMatchReason.ProcessorArchitectureDoesNotMatch; .... if (searchLocation != null) { .... } .... }
internal static void Throw(string messageResourceName, string invalidSwitch, Exception e, bool showStackTrace) { .... if (showStackTrace) { errorMessage += Environment.NewLine + e.ToString(); // <= } else { errorMessage = ResourceUtilities.FormatString(errorMessage, ((e == null) ? String.Empty : e.Message)); } .... }
var memberInitExpression = (MemberInitExpression)obj; .... for (var i = 0; i < memberInitExpression.Bindings.Count; i++) { var memberBinding = memberInitExpression.Bindings[i]; .... switch (memberBinding.BindingType) { case .... case MemberBindingType.ListBinding: var memberListBinding = (MemberListBinding)memberBinding; for(var j=0; i < memberListBinding.Initializers.Count; // <= i++) // <= { hashCode += (hashCode * 397) ^ GetHashCode(memberListBinding.Initializers[j].Arguments); } break; .... } }
for (var i = 0; i < result.Count; i++) { var expectedElement = expected .Single(e => e.Name == result[i].Name); var expectedInnerNames = expectedElement .OneToMany_Optional.Select(e => e.Name) .ToList(); for (var j = 0; j < expectedInnerNames.Count; j++) // <= { Assert.True ( result[i] .OneToMany_Optional.Select(e => e.Name) .Contains(expectedInnerNames[i]) // <= ); } }
const char * GetDebugCodeName(DWORD dwCode) { if (dwCode < 1 || dwCode > 9) { return "!Invalid Debug Event Code!"; } static const char * const szNames[] = { "(1) EXCEPTION_DEBUG_EVENT", "(2) CREATE_THREAD_DEBUG_EVENT", .... "(8) OUTPUT_DEBUG_STRING_EVENT" // <= "(9) RIP_EVENT", }; return szNames[dwCode - 1]; }
static int mps_alloc_requests(struct mps_softc *sc) { .... else { panic("failed to allocate command %d\n", i); sc->num_reqs = i; break; } .... }
void efx_mcdi_ev_death( __in efx_nic_t *enp, __in int rc) { .... efx_mcdi_raise_exception(enp, emrp, rc); if (emrp != NULL && ev_cpl) emtp->emt_ev_cpl(emtp->emt_context); }
struct sctp_vrf * sctp_allocate_vrf(int vrf_id) { .... if (vrf->vrf_addr_hash == NULL) { /* No memory */ #ifdef INVARIANTS panic("No memory for VRF:%d", vrf_id); #endif SCTP_FREE(vrf, SCTP_M_VRF); return (NULL); } .... }
HAL_BOOL ar9300_reset_tx_queue(struct ath_hal *ah, u_int q) { u_int32_t cw_min, chan_cw_min, value; .... value = (ahp->ah_beaconInterval * 50 / 100) - ah->ah_config.ah_additional_swba_backoff - ah->ah_config.ah_sw_beacon_response_time + ah->ah_config.ah_dma_beacon_response_time; if (value < 10) value = 10; if (value < 0) value = 10; .... }
#define MBO_TYPE_DEFINED 0x00000080 static int ugidfw_rule_valid(struct mac_bsdextended_rule *rule) { .... if ((rule->mbr_object.mbo_neg | MBO_TYPE_DEFINED) && // <= (rule->mbr_object.mbo_type | MBO_ALL_TYPE) != MBO_ALL_TYPE) return (EINVAL); if ((rule->mbr_mode | MBI_ALLPERM) != MBI_ALLPERM) return (EINVAL); return (0); }
static int em_if_msix_intr_assign(if_ctx_t ctx, int msix) { .... if (adapter->hw.mac.type < igb_mac_min) { tx_que->eims = 1 << (22 + i); adapter->ims |= tx_que->eims; adapter->ivars |= (8 | tx_que->msix) << (8 + (i * 4)); } if (adapter->hw.mac.type == e1000_82575) // <= tx_que->eims = E1000_EICR_TX_QUEUE0 << (i % adapter->tx_num_queues); else tx_que->eims = 1 << (i % adapter->tx_num_queues); .... }
void MDInfo::DisplayFields(mdTypeDef inTypeDef, COR_FIELD_OFFSET *rFieldOffset, ULONG cFieldOffset) { .... for (ULONG i = 0; i < count; i++, totalCount++) { .... for (ULONG iLayout = 0; i < cFieldOffset; ++iLayout) // <= { if (RidFromToken(rFieldOffset[iLayout].ridOfField) == RidFromToken(fields[i])) { .... } } } .... }
Source: https://habr.com/ru/post/324802/
All Articles