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
gsql_session_set_active (GSQLSession *session) { GSQL_TRACE_FUNC; g_return_if_fail (GSQL_SESSION (session) != NULL); active_session = session; }
false
false
false
false
false
0
thermal_hwmon_lookup_by_type(const struct thermal_zone_device *tz) { struct thermal_hwmon_device *hwmon; mutex_lock(&thermal_hwmon_list_lock); list_for_each_entry(hwmon, &thermal_hwmon_list, node) if (!strcmp(hwmon->type, tz->type)) { mutex_unlock(&thermal_hwmon_list_lock); return hwmon; } mutex_unlock(&...
false
false
false
false
false
0
ptql_args_branch_init(ptql_parse_branch_t *parsed, ptql_branch_t *branch, sigar_ptql_error_t *error) { if (strEQ(parsed->attr, "*")) { branch->op_flags |= PTQL_OP_FLAG_GLOB; } else { char *end; SIGAR_CLEAR_ERRNO(); ...
false
false
false
false
false
0
init_style() { // insure use of CHARMM pair_style if any weight factors are non-zero // set local ptrs to LJ 14 arrays setup by Pair if (weightflag) { int itmp; if (force->pair == NULL) error->all(FLERR,"Dihedral charmm is incompatible with Pair style"); lj14_1 = (double **) force->pair->extrac...
false
false
false
true
false
1
SetEntriesDominators() { // This array is used for maintaining reverse postorder of nodes. ScopedVector<HeapEntry*> ordered_entries(snapshot_->entries()->length()); FillReversePostorderIndexes(&ordered_entries); ScopedVector<HeapEntry*> dominators(ordered_entries.length()); if (!BuildDominatorTree(ordered_ent...
false
false
false
false
false
0
_dxf_ExPrintProgram(Program *p) { int i; gfunc *gf; static char *reqnames[] = {"NOT_SET", "NOT_REQUIRED", "REQUIRED", "ALREADY_RUN", "REQD_IFNOT_CACHED", "RUNNING"}; printf("%d Functions:\n", SIZE_LIST(p->funcs)); for (i = 0; i < SIZE_LIST(p->funcs); ++i) { gf = FETCH_LIST(p->funcs,...
false
false
false
false
false
0
destroy_permissions(struct permissionlist *permlist) { struct permission *perm; while ((perm = AST_LIST_REMOVE_HEAD(permlist, list))) ast_free(perm); }
false
false
false
false
false
0
gegl_operation_sink_process (GeglOperation *operation, GeglOperationContext *context, const gchar *output_prop, const GeglRectangle *result, gint level) { GeglOperation...
false
false
false
false
false
0
r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc) { u64 size_bf, size_af; if (mc->mc_vram_size > 0xE0000000) { /* leave room for at least 512M GTT */ dev_warn(rdev->dev, "limiting VRAM\n"); mc->real_vram_size = 0xE0000000; mc->mc_vram_size = 0xE0000000; } if (rdev->flags & RADEON_IS_...
false
false
false
false
false
0
remove_odd_key(void *key, size_t keybits, void *uv, void *uu) { uint8 *p = key; g_assert(keybits == 32); (void) uv; (void) uu; return (p[3] & 0x1) ? TRUE : FALSE; }
true
true
false
false
false
1
TCSP_MakeIdentity2_Internal(TCS_CONTEXT_HANDLE hContext, /* in */ TCPA_ENCAUTH identityAuth, /* in */ TCPA_CHOSENID_HASH IDLabel_PrivCAHash, /* in */ UINT32 idKeyInfoSize, /* in */ BYTE * idKeyInfo, /* in */ TPM_AUTH * pSrkAuth, /* in, out */ TPM_AUTH * pOwnerAuth, ...
false
false
false
false
false
0
basic_expand( BitStream *inStream, unsigned char *outPtr) { unsigned short newCode; unsigned short oldCode; unsigned char character; unsigned int count; long outByteLen = 0; initialize_storage(); for ( ; ; ) { initialize_dictionary(); oldCode = inStream->input_bits( current_code_bits ); if ( oldCode ==...
false
false
false
false
false
0
Response_deletemarkedmatches(resprec *r) { machrec *mr, *mr_next; int tot = 0; mr = r->matches; while(mr != NULL) { mr_next = mr->next; if(mr->flags & MACHREC_DELETEME) { Response_deletematch(r,mr); tot++; } mr = mr_next; } return tot; }
false
false
false
false
false
0
geany_entry_action_create_tool_item(GtkAction *action) { GtkWidget *toolitem; GeanyEntryActionPrivate *priv = GEANY_ENTRY_ACTION_GET_PRIVATE(action); priv->entry = gtk_entry_new(); if (priv->numeric) gtk_entry_set_width_chars(GTK_ENTRY(priv->entry), 9); ui_entry_add_clear_icon(GTK_ENTRY(priv->entry)); ui_entr...
false
false
false
false
false
0
xmlRelaxNGDefaultTypeCompare(void *data ATTRIBUTE_UNUSED, const xmlChar * type, const xmlChar * value1, xmlNodePtr ctxt1 ATTRIBUTE_UNUSED, void *comp1 ATTRIBUTE_UNUSED, const ...
false
false
false
false
false
0
tasteFall(){ mBlop[0].execEvent(event_keyfall); mBlop[1].execEvent(event_keyfall); if (steuerbar()) { mSchnell = !mSchnell; } }
false
false
false
false
false
0
parse(const std::string& line) { void* parser; size_t offset = 0; CTreeNode::ptr_set_t temp_set; std::list<CParserNode*> nodes; SState state = {offset: 0, syntax_error: 0, root: NULL, vpool: &m_variables_pool, temp_set: &temp_set}; m_state = EPS_UNDEFINED; if (line.empty()) { m_...
false
false
false
false
false
0
num_slots() const { // Disconnected slots may still be in the list of slots if // a) this is called while slots are being invoked (call_depth > 0) // b) an exception was thrown in remove_disconnected_slots std::size_t count = 0; for (iterator i = slots_.begin(); i != sl...
false
false
false
false
false
0
getJSEventListener(JSValue *val, bool html) { // This function is so hot that it's worth coding it directly with imps. KHTMLPart *part = qobject_cast<KHTMLPart*>(m_frame->m_part); if (!part || val->type() != ObjectType) return 0; // It's ObjectType, so it must be valid. JSObject *listenerObject = val->ge...
false
false
false
false
false
0
rest_of_handle_final (tree decl, rtx insns) { timevar_push (TV_FINAL); { rtx x; const char *fnname; /* Get the function's name, as described by its RTL. This may be different from the DECL_NAME name used in the source file. */ x = DECL_RTL (decl); if (GET_CODE (x) != MEM) abort ...
false
false
false
false
false
0
client3_1_finodelk (call_frame_t *frame, xlator_t *this, void *data) { clnt_args_t *args = NULL; gfs3_finodelk_req req = {{0,},}; int32_t gf_cmd = 0; int32_t gf_type = 0; int64_t remote_fd = -1; clnt_...
false
true
false
true
false
1
do_request_to_session (SoupSession *session, const char *uri, const char *comment, gboolean expect_timeout) { SoupRequest *req; SoupMessage *msg; GInputStream *stream; GError *error = NULL; gboolean finished = FALSE; debug_printf (1, " req %s\n", comment); req = soup_session_request (session, uri, N...
false
false
false
false
false
0
save_CompressedTexImage3DARB(GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data) { GET_CURRENT_CONTEXT(ctx); if (target == GL_PR...
false
false
false
false
false
0
replace_out_block_in_code (MonoBasicBlock *bb, MonoBasicBlock *orig, MonoBasicBlock *repl) { MonoInst *ins; #if defined(__native_client_codegen__) /* Need to maintain this flag for the new block because */ /* we can't jump indirectly to a non-aligned block. */ if (orig->flags & BB_INDIRECT_JUMP_TARGET) { re...
false
false
false
false
false
0
equalsNonOriented(const QuadEdge &qe) const { if (equalsOriented(qe)) return true; if (equalsOriented(qe.sym())) return true; return false; }
false
false
false
false
false
0
jme_check_link(struct net_device *netdev, int testonly) { struct jme_adapter *jme = netdev->priv; u32 phylink, ghc, cnt = JME_SPDRSV_TIMEOUT, gpreg1; int rc = 0; phylink = jread32(jme, JME_PHY_LINK); if (phylink & PHY_LINK_UP) { /* * Keep polling for speed/duplex resolve complete */ while (!(phylink & ...
false
false
false
false
false
0
tds_send_login_ack(TDSSOCKET * tds, const char *progname) { tds_put_byte(tds, TDS_LOGINACK_TOKEN); tds_put_smallint(tds, 10 + (IS_TDS7_PLUS(tds)? 2 : 1) * strlen(progname)); /* length of message */ if (IS_TDS50(tds)) { tds_put_byte(tds, 5); tds_put_byte(tds, 5); tds_put_byte(tds, 0); } else { tds_put_byte(t...
false
false
false
false
false
0
create_terminal_mappings(struct kui_manager *kuim, struct kuictx *i) { struct kui_map_set *terminal_map; /* Create the terminal kui map */ terminal_map = kui_term_get_terminal_mappings(); if (!terminal_map) return -1; kuim->terminal_key_set = terminal_map; if (kui_add_map_set(i, term...
false
false
false
false
false
0
qspi_write_msg(struct ti_qspi *qspi, struct spi_transfer *t, int count) { int wlen, xfer_len; unsigned int cmd; const u8 *txbuf; u32 data; txbuf = t->tx_buf; cmd = qspi->cmd | QSPI_WR_SNGL; wlen = t->bits_per_word >> 3; /* in bytes */ xfer_len = wlen; while (count) { if (qspi_is_busy(qspi)) return ...
false
false
false
false
false
0
canvas_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data) { tb_profile_t * tb_profile = data; AmitkCanvasPoint canvas_cpoint; GnomeCanvas * canvas; gdouble x_point; gboolean find_new_initial = FALSE; AmitkLineProfileDataElement * element; gboolean initialized; gdouble peak_x=0.0; gdouble pe...
false
false
false
false
false
0
bsched_timer(void) { tm_t tv; GSList *l; int out_used = 0; int in_used = 0; bool read_data = FALSE; tm_now(&tv); /* * First pass: compute bandwidth used. */ for (l = bws_list; l; l = g_slist_next(l)) { bsched_bws_t bws = GPOINTER_TO_UINT(l->data); bsched_heartbeat(bsched_get(bws), &tv); } /* * S...
false
false
false
false
false
0
snd_hdac_stream_reset(struct hdac_stream *azx_dev) { unsigned char val; int timeout; snd_hdac_stream_clear(azx_dev); snd_hdac_stream_updateb(azx_dev, SD_CTL, 0, SD_CTL_STREAM_RESET); udelay(3); timeout = 300; do { val = snd_hdac_stream_readb(azx_dev, SD_CTL) & SD_CTL_STREAM_RESET; if (val) break; } ...
false
false
false
false
false
0
crc_accept(options_t *o, char* accept_string, unsigned type) { file_mask_array** ptr = (type ? &o->crc_accept : &o->files_accept); if(!*ptr) *ptr = file_mask_new(); file_mask_add_list(*ptr, accept_string); }
false
false
false
false
false
0
stop_mod (int i, int x, int y) { int l = 0; if (y < 112) { if (y > 98) l = 2; if (x >= 305) l++; if (cote) ddef[i].info.param[l] ^= 1; else level_map[i].info.param[l] ^= 1; } else { if (y >= 112 && y < 119) { if (cote) ddef[i].info.tunnel.output = 0x1010101; ...
false
false
false
false
false
0
ImproveSkill(int *skill) { if (*skill >= NUMBER_OF_SKILL_LEVELS - 1) return; (*skill)++; }
false
false
false
false
false
0
add_entropy(FState * st, const unsigned char *data, unsigned len) { unsigned pos; unsigned char hash[BLOCK]; MD_CTX md; /* hash given data */ md_init(&md); md_update(&md, data, len); md_result(&md, hash); /* * Make sure the pool 0 is initialized, then update randomly. */ ...
true
true
false
false
false
1
inf_text_session_set_xml_user_props(InfSession* session, const GParameter* params, guint n_params, xmlNodePtr xml) { const GParameter* param; INF_SESSION_CLASS(parent_class)->set_xml_user_props( session,...
false
false
false
false
false
0
ar9003_hw_spectral_scan_config(struct ath_hw *ah, struct ath_spec_scan *param) { u8 count; if (!param->enabled) { REG_CLR_BIT(ah, AR_PHY_SPECTRAL_SCAN, AR_PHY_SPECTRAL_SCAN_ENABLE); return; } REG_SET_BIT(ah, AR_PHY_RADAR_0, AR_PHY_RADAR_0_FFT_ENA); REG_SET_BIT(ah, AR_PHY_SPECTRAL_SCAN, AR_PHY_...
false
false
false
false
false
0
layer_fog_read(Lib3dsLayerFog *fog, Lib3dsIo *io) { Lib3dsChunk c; Lib3dsWord chunk; Lib3dsBool have_lin=LIB3DS_FALSE; if (!lib3ds_chunk_read_start(&c, LIB3DS_LAYER_FOG, io)) { return(LIB3DS_FALSE); } fog->near_y=lib3ds_io_read_float(io); fog->far_y=lib3ds_io_read_float(io); fog->density=lib3ds_io_...
false
false
false
false
false
0
set_title_info(uchar tfillchar, uchar titleattr) { if (tfillchar != 0xFF) ms->tfillchar = tfillchar; if (titleattr != 0xFF) ms->titleattr = titleattr; }
false
false
false
false
false
0
nyx_set_input_audio(nyx_audio_callback callback, void *userdata, int num_channels, long len, double rate) { LVAL val; int ch; nyx_set_audio_params(rate, len); if (num_channels > 1) { val = newvector(num_channels); } xl...
false
false
false
false
true
1
IsVisible (Finepoint objpos) { float a_x; /* Vector Influencer->objectpos */ float a_y; finepoint step; /* effective step */ int step_num; /* number of neccessary steps */ float a_len; /* Lenght of a */ int i; finepoint testpos; float influ_x = Me.pos.x; float influ_y = Me.pos.y; DebugPrintf...
false
false
false
false
false
0
destroy_priv(struct kref *kref) { struct parport_uss720_private *priv = container_of(kref, struct parport_uss720_private, ref_count); dev_dbg(&priv->usbdev->dev, "destroying priv datastructure\n"); usb_put_dev(priv->usbdev); kfree(priv); }
false
false
false
false
false
0
__gst_vasprintf (char **result, char const *format, va_list args) { size_t length; *result = vasnprintf (NULL, &length, format, args); if (*result == NULL) return -1; return length; }
false
false
false
false
false
0
isl_printer_print_local_space(__isl_take isl_printer *p, __isl_keep isl_local_space *ls) { struct isl_print_space_data data = { 0 }; unsigned n_div; if (!ls) goto error; if (isl_local_space_dim(ls, isl_dim_param) > 0) { p = print_tuple(ls->dim, p, isl_dim_param, &data); p = isl_printer_print_str(p, " -> ")...
false
false
false
false
false
0
start_child_listen_async(int size_of_message) #else int start_child_listen_async(size_of_message) int size_of_message; #endif { int tsize; int s; int rc; int xx; int tmp_port; int sockerr; int recv_buf_size=65536; int optval=1; xx = 0; tsize=size_of_message; /* Number of messages to receive */ s = soc...
false
false
false
false
false
0
load_one_monster(fd, m) dlb *fd; monster *m; { int size; Fread((genericptr_t) m, 1, sizeof *m, fd); if ((size = m->name.len) != 0) { m->name.str = (char *) alloc((unsigned)size + 1); Fread((genericptr_t) m->name.str, 1, size, fd); m->name.str[size] = '\0'; } else m->name.str = (char *) 0; if (...
false
false
false
false
false
0
session_ticket_pack (extension_priv_data_t epriv, gnutls_buffer_st * ps) { session_ticket_ext_st *priv = epriv.ptr; int ret; BUFFER_APPEND_PFX (ps, priv->session_ticket, priv->session_ticket_len); BUFFER_APPEND_NUM (ps, priv->session_ticket_enable); return 0; }
false
false
false
false
false
0
attributes_write_xml(const output::pointer &fp, const char *name, attributes_ty *this_thing) { if (!this_thing) return; trace(("attributes_write_xml(name = \"%s\", this_thing = %08lX)\n{\n", name, (long)this_thing)); assert(name); assert(((attributes_ty *)this_thing)->reference_count > 0); trace(("...
false
false
false
false
false
0
do_yp_remove (ypdata_t *yp, char *s, unsigned len) { int ret = 0; if (yp->sid) { ret = snprintf (s, len, "action=remove&sid=%s", yp->sid); if (ret >= (signed)len) return ret+1; INFO1 ("clearing up YP entry for %s", yp->mount); ret = send_to_yp ("remove", yp, s);...
false
false
false
false
false
0
applyLinearFit(l_float32 a, l_float32 b, l_float32 x, l_float32 *py) { PROCNAME("applyLinearFit"); if (!py) return ERROR_INT("&y not defined", procName, 1); *py = a * x + b; return 0; }
false
false
false
false
false
0
JAXeventnow(Jax *jax) { if(JAXeventsqueued(jax)) { XNextEvent(jax->d, &jax->xe); switch(jax->xe.type) { case MappingNotify: XRefreshKeyboardMapping((XMappingEvent*)&jax->xe); jax->xe.type=0; break; default: if (jax->EH) jax->EH(jax); break; } } return(0); }
false
false
false
false
false
0
create_rader_aux(int p, int flags) { fftw_complex *omega, *work; int g, ginv, gpower; int i; FFTW_TRIG_REAL twoPiOverN; fftw_real scale = 1.0 / (p - 1); /* for convolution */ fftw_plan plan; fftw_rader_data *d; if (p < 2) fftw_die("non-prime order in Rader\n"); flags &=...
false
false
false
false
false
0
finish_qualified_id_expr (tree qualifying_class, tree expr, bool done, bool address_p) { if (error_operand_p (expr)) return error_mark_node; /* If EXPR occurs as the operand of '&', use special handling that permits a pointer-to-member. */ if (address_p && done) { if (TREE_CODE (expr) ==...
false
false
false
true
true
1
xmlRegNewRange(xmlRegParserCtxtPtr ctxt, int neg, xmlRegAtomType type, int start, int end) { xmlRegRangePtr ret; ret = (xmlRegRangePtr) xmlMalloc(sizeof(xmlRegRange)); if (ret == NULL) { xmlRegexpErrMemory(ctxt, "allocating range"); return(NULL); } ret->neg = neg; ...
false
false
false
false
false
0
cpl_plugin_get_type_string(const cpl_plugin *self) { const char *stype; if (self == NULL) { cpl_error_set_(CPL_ERROR_NULL_INPUT); return NULL; } switch (self->type) { case (unsigned long)CPL_PLUGIN_TYPE_NONE: stype = "none"; break; case (unsign...
false
false
false
false
false
0
erase_xfer(partition_t *part, uint16_t xfernum) { int ret; struct xfer_info_t *xfer; struct erase_info *erase; xfer = &part->XferInfo[xfernum]; pr_debug("ftl_cs: erasing xfer unit at 0x%x\n", xfer->Offset); xfer->state = XFER_ERASING; /* Is there a free erase slot? Always in MTD. *...
false
false
false
false
false
0
addCurrentPatient() { onPatientSelected(patient()->data(Core::IPatient::FullName).toString(), patient()->uuid()); }
false
false
false
false
false
0
getArrayIndex(struct symbolTableNode *tmp, int index) { if(!tmp) exit(intern); struct dataTypeArray *dta = tmp->other; if(index < dta->low || index > dta->high) exit(intern); int real_index = abs(dta->low - index); return dta->data[real_index]; }
false
false
false
false
false
0
prompt_get_boolean_property (GcrSystemPrompt *self, const gchar *property_name) { GVariant *variant; gconstpointer key; g_return_val_if_fail (GCR_IS_SYSTEM_PROMPT (self), FALSE); key = g_intern_string (property_name); variant = g_hash_table_lookup (self->pv->properties, key); if (va...
false
false
false
false
false
0
GetObjectFilePath(cmSourceFile* source) const { std::string path = this->LocalGenerator->GetHomeRelativeOutputPath(); if(!path.empty()) path += "/"; std::string const& objectName = this->GeneratorTarget->Objects[source]; path += this->LocalGenerator->GetTargetDirectory(*this->Target); path += "/"; path ...
false
false
false
false
false
0
pow_hh(shortint *ap, shortint *bp) #endif { shortint pow, x, n; unsigned u; x = *ap; n = *bp; if (n <= 0) { if (n == 0 || x == 1) return 1; if (x != -1) return x == 0 ? 1/x : 0; n = -n; } u = n; for(pow = 1; ; ) { if(u & 01) pow *= x; if(u >>= 1) x *= x; else break; } return(p...
false
false
false
false
false
0
search_sub_worker(jk_ws_service_t *s, status_endpoint_t *p, jk_worker_t *jw, const char *worker, lb_sub_worker_t **wrp, const char *sub_worker, un...
false
false
false
false
false
0
GetMin(int e_numb) { switch(e_numb) { case 0: return min_x_; case 1: return min_y_; case 2: return min_z_; default: assert(false); } }
false
false
false
false
false
0
icalattachtype_get_url(struct icalattachtype* v) { icalerror_check_arg( (v!=0),"v"); return v->url; }
false
false
false
true
false
1
pci_wait_for_pending(struct pci_dev *dev, int pos, u16 mask) { int i; /* Wait for Transaction Pending bit clean */ for (i = 0; i < 4; i++) { u16 status; if (i) msleep((1 << (i - 1)) * 100); pci_read_config_word(dev, pos, &status); if (!(status & mask)) return 1; } return 0; }
false
false
false
false
false
0
remove_stars_of_type(struct gui_star_list *gsl, int type_mask, int flag_mask) { struct gui_star *gs; GSList *sl=NULL, *osl=NULL, *head = gsl->sl; sl = head; while (sl != NULL) { gs = GUI_STAR(sl->data); if ((TYPE_MASK_GSTAR(gs) & type_mask) != 0 && (gs->flags & flag_mask) == flag_mask) { gs->flags &= ...
false
false
false
false
false
0
_eina_value_type_double_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) { const double *ta = a, *tb = b; if (*ta < *tb) return -1; else if (*ta > *tb) return 1; return 0; }
false
false
false
false
false
0
gutsOfDestructor2() { delete [] integerInfo_; integerInfo_ = NULL; delete [] integerVariable_; integerVariable_ = NULL; int i; if (ownObjects_) { for (i = 0; i < numberObjects_; i++) delete object_[i]; delete [] object_; } ownObjects_ = true; object_ = NUL...
false
false
false
false
false
0
write_meta_page(struct f2fs_sb_info *sbi, struct page *page) { struct f2fs_io_info fio = { .sbi = sbi, .type = META, .rw = WRITE_SYNC | REQ_META | REQ_PRIO, .blk_addr = page->index, .page = page, .encrypted_page = NULL, }; if (unlikely(page->index >= MAIN_BLKADDR(sbi))) fio.rw &= ~REQ_META; set_page...
false
false
false
false
false
0
replaceStreamData(PointerHolder<Buffer> data, QPDFObjectHandle const& filter, QPDFObjectHandle const& decode_parms) { this->stream_data = data; this->stream_provider = 0; replaceFilterData(filter, decode_parms, data->getSize()); }
false
false
false
false
false
0
decode_home_uri (const char *uri) { char *home_uri; char *decoded_uri; if (g_str_has_prefix (uri, "file:")) { decoded_uri = g_strdup (uri); } else { home_uri = nautilus_get_home_directory_uri (); decoded_uri = g_strconcat (home_uri, "/", uri, NULL); g_free (home_uri); } return decoded_uri; }
false
false
false
false
false
0
NumLWLocks(void) { int numLocks; /* * Possibly this logic should be spread out among the affected modules, * the same way that shmem space estimation is done. But for now, there * are few enough users of LWLocks that we can get away with just keeping * the knowledge here. */ /* Predefined LWLocks */ ...
false
false
false
false
false
0
pd6729_pci_remove(struct pci_dev *dev) { int i; struct pd6729_socket *socket = pci_get_drvdata(dev); for (i = 0; i < MAX_SOCKETS; i++) { /* Turn off all interrupt sources */ indirect_write(&socket[i], I365_CSCINT, 0); indirect_write(&socket[i], I365_INTCTL, 0); pcmcia_unregister_socket(&socket[i].socket); ...
false
false
false
false
false
0
copy(void) { char *dest; int count = 0; PRECOND(gotlock); dest = ne_concat(res, "-copydest", NULL); ne_delete(i_session2, dest); ONNREQ2("could not COPY locked resource", ne_copy(i_session, 1, NE_DEPTH_ZERO, res, dest)); ONNREQ2("LOCK discovery failed", ne_lock_discove...
false
false
false
false
false
0
hswep_cbox_hw_config(struct intel_uncore_box *box, struct perf_event *event) { struct hw_perf_event_extra *reg1 = &event->hw.extra_reg; struct extra_reg *er; int idx = 0; for (er = hswep_uncore_cbox_extra_regs; er->msr; er++) { if (er->event != (event->hw.config & er->config_mask)) continue; idx |= er->idx;...
false
false
false
false
false
0
gfx_v7_0_fini_pg(struct amdgpu_device *adev) { if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_PG | AMD_PG_SUPPORT_GFX_SMG | AMD_PG_SUPPORT_GFX_DMG | AMD_PG_SUPPORT_CP | AMD_PG_SUPPORT_GDS | AMD_PG_SUPPORT_RLC_SMU_HS)) { gfx_v7_0_update_gfx_pg(adev, false); if (adev->pg_flags ...
false
false
false
false
false
0
store_word(spin, word, flags, region, pfxlist, need_affix) spellinfo_T *spin; char_u *word; int flags; /* extra flags, WF_BANNED */ int region; /* supported region(s) */ char_u *pfxlist; /* list of prefix IDs or NULL */ int need_affix; /* only store word with affix ID */ { int len = (i...
false
false
false
false
false
0
initializeStorage(int matrixSize){ return MAXSUMSTORAGE(matrixSize, vector<vector<vector<int> > > (matrixSize, vector<vector<int> > (matrixSize, vector<int>(matrixSize, 0)))); }
false
false
false
false
false
0
gnm_pane_object_update_bbox (GnmPane *pane, SheetObject *so) { GocItem **ctrl_pts = g_hash_table_lookup (pane->drag.ctrl_pts, so); double const *pts = g_hash_table_lookup ( pane->simple.scg->selected_objects, so); int radius, outline, total_size; if (ctrl_pts == NULL) { ctrl_pts = g_new0 (GocItem *, 10); g_h...
false
false
false
false
false
0
bdx_hw_stop(struct bdx_priv *priv) { ENTER; bdx_disable_interrupts(priv); free_irq(priv->pdev->irq, priv->ndev); netif_carrier_off(priv->ndev); netif_stop_queue(priv->ndev); RET(); }
false
false
false
false
false
0
client3_1_fstat (call_frame_t *frame, xlator_t *this, void *data) { clnt_args_t *args = NULL; gfs3_fstat_req req = {{0,},}; int64_t remote_fd = -1; clnt_conf_t *conf = NULL; int op_errno = ESTALE; int ret ...
false
true
false
true
false
1
gth_toggle_menu_action_finalize (GObject *base) { GthToggleMenuAction *self = GTH_TOGGLE_MENU_ACTION (base); if (self->priv->show_menu_data_destroy != NULL) self->priv->show_menu_data_destroy (self->priv->show_menu_data); if (self->priv->menu != NULL) g_object_unref (self->priv->menu); G_OBJECT_CLASS (gth_tog...
false
false
false
false
false
0
initialise_shutdown () { // Broadcast 'terminate_writer' to all associated pipes. for (pipes_t::iterator it = pipes.begin (); it != pipes.end (); it ++) (*it)->terminate_writer (); }
false
false
false
false
false
0
UpdateTimeInformation() { if ( this->Metadata->OpenFile( this->FileName ) ) { this->Metadata->UpdateTimeInformation(); if ( ! this->GetHasModeShapes() ) { int nTimes = (int) this->Metadata->Times.size(); if ( nTimes ) { this->TimeStepRange[0] = 0; this->TimeStep...
false
false
false
false
false
0
removeDirRecursively(const QString &absPath, QString *error) { if (error) error->clear(); QDir dir(absPath); if (!dir.exists()) return true; // remove all dirs inside this dir (recursively) foreach(const QString &dirPath, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) { Q...
false
false
false
false
false
0
GetStreamInfo(stream_info *info) { int result = 0; memset(info, 0, sizeof(stream_info)); Lock(); if (plugin && plugin->stream_info && info && the_object) { result = plugin->stream_info(the_object, info); } Unlock(); return result; }
false
false
false
false
false
0
tta_read_header(AVFormatContext *s, AVFormatParameters *ap) { TTAContext *c = s->priv_data; AVStream *st; int i, channels, bps, samplerate, datalen, framelen; uint64_t framepos; if (get_le32(s->pb) != AV_RL32("TTA1")) return -1; // not tta file url_fskip(s->pb, 2); // FIXME: flags ...
false
false
false
false
false
0
GetNumTracksWithEvents() const { int i; for ( i = number_of_tracks - 1; i >= 0; --i ) { if ( !tracks[i]->IsTrackEmpty() ) break; } return i+1; }
false
false
false
false
false
0
node_merge_stmt(struct grecs_node *to_node, struct grecs_node *from_node, struct grecs_keyword *kwp, int flags) { if (kwp && (flags & GRECS_AGGR) ^ (kwp->flags & GRECS_AGGR) && ((kwp->flags & GRECS_LIST) || kwp->callback)) node_aggregate_stmt(to_node, from_node, kwp->flags & GRECS_LIST); else { ...
false
false
false
false
false
0
brd_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long arg) { int error; struct brd_device *brd = bdev->bd_disk->private_data; if (cmd != BLKFLSBUF) return -ENOTTY; /* * ram device BLKFLSBUF has special semantics, we want to actually * release and destroy the ramdisk data. *...
false
true
false
false
false
1
pgoto(P *p, long loc) { if (loc > p->byte) pfwrd(p, loc - p->byte); else if (loc < p->byte) pbkwd(p, p->byte - loc); return p; }
false
false
false
false
false
0
ncp_iget(struct super_block *sb, struct ncp_entry_info *info) { struct inode *inode; if (info == NULL) { pr_err("%s: info is NULL\n", __func__); return NULL; } inode = new_inode(sb); if (inode) { atomic_set(&NCP_FINFO(inode)->opened, info->opened); inode->i_ino = info->ino; ncp_set_attr(inode, info); ...
false
false
false
false
false
0
store_sampling_rate(struct dbs_data *dbs_data, const char *buf, size_t count) { struct cs_dbs_tuners *cs_tuners = dbs_data->tuners; unsigned int input; int ret; ret = sscanf(buf, "%u", &input); if (ret != 1) return -EINVAL; cs_tuners->sampling_rate = max(input, dbs_data->min_sampling_rate); return count; }
false
false
false
false
false
0
cs_latin1(char *mstr, int *lenptr) { int ilen, olen, i; char *latin1, *ptr; const char *subst; unsigned char ch; UCS2 unicode; ilen = lenptr ? *lenptr : strlen(mstr); olen = 0; for (i = 0; i < ilen; ++i) { ch = *((unsigned char *) mstr + i); unicode = macroman[ch]; if (unicode &...
false
false
false
false
false
0
_elm_notify_smart_content_get(const Evas_Object *obj, const char *part) { ELM_NOTIFY_DATA_GET(obj, sd); if (part && strcmp(part, "default")) return NULL; return sd->content; }
false
false
false
false
false
0
act2_close_dev(struct act2_eegdev* a2dev) { // Close the USB device if (a2dev->hudev != NULL) { libusb_release_interface(a2dev->hudev, 0); libusb_close(a2dev->hudev); } // Close the session to libusb if (a2dev->ctx) { pthread_mutex_lock(&a2dev->mtx); a2dev->stopusb = 1; pthread_mutex_unlock(&a2dev->mtx)...
false
false
false
false
false
0
removeAStarBefore(const Decl *D) { SourceLocation LocStart = D->getLocation(); const char *StartBuf = SrcManager->getCharacterData(LocStart); int Offset = 0; while (*StartBuf != '*') { StartBuf--; Offset--; } SourceLocation StarLoc = LocStart.getLocWithOffset(Offset); return !TheRewriter->RemoveT...
false
false
false
false
true
1
iraw_loop(unsigned numbytes, struct inbuf_t *inbuf) { struct cardstate *cs = inbuf->cs; struct bc_state *bcs = cs->bcs; int inputstate = bcs->inputstate; struct sk_buff *skb = bcs->rx_skb; unsigned char *src = inbuf->data + inbuf->head; unsigned procbytes = 0; unsigned char c; if (!skb) { /* skip this block ...
false
false
false
false
false
0
VCLS_Poll(struct VCLS *cs, int timeout) { struct VCLS_fd *cfd, *cfd2; int i, j, k; CHECK_OBJ_NOTNULL(cs, VCLS_MAGIC); if (cs->nfd == 0) { errno = 0; return (-1); } assert(cs->nfd > 0); { struct pollfd pfd[cs->nfd]; i = 0; VTAILQ_FOREACH(cfd, &cs->fds, list) { pfd[i].fd = cfd->fdi; pfd[i].events...
false
false
false
true
false
1