functionSource
stringlengths
20
97.4k
CWE-119
bool
2 classes
CWE-120
bool
2 classes
CWE-469
bool
2 classes
CWE-476
bool
2 classes
CWE-other
bool
2 classes
combine
int64
0
1
mgmt_set_io_capability(int index, uint8_t io_capability) { char buf[MGMT_HDR_SIZE + sizeof(struct mgmt_cp_set_io_capability)]; struct mgmt_hdr *hdr = (void *) buf; struct mgmt_cp_set_io_capability *cp = (void *) &buf[sizeof(*hdr)]; DBG("hci%d io_capability 0x%02x", index, io_capability); memset(buf, 0, sizeof(bu...
false
false
false
false
false
0
tp_connection_upgrade_contacts (TpConnection *self, guint n_contacts, TpContact * const *contacts, guint n_features, const TpContactFeature *features, TpConnect...
false
false
false
false
false
0
comm_server_finalize(Comm_server *serv) { Comm_game *result; Comm_server_client *client; result = new_comm_game(serv->nrplayers); while ((client = list_pop(serv->clients)) != NULL) { list_append(result->connections,client->con); client->con = NULL; del_comm_server_client(client); } del_comm_serv...
false
false
false
false
false
0
__ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class) { struct __ecereNameSpace__ecere__com__Instance * instance = (((void *)0)); if(_class) { { int size = _class->structSize; int flags = (unsigned int)((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __...
false
false
false
false
false
0
dump_dentry(struct dentry *dentry, const char *indent) { if (!dentry) return; printf("%s%p:%p:%p:%p %s ref_count=%d\n", indent, dentry, dentry->ddent, dentry->ddent_cnode, dentry->parent, dentry->ddent->name, dentry->ref_count); dump_ctree(&dentry->chunk_tree, indent, dump_dentries); }
false
false
false
false
false
0
ArgusPrintSrcLoadLabel (char *buf) { if (Aflag) sprintf (&buf[strlen(buf)], RaSrcAppLoadOptionLabel); else sprintf (&buf[strlen(buf)], RaSrcLoadOptionLabel); }
false
false
false
false
false
0
getOpcodeForOffset(unsigned Opcode, int64_t Offset) const { const MCInstrDesc &MCID = get(Opcode); int64_t Offset2 = (MCID.TSFlags & SystemZII::Is128Bit ? Offset + 8 : Offset); if (isUInt<12>(Offset) && isUInt<12>(Offset2)) { // Get the instruction to use for unsi...
false
false
false
false
false
0
link_changed(struct net_device *ndev, u32 bitrate) { islpci_private *priv = netdev_priv(ndev); if (bitrate) { netif_carrier_on(ndev); if (priv->iw_mode == IW_MODE_INFRA) { union iwreq_data uwrq; prism54_get_wap(ndev, NULL, (struct sockaddr *) &uwrq, NULL); wireless_send_event(ndev, SIOCGIWAP, &uwrq...
false
false
false
false
false
0
neg_norm_form(Term t) { if (VARIABLE(t) || (CONSTANT(t))) return t; else if (JOIN_TERM(t) || MEET_TERM(t)) { ARG(t,0) = neg_norm_form(ARG(t,0)); ARG(t,1) = neg_norm_form(ARG(t,1)); return t; } else if (COMPLEMENT_TERM(t)) { Term s = ARG(t,0); if (ZERO_TERM(s) || ONE_TERM(s)) { z...
false
false
false
false
false
0
transition_verifier_local_var(struct verifier_local_var *varsc, struct verifier_local_var *varsn, int nb_vars) { int i, err; for (i=0;i<nb_vars;i++) { /* if the variable is unknown in the next state the * transition is valid automatically. */ if (varsn->state == UNKNOWN) goto next_iteration; /* if th...
false
false
false
false
false
0
computeObservationLikelihood( const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D &takenFrom ) { if (genericMapParams.enableObservationLikelihood) return internal_computeObservationLikelihood(obs,takenFrom); else return false; }
false
false
false
false
false
0
output_phi (struct output_block *ob, gimple phi) { unsigned i, len = gimple_phi_num_args (phi); streamer_write_record_start (ob, lto_gimple_code_to_tag (GIMPLE_PHI)); streamer_write_uhwi (ob, SSA_NAME_VERSION (PHI_RESULT (phi))); for (i = 0; i < len; i++) { stream_write_tree (ob, gimple_phi_arg_def ...
false
false
false
false
false
0
WriteChemObject(OBConversion* pConv) { int OIndex = pConv->GetOutputIndex(); OBBase* pOb = pConv->GetChemObject(); if(dynamic_cast<OBMol*> (pOb)) { //With an OBMol object, do the same as if this function wasn't defined, //i.e.access the functionality in OBMoleculeFormat //restore ou...
false
false
false
false
false
0
sis_read_ver_i(Store *store, FindSegmentsFile *fsf) { InStream *is; u32 format = 0; u64 version = 0; char seg_file_name[SEGMENT_NAME_MAX_LENGTH]; segfn_for_generation(seg_file_name, (u64)fsf->generation); is = store->open_input(store, seg_file_name); TRY format = is_read_u32(is); ...
false
false
false
false
false
0
get_column_grant(THD *thd, GRANT_INFO *grant, const char *db_name, const char *table_name, const char *field_name) { GRANT_TABLE *grant_table; GRANT_COLUMN *grant_column; ulong priv; mysql_rwlock_rdlock(&LOCK_grant); /* reload table if someone has modified any gr...
false
false
false
false
false
0
nextchar(void) { int c, c2, ch; c = hqxchar(); if (c == -1) return -1; switch (state86 & 0xff00) { case 0x0000: c2 = hqxchar(); if (c2 == -1) return -1; ch = (c << 2) | (c2 >> 4); state86 = 0x0100 | (c2 & 0x0f); break; case 0x0100: ch = ((state86 & 0x0f) << 4) | (c >> 2);...
false
false
false
false
false
0
tdb_write(TDB_CONTEXT *tdb, tdb_off off, void *buf, tdb_len len) { if (tdb_oob(tdb, off + len, 0) != 0) return -1; if (tdb->map_ptr) memcpy(off + (char *)tdb->map_ptr, buf, len); #ifdef HAVE_PWRITE else if (pwrite(tdb->fd, buf, len, off) != (ssize_t)len) { #else else if (lseek(tdb->fd, off, SEEK_SET) != off ...
false
true
false
false
false
1
equal(DOMStringImpl* r, const char* s) { int length = r->length(); const QChar* d = r->unicode(); for (int i = 0; i != length; ++i) { unsigned char c = s[i]; if (d[i] != c) return false; } return s[length] == 0; }
false
false
false
false
false
0
gx_color_frac_map(frac cv, const frac * values) { #define cp_frac_bits (frac_bits - log2_transfer_map_size) int cmi = frac2bits_floor(cv, log2_transfer_map_size); frac mv = values[cmi]; int rem, mdv; /* Interpolate between two adjacent values if needed. */ rem = cv - bits2frac(cmi, log2_transfer_ma...
false
false
false
false
false
0
neural_apply_do(NeuralApplyArgs *args, GwyContainer *data, GwyDataField *dfield, gint id) { GwyNeuralNetwork *network; NeuralNetworkData *nndata; gdouble factor, shift; GwyDataField *result; gboolean ok; gwy_app_wait_start(gwy_app_find_window_for_...
false
false
false
false
false
0
make_sure_plane_normal_has_unit_length (dxPlane *g) { dReal l = g->p[0]*g->p[0] + g->p[1]*g->p[1] + g->p[2]*g->p[2]; if (l > 0) { l = dRecipSqrt(l); g->p[0] *= l; g->p[1] *= l; g->p[2] *= l; g->p[3] *= l; } else { g->p[0] = 1; g->p[1] = 0; g->p[2] = 0; g->p[3] = 0; } }
false
false
false
false
false
0
sgtl5000_fill_defaults(struct sgtl5000_priv *sgtl5000) { int i, ret, val, index; for (i = 0; i < ARRAY_SIZE(sgtl5000_reg_defaults); i++) { val = sgtl5000_reg_defaults[i].def; index = sgtl5000_reg_defaults[i].reg; ret = regmap_write(sgtl5000->regmap, index, val); if (ret) return ret; } return 0; }
false
false
false
false
false
0
tp_account_get_storage_specific_information_finish (TpAccount *self, GAsyncResult *result, GError **error) { _tp_implement_finish_return_copy_pointer (self, tp_account_get_storage_specific_information_async, /* do not copy */); }
false
false
false
false
false
0
grhottDecode(radioInstance_t *r) { int crc; int grhott_crc; int nb_channel; int num; int i; // How many channels are transmitted? switch ((grhottData.nb_channel - 2) / 2) { /* Now set the CRC based on the detected channels CRC checksum for 12 channel output (MX20) - XMODEM CRC A801xx where x...
false
false
false
false
false
0
acct_on_sent(struct rad_req_t *req, int res) { if (!res && !req->hnd.tpd) { triton_md_register_handler(&req->serv->ctx, &req->hnd); triton_md_enable_handler(&req->hnd, MD_MODE_READ); } }
false
false
false
false
false
0
removePoint(Point* p, QList<QRect>* updateRectList) { // remove one of its attached lines. four cases are: // 1. solitary point (0 lines->0 lines) // 2. leftmost point (1 attached lines->0 attached lines) // 3. doubly attached point (2 attached lines->1 attached line) // 4. rightmost point (1 attached...
false
false
false
false
false
0
InitCAD() { char *s; struct passwd *pwd; int len; /* Try CAD_ROOT environment variable */ if (s = getenv("CAD_ROOT")) { if (!access(s, F_OK) == 0) s = CAD_DIR; } /* Default is taken from CAD_DIR definition at compile time */ else s = CAD_DIR; ...
false
false
false
false
false
0
accessible_gtk_hex_insert_text (AtkEditableText *text, const gchar *string, gint length, gint *position) { GtkHex *gtkhex; GtkWidget *widget; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); g_return_if_fail (widget != NULL); gtkhex = GTK_HEX (widget); hex_document_set_data (gtkhex->docu...
false
false
false
false
false
0
TimeToSample() { // // keep track of the actual rates in use in doubles. // double the_smpte_rate = smpte_smpte_rates[ smpte_rate ]; double the_sample_rate = smpte_sample_rates[ sample_rate ]; // // optimize a coupla similiar double divides by calculating it once. // double samples_p...
false
false
false
false
false
0
SearchMap4(struct SRFBandMap Map[], u32 Frequency, u8 *pRFBand) { int i = 0; while (i < 7 && (Frequency > Map[i].m_RF_max)) i += 1; if (i == 7) return false; *pRFBand = i; return true; }
false
false
false
false
false
0
check_service_set(struct v4l2_sliced_vbi_format *fmt, int is_pal) { int f, l; u16 set = 0; for (f = 0; f < 2; f++) { for (l = 0; l < 24; l++) { fmt->service_lines[f][l] = select_service_from_set(f, l, fmt->service_lines[f][l], is_pal); set |= fmt->service_lines[f][l]; } } return set != 0; }
false
false
false
false
false
0
add_task (Window win, int focus) { task *tk, *list; if (win == tb.win) return; /* is this window on a different desktop? */ if (tb.my_desktop != find_desktop (win) || is_hidden (win)) return; tk = calloc (1, sizeof (task)); tk->win = win; tk->focused = focus; tk->name = get_prop_data (win, XA_WM_NAME, XA...
false
false
false
false
false
0
miller_rabin(const VBigDig *n, VRandGen *gen) { int i, k; VBigDig VBIGNUM(a, BITS / 2), VBIGNUM(d, BITS), VBIGNUM(nmo, BITS / 2), VBIGNUM(x, BITS); const VBigDig *mu; mu = v_bignum_reduce_begin(n); /* Pick a "witness", a number in the [1, n) range. */ v_bignum_set_random(a, gen); v_bignum_reduce(a, n, mu); ...
false
false
false
false
false
0
writeancestor(long *chposition) { /* Writes 'ANCESTOR' line */ long i, charindex; charindex = 1; while (ancsymbol[charindex - 1] == '?') charindex++; if (charindex > lastindex) return; *chposition = 11; for (charindex = 0; charindex < (lastindex); charindex++) { if (numstates[charindex] == 0)...
false
false
false
false
false
0
menu_select_roms_with_title( const char *title, size_t start, size_t n ) { GtkWidget *dialog; GtkBox *vbox; struct callback_info info; char buffer[ 256 ]; size_t i; /* Firstly, stop emulation */ fuse_emulation_pause(); /* Give me a new dialog box */ snprintf( buffer, 256, "Fuse - Select ROMs - %s"...
true
true
false
false
false
1
vp702x_fe_send_diseqc_msg (struct dvb_frontend* fe, struct dvb_diseqc_master_cmd *m) { u8 *cmd; struct vp702x_fe_state *st = fe->demodulator_priv; struct vp702x_device_state *dst = st->d->priv; deb_fe("%s\n",__func__); if (m->msg_len > 4) return -EINVAL; mutex_lock(&dst->buf_mutex); cmd = dst->buf;...
false
true
false
false
false
1
NMECurrentListNesting(NMEContext const *context) { NMEInt i; static NMEChar str[kMaxNesting + 1]; for (i = 0; i < context->level; i++) str[i] = context->listNum[i] == kNMEListNumUL ? '*' : context->listNum[i] == kNMEListNumDT ? ';' : context->listNum[i] == kNMEListNumDD ? ':' : context->listNum[i] ==...
false
false
false
false
false
0
shaInit(j_SHA_CTX *ctx) { int i; ctx->lenW = 0; ctx->sizeHi = ctx->sizeLo = 0; /* Initialize H with the magic constants (see FIPS180 for constants) */ ctx->H[0] = 0x67452301L; ctx->H[1] = 0xefcdab89L; ctx->H[2] = 0x98badcfeL; ctx->H[3] = 0x10325476L; ctx->H[4] = 0xc3d2e1f0L; for (i = 0; i < 80; i++) ct...
false
false
false
false
false
0
WriteLatexDocument(char* name,int appendix) { FILE *in,*out; char line[256]; int seen=0; char *inc_file,*ofile,*ifile; inc_file=ConcatStrings(4,"\\input{",name,LATEX_FILE,"}\n"); ifile=ConcatStrings(4,option_odir,"/",option_name,LATEX_FILE); ofile=ConcatStrings(4,option_odir,"/",option_name,LATEX_FILE_BACKUP); ...
true
true
true
false
true
1
xmlFACompareAtoms(xmlRegAtomPtr atom1, xmlRegAtomPtr atom2) { int ret = 1; if (atom1 == atom2) return(1); if ((atom1 == NULL) || (atom2 == NULL)) return(0); if ((atom1->type == XML_REGEXP_ANYCHAR) || (atom2->type == XML_REGEXP_ANYCHAR)) return(1); if (atom1->type >...
false
false
false
false
false
0
realDiv(const IDL_Fixed& a, const IDL_Fixed& b, IDL_Boolean negative) { int i, ai, bi, wi, ri, digits, scale, unscale, v, ad, bd, carry = 0; // This division algorithm basically does classic long division. The // numerator, a, is loaded into the top digits of "running". The // divisor, b, is then repeatedly su...
false
false
false
false
false
0
cb_func_build_action(guint key_id) { GtkWidget *item; BuildMenuItems *menu_items; GeanyDocument *doc = document_get_current(); if (doc == NULL) return TRUE; if (!GTK_WIDGET_IS_SENSITIVE(ui_lookup_widget(main_widgets.window, "menu_build1"))) return TRUE; menu_items = build_get_menu_items(doc->file_type->id)...
false
false
false
false
false
0
fix_sfv_header(const char* hash_file_path) { FILE* in; FILE* out; char line[2048]; size_t len; char* tmp_file; int err = 0; if( !(in = fopen(hash_file_path, "r") )) { log_file_error(hash_file_path); return -1; } /* open another file for writing */ len = strlen(hash_file_path); tmp_file = (char*)rsh_mal...
false
false
false
false
false
0
flimage_read( FL_IMAGE * im ) { FL_IMAGE *image = im; FLIMAGE_IO *io; int error = 0; char buf[ 256 ]; if ( ! im || ! im->fpin ) return NULL; io = image->image_io; if ( ! io->read_description || ! io->read_pixels ) return NULL; /* copy some default info */ image->t...
false
false
false
false
false
0
main(void) { int i = 0; int64_t sizes[TESTS]; srand48(SEED); stable_tests(); fill_random(sizes, TESTS); for (i = 0; i < TESTS; i++) { RAND_RANGE(sizes[i], 0, MAXSIZE); } for (i = 0; i < FILL_LAST_ELEMENT; i++) { int result = run_tests(sizes, TESTS, i); if (result) { return 1; } ...
false
false
false
false
false
0
runTempService(const KService& _service, const KUrl::List& _urls, QWidget* window, bool tempFiles, const QString& suggestedFileName, const QByteArray& asn) { if (!_urls.isEmpty()) { kDebug(7010) << "runTempService: first url " << _urls.first().url(); } QStringList args; ...
false
false
false
false
false
0
clock_fast(cycle_count& delta_t, short* buf, int n, int interleave) { int s = 0; for (;;) { cycle_count next_sample_offset = sample_offset + cycles_per_sample + (1 << (FIXP_SHIFT - 1)); cycle_count delta_t_sample = next_sample_offset >> FIXP_SHIFT; if (delta_t_sample > delta_t) { ...
false
false
false
false
false
0
FindS(const char *Tag) const { const char *Start; const char *End; if (Find(Tag,Start,End) == false) return string(); return string(Start,End); }
false
false
false
false
false
0
IoList_writeToStream_(IoList *self, BStream *stream) { List *list = DATA(self); BStream_writeTaggedInt32_(stream, List_size(list)); LIST_FOREACH(list, i, v, BStream_writeTaggedInt32_(stream, IoObject_pid((IoObject *)v)); ); }
false
false
false
false
false
0
kvm_scan_ioapic_routes(struct kvm_vcpu *vcpu, ulong *ioapic_handled_vectors) { struct kvm *kvm = vcpu->kvm; struct kvm_kernel_irq_routing_entry *entry; struct kvm_irq_routing_table *table; u32 i, nr_ioapic_pins; int idx; /* kvm->irq_routing must be read after clearing * KVM_SCAN_IOAPIC. */ smp_mb(); i...
false
false
false
false
false
0
jack_rechain_graph (jack_engine_t *engine) { JSList *node, *next; unsigned long n; int err = 0; jack_client_internal_t *subgraph_client, *next_client; jack_event_t event; int upstream_is_jackd; jack_clear_fifos (engine); subgraph_client = 0; VERBOSE(engine, "++ jack_rechain_graph():"); event.type = GraphR...
false
false
false
false
false
0
post_error (const char *msg, Node_Id node) { String_Template temp; Fat_Pointer fp; temp.Low_Bound = 1, temp.High_Bound = strlen (msg); fp.Array = msg, fp.Bounds = &temp; if (Present (node)) Error_Msg_N (fp, node); }
false
false
false
false
false
0
indirect_jump_in_function_p (start) rtx start; { rtx insn; for (insn = start; insn; insn = NEXT_INSN (insn)) if (computed_jump_p (insn)) return 1; return 0; }
false
false
false
false
false
0
set_ksl_tl(FM_OPL *OPL,int slot,int v) { OPL_CH *CH = &OPL->P_CH[slot/2]; OPL_SLOT *SLOT = &CH->SLOT[slot&1]; int ksl = v>>6; /* 0 / 1.5 / 3 / 6 db/OCT */ SLOT->ksl = ksl ? 3-ksl : 31; SLOT->TL = (int)((v&0x3f)*(0.75/EG_STEP)); /* 0.75db step */ if( !(OPL->mode&0x80) ) { /* not CSM latch total level */ ...
false
false
false
false
false
0
create_alert(void) { GList *list; CpuMon *cpu; list = g_list_nth(cpu_mon_list, 0); if (!list) return; cpu = (CpuMon *) list->data; cpu_alert = gkrellm_alert_create(NULL, _("CPU"), _("Percent Usage"), TRUE, FALSE, TRUE, 100, 10, 1, 10, 0); gkrellm_alert_delay_config(cpu_alert, 1, 60 * 60, 2);...
false
false
false
false
false
0
gda_connection_finalize (GObject *object) { GdaConnection *cnc = (GdaConnection *) object; g_return_if_fail (GDA_IS_CONNECTION (cnc)); /* free memory */ g_free (cnc->priv->dsn); g_free (cnc->priv->cnc_string); g_free (cnc->priv->auth_string); g_cond_clear (& cnc->priv->unique_possible_cond); g_mutex_clear (&...
false
false
false
false
false
0
isImplicitlyVirtual(bool defaultVal) const { if (isVirtual) return true; else if (access == Private || access == Public || access == Protected) { bool safe = true; bool hasVirt = isImplicitlyVirtual_rec(nestedIn->definedType, safe); if (hasVirt) return true; e...
false
false
false
false
false
0
animate_button_frame(gpointer ptr){ Gameboard *g=(Gameboard *)ptr; GdkRectangle expose; buttonstate *states=g->b.states; int ret=0,i,pos; if(!g->first_expose)return 1; g->b.sweeper += g->b.sweeperd; /* avoid the normal expose event mechanism during the button animations. This direct method is...
false
false
false
false
false
0
caml_sys_system_command(value command) { CAMLparam1 (command); int status, retcode; char *buf; intnat len; len = caml_string_length (command); buf = caml_stat_alloc (len + 1); memmove (buf, String_val (command), len + 1); caml_enter_blocking_section (); status = system(buf); caml_leave_blocking_sec...
false
false
false
false
false
0
SetSignalRange (SignalRangeType sr) { m_sr_idx = sr; switch (sr) { case SIGNAL_RANGE_8BIT_FULL: m_luma_offset = 0; m_luma_excursion = 255; m_chroma_offset = 128; m_chroma_excursion = 255; break; case SIGNAL_RANGE_8BIT_VIDEO: m_luma_offset = 16; ...
false
false
false
false
false
0
mpg123_reset_eq(mpg123_handle *mh) { int i; mh->have_eq_settings = 0; for(i=0; i < 32; ++i) mh->equalizer[0][i] = mh->equalizer[1][i] = DOUBLE_TO_REAL(1.0); return MPG123_OK; }
false
false
false
false
false
0
rocker_event_link_change(const struct rocker *rocker, const struct rocker_tlv *info) { const struct rocker_tlv *attrs[ROCKER_TLV_EVENT_LINK_CHANGED_MAX + 1]; unsigned int port_number; bool link_up; struct rocker_port *rocker_port; rocker_tlv_parse_nested(attrs, ROCKER_TLV_EVENT_LINK_CHANGED_MAX, info); i...
false
false
false
false
false
0
ar_decompress_to_file(G3DStream *stream, ArDirEntry *dirent) { FILE *o; gchar cmd; guint32 size; guint16 srcsize, dstsize; guint8 *src, *dst; o = fopen(dirent->name, "wb"); if(o == NULL) { g_warning("failed to write to '%s'", dirent->name); return FALSE; } /* seek to file start */ g3d_stream_seek(stream...
false
false
false
false
true
1
ath9k_tasklet(unsigned long data) { struct ath_softc *sc = (struct ath_softc *)data; struct ath_hw *ah = sc->sc_ah; struct ath_common *common = ath9k_hw_common(ah); enum ath_reset_type type; unsigned long flags; u32 status; u32 rxmask; spin_lock_irqsave(&sc->intr_lock, flags); status = sc->intrstatus; sc->in...
false
false
false
false
false
0
enable_buffering() { if (!(options & VO_OWNBUFFER)) { delete buf; // Bounds rel(0, 0, size.w, size.h); buf = new BufferedRDisplay(size); setoptions(options | VO_OWNBUFFER); } }
false
false
false
false
false
0
incrDecrCommand(redisClient *c, long long incr) { long long value, oldvalue; robj *o, *new; o = lookupKeyWrite(c->db,c->argv[1]); if (o != NULL && checkType(c,o,REDIS_STRING)) return; if (getLongLongFromObjectOrReply(c,o,&value,NULL) != REDIS_OK) return; oldvalue = value; if ((incr < 0 && ...
false
false
false
false
false
0
exynos4_jpeg_set_tbl(void __iomem *regs, const unsigned char *tbl, unsigned long tab, int len) { int i; unsigned int dword; for (i = 0; i < len; i += 4) { dword = tbl[i] | (tbl[i + 1] << 8) | (tbl[i + 2] << 16) | (tbl[i + 3] << 24); writel(dword, regs + tab + i); } }
false
false
false
false
false
0
move_list_destructor(move_list_ty *mlp) { size_t j; for (j = 0; j < mlp->length; ++j) move_destructor(mlp->item + j); delete [] mlp->item; mlp->length = 0; mlp->maximum = 0; mlp->item = 0; }
false
false
false
false
false
0
dacp_share_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { DACPShare *share = DACP_SHARE (object); switch (prop_id) { case PROP_LIBRARY_NAME: g_value_set_string (value, share->priv->library_name); break; case PROP_PLAYER: g_value_set_object (value, G_OBJECT (share->pr...
false
false
false
false
false
0
foo(uint32 A) { if((A&0x2000) && !(last&0x2000)) { count++; if(count==42) { sl(); count=0; } } last=A; }
false
false
false
false
false
0
gather_stats_on_scev_database (void) { struct chrec_stats stats; if (!dump_file) return; reset_chrecs_counters (&stats); htab_traverse (scalar_evolution_info, gather_stats_on_scev_database_1, &stats); dump_chrecs_stats (dump_file, &stats); }
false
false
false
false
false
0
poppler_annot_markup_get_opacity (PopplerAnnotMarkup *poppler_annot) { AnnotMarkup *annot; g_return_val_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot), 0); annot = static_cast<AnnotMarkup *>(POPPLER_ANNOT (poppler_annot)->annot); return annot->getOpacity (); }
false
false
false
false
false
0
equinox_style_draw_slider (DRAW_ARGS, GtkOrientation orientation) { if (DETAIL ("hscale") || DETAIL ("vscale")) { EquinoxStyle *equinox_style = EQUINOX_STYLE (style); EquinoxColors *colors = &equinox_style->colors; cairo_t *cr; CHECK_ARGS SANITIZE_SIZE cr = equinox_begin_paint (window, area); WidgetPar...
false
false
false
false
false
0
errorBuildReply(ErrorState * err) { HttpReply *rep = httpReplyCreate(); const char *name = errorPageName(err->page_id); /* no LMT for error pages; error pages expire immediately */ if (strchr(name, ':')) { /* Redirection */ httpReplySetHeaders(rep, HTTP_MOVED_TEMPORARILY, NULL, "text/html", 0, -1, -1)...
false
false
false
false
false
0
getIndex( std::list< std::pair<std::string, std::string> > &listArg) { if (!addressBook) return; myServer::Callback getindex_callback; addressBook->getIndex(listArg, getindex_callback); myServer::eventloop(getindex_callback); }
false
false
false
false
false
0
aapcs_allocate_return_reg (enum machine_mode mode, const_tree type, const_tree fntype) { /* We aren't passed a decl, so we can't check that a call is local. However, it isn't clear that that would be a win anyway, since it might limit some tail-calling opportunities. */ enum arm_pcs pcs_variant; ...
false
false
false
false
false
0
SimplifyPHINode(PHINode *PN, const Query &Q) { // If all of the PHI's incoming values are the same then replace the PHI node // with the common value. Value *CommonValue = nullptr; bool HasUndefInput = false; for (Value *Incoming : PN->incoming_values()) { // If the incoming value is the phi node itself, ...
false
false
false
false
false
0
hdb_start_seq_get(krb5_context context, krb5_keytab id, krb5_kt_cursor *cursor) { krb5_error_code ret; struct hdb_cursor *c; struct hdb_data *d = id->data; const char *dbname = d->dbname; const char *mkey = d->mkey; HDB *db; if (dbname == NULL) { /* * We don't support enumerati...
false
false
false
false
false
0
init(const string& file_name) { ifstream f(file_name.c_str()); if (!f.good() || f.eof()) return false; while (f.good() && !f.eof()) { string line; char key[0x100]; char val[0x100]; getline(f, line); if (f.eof()) break; string::size_type i = line.find_first_not_of(" \t"); if (i == st...
false
false
false
false
false
0
CheckDeadLock(void) { int i; /* * Acquire exclusive lock on the entire shared lock data structures. Must * grab LWLocks in partition-number order to avoid LWLock deadlock. * * Note that the deadlock check interrupt had better not be enabled * anywhere that this process itself holds lock partition locks, ...
false
false
false
false
false
0
gfs2_rs_delete(struct gfs2_inode *ip, atomic_t *wcount) { down_write(&ip->i_rw_mutex); if (ip->i_res && ((wcount == NULL) || (atomic_read(wcount) <= 1))) { gfs2_rs_deltree(ip->i_res); BUG_ON(ip->i_res->rs_free); kmem_cache_free(gfs2_rsrv_cachep, ip->i_res); ip->i_res = NULL; } up_write(&ip->i_rw_mutex); }
false
false
false
false
false
0
__connman_ipconfig_set_broadcast(struct connman_ipconfig *ipconfig, const char *broadcast) { if (ipconfig->address == NULL) return; g_free(ipconfig->address->broadcast); ipconfig->address->broadcast = g_strdup(broadcast); }
false
false
false
false
false
0
dscrobj(Aword obj) #else static void dscrobj(obj) Aword obj; #endif { objs[obj-OBJMIN].describe = FALSE; if (objs[obj-OBJMIN].dscr1 != 0) interpret(objs[obj-OBJMIN].dscr1); else { prmsg(M_SEEOBJ1); sayarticle(obj); say(obj); prmsg(M_SEEOBJ4); if (objs[obj-OBJMIN].cont != 0) list...
false
false
false
false
false
0
strrepl (char *s, char search, char replace) { ACE_TRACE ("ACE::strrepl"); size_t replaced = 0; for (size_t i = 0; s[i] != '\0'; i++) if (s[i] == search) { s[i] = replace; ++replaced; } return replaced; }
false
false
false
false
false
0
HandleUnmapNotify(void) { int dstx, dsty; Window dumwin; /* * The July 27, 1988 ICCCM spec states that a client wishing to switch * to WithdrawnState should send a synthetic UnmapNotify with the * event field set to (pseudo-)root, in case the window is already * unmapped (which is the c...
false
false
false
false
false
0
get_jt_jump(int cmp_min, int cmp_max, qr_operator ope) { switch (ope) { case OPE_GT: /* (compare_result == 1) ? TAKEN : NOT_TAKEN */ return (cmp_min == 1 && cmp_max == 1) ? TAKEN : NOT_TAKEN; case OPE_GE: /* (compare_result != -1) ? TAKEN : NOT_TAKEN */ return (cmp_min != -1 && cmp_max != -1) ? TAKEN : ...
false
false
false
false
false
0
get_calendar_app_info(struct CalendarAppInfo *cai) { int num, r; int rec_size; unsigned char *buf; pi_buffer_t pi_buf; memset(cai, 0, sizeof(*cai)); /* Put at least one entry in there */ strcpy(cai->category.name[0], "Unfiled"); r = jp_get_app_info("CalendarDB-PDat", &buf, &rec_size); if ((...
false
false
false
false
false
0
classaccount(void) { int i,j; clscnt=0; for(i=0;i<sescnt;i++) { ses[i].cnt=ses[i].end-ses[i].start+MIN_ADD; if(ses[i].cnt<MIN_CONNECT) ses[i].cnt=MIN_CONNECT; for(j=0;j<clscnt && ses[i].cl!=cls[j].cl;j++); if(j<clscnt) cls[j].cnt+=ses[i].cnt; else if(clscnt<MAX_CLASSES) { cls[clscnt].cl=ses[i].cl;...
false
false
false
false
false
0
interactionActivated(const QModelIndex &current, const QModelIndex &previous) { Q_UNUSED(previous); Q_ASSERT(d->m_InteractionModel); Q_ASSERT(d->m_InteractionResult); if (!d->m_InteractionModel || !d->m_InteractionResult) return; const int id = d->m_InteractionModel->itemFromIndex(current)-...
false
false
false
false
false
0
noFaultXAllocColor(Display *dpy, Colormap cmap, int cmapSize, XColor *color, int *exact) { XColor *ctable, subColor; int i, bestmatch; double mindist; /* 3*2^16^2 exceeds long int precision. */ /* First try just using XAllocColor. */ if (XAllocColor(dpy, cmap, color)) { ...
false
false
false
false
true
1
ecp_mod_p521( mpi *N ) { int ret; size_t i; mpi M; t_uint Mp[P521_WIDTH + 1]; /* Worst case for the size of M is when t_uint is 16 bits: * we need to hold bits 513 to 1056, which is 34 limbs, that is * P521_WIDTH + 1. Otherwise P521_WIDTH is enough. */ if( N->n < P521_WIDTH ) ...
false
false
false
false
false
0
gee_concurrent_list_node_set_backlink (GeeConcurrentListNode* self, GeeConcurrentListNode* backlink) { GeeConcurrentListNode* _tmp0_ = NULL; GeeConcurrentListNode* _tmp1_ = NULL; g_return_if_fail (self != NULL); _tmp0_ = backlink; _tmp1_ = _gee_concurrent_list_node_ref0 (_tmp0_); gee_hazard_pointer_compare_and_ex...
false
false
false
false
false
0
netsnmp_tcp_accept(netsnmp_transport *t) { struct sockaddr *farend = NULL; netsnmp_udp_addr_pair *addr_pair = NULL; int newsock = -1; socklen_t farendlen = sizeof(netsnmp_udp_addr_pair); addr_pair = (netsnmp_udp_addr_pair *)malloc(farendlen); if (addr_pair == NULL) { /...
false
false
false
false
false
0
que_push(que_t *q, node_t *n) { if (NULL == q || n == NULL) { /* printf("Error! q = %p, node = %p\n", q, n); */ return(-1); } n->next = q->list; q->list = n; q->amount++; if (NULL == q->tail) { q->tail = q->list; } /* LOG("Added to que: %s\n", q->list->filename ); */ return(0)...
false
false
false
false
false
0
fontRowChanged(void) { static char szFontFamily[60]; GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; gchar *text; model = gtk_tree_view_get_model(GTK_TREE_VIEW(m_fontList)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(m_fontList)); if ( gtk_tree_selection_get_selected (selection, ...
false
false
false
false
false
0
build_indirect_ref (tree ptr, const char *errorstring) { tree pointer, type; if (ptr == error_mark_node) return error_mark_node; if (ptr == current_class_ptr) return current_class_ref; pointer = (TREE_CODE (TREE_TYPE (ptr)) == REFERENCE_TYPE ? ptr : decay_conversion (ptr)); type = TREE_TYPE (...
false
false
false
false
false
0
rb_mod_included_modules(mod) VALUE mod; { VALUE ary = rb_ary_new(); VALUE p; for (p = RCLASS(mod)->super; p; p = RCLASS(p)->super) { if (BUILTIN_TYPE(p) == T_ICLASS) { rb_ary_push(ary, RBASIC(p)->klass); } } return ary; }
false
false
false
false
false
0
on_font_changed (StyleEditor *se) { const gchar *font; if (se->priv->current_style == NULL) return; font = gtk_font_button_get_font_name (GTK_FONT_BUTTON (se->priv->font_picker)); if (font) { PangoFontDescription *desc = pango_font_description_from_string (font); gboolean bold; gboolean italic; gboolean ...
false
false
false
false
false
0
Swap_8bytes( int n , void *ar ) /* 8 bytes at a time */ { register int ii ; register EIGHTbytes *tb = (EIGHTbytes *)ar ; register unsigned char tt ; for( ii=0 ; ii < n ; ii++ ){ tt = tb[ii].a ; tb[ii].a = tb[ii].A ; tb[ii].A = tt ; tt = tb[ii].b ; tb[ii].b = tb[ii].B ; tb[ii].B = tt ; tt ...
false
false
false
false
false
0
syncTrackStatus( int position, Meta::TrackPtr otherTrack ) { Q_UNUSED( position ); Podcasts::PodcastEpisodePtr master = Podcasts::PodcastEpisodePtr::dynamicCast( otherTrack ); if ( master ) { this->setName( master->channel()->name() ); this->setTitle( master->channel()->tit...
false
false
false
false
false
0