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
_cmsMAT3isIdentity(const cmsMAT3* a) { cmsMAT3 Identity; int i, j; _cmsMAT3identity(&Identity); for (i=0; i < 3; i++) for (j=0; j < 3; j++) if (!CloseEnough(a ->v[i].n[j], Identity.v[i].n[j])) return FALSE; return TRUE; }
false
false
false
false
false
0
write_ir_test_docs(Store *store) { int i; Config config = default_config; IndexWriter *iw; Document **docs = prep_ir_test_docs(); FieldInfos *fis = fis_new(STORE_YES, INDEX_YES, TERM_VECTOR_WITH_POSITIONS_OFFSETS); fis_add_field(fis, fi_new("author", STORE_YES, IND...
false
false
false
false
false
0
ak4642_dai_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { int is_play = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; struct snd_soc_codec *codec = dai->codec; if (is_play) { } else { /* stop stereo input */ snd_soc_update_bits(codec, PW_MGMT1, PMADL, 0); snd_soc_update_...
false
false
false
false
false
0
gtk_combofix_show_popup ( GtkComboFix *combofix ) { GtkComboFixPrivate *priv = combofix -> priv; if ( GTK_WIDGET_VISIBLE ( priv -> popup ) ) return FALSE; g_signal_handlers_block_by_func ( G_OBJECT ( combofix -> entry ), G_CALLBACK ( gtk_combofix_entry_insert ), ...
false
false
false
false
false
0
ParseSpace(XmtLayoutWidget lw, XmtLayoutLocalInfo *li) #else static void ParseSpace(lw, li) XmtLayoutWidget lw; XmtLayoutLocalInfo *li; #endif { switch(GetKeyword()) { case EVEN: case EVENSPACED: li->space_type = XmtLayoutSpaceEven; break; case LREVENSPACED: li->space_type = XmtLayoutSpaceLREven; br...
false
false
false
false
false
0
interpret(/*@null@*/ int frame_index_to_quit_on) { z_opcode_function current_z_opcode_function; uint16_t start_interrupt_routine; //uint16_t start_interrupt_routine_buf; //int i; /* // The lower four "old.*" variables are used to store the state of the // interpreter before entering this function. This s...
false
false
false
true
false
1
ocfs2_get_left_path(struct ocfs2_extent_tree *et, struct ocfs2_path *right_path, struct ocfs2_path **ret_left_path) { int ret; u32 left_cpos; struct ocfs2_path *left_path = NULL; *ret_left_path = NULL; /* This function shouldn't be called for non-trees. */ BUG_ON(right_path->p_tree_depth == ...
false
false
false
false
false
0
mv5_scr_read(struct ata_link *link, unsigned int sc_reg_in, u32 *val) { struct mv_host_priv *hpriv = link->ap->host->private_data; void __iomem *mmio = hpriv->base; void __iomem *addr = mv5_phy_base(mmio, link->ap->port_no); unsigned int ofs = mv5_scr_offset(sc_reg_in); if (ofs != 0xffffffffU) { *val = readl(ad...
false
false
false
false
false
0
analyze_make_array() { int n = 0; bool checked = FALSE; bool collection = FALSE; if (PATTERN_is(*current, RS_RSQR)) { current++; add_pattern(PATTERN_make(RT_RESERVED, RS_NULL)); return; } for(;;) { n++; if (n > MAX_PARAM_OP) THROW("Too many arguments"); analyze_expr(0, RS_NONE); if (!check...
false
false
false
false
false
0
fl_tablep(value_t *args, uint32_t nargs) { argcount("table?", nargs, 1); return ishashtable(args[0]) ? FL_T : FL_F; }
false
false
false
false
false
0
clear_win_events(Window win, int vis) { #if !NO_X11 if (dpy && win != None && ncache) { XEvent ev; XErrorHandler old_handler; old_handler = XSetErrorHandler(trap_xerror); trapped_xerror = 0; while (XCheckTypedWindowEvent(dpy, win, ConfigureNotify, &ev)) { if (ncdb) fprintf(stderr, "."); if (trapped_xer...
false
false
false
false
false
0
nes_netdev_change_mtu(struct net_device *netdev, int new_mtu) { struct nes_vnic *nesvnic = netdev_priv(netdev); struct nes_device *nesdev = nesvnic->nesdev; int ret = 0; u8 jumbomode = 0; u32 nic_active; u32 nic_active_bit; u32 uc_all_active; u32 mc_all_active; if ((new_mtu < ETH_ZLEN) || (new_mtu > max_mtu))...
false
false
false
false
false
0
check_point_change(MAILSTREAM *stream) { if(!sp_check_cnt(stream)) sp_set_first_status_change(stream, time(0)); sp_set_check_cnt(stream, sp_check_cnt(stream)+1); dprint((9, "check_point_change(%s): increment to %d\n", STREAMNAME(stream), sp_check_cnt(stream))); }
false
false
false
true
false
1
MODtoChars(unsigned char mod) { OutBuffer buf; buf.reserve(16); MODtoBuffer(&buf, mod); buf.writebyte(0); return buf.extractData(); }
false
false
false
false
false
0
mkbinding(char *name, List *defn, Binding *next) { assert(next == NULL || next->name != NULL); validatevar(name); gcdisable(); Ref(Binding *, binding, gcnew(Binding)); binding->name = name; binding->defn = defn; binding->next = next; gcenable(); RefReturn(binding); }
false
false
false
false
false
0
CACAPDUFactory_ReadFile(CKYAPDU *apdu, unsigned short offset, CKYByte type, CKYByte count) { CKYStatus ret; CKYBuffer buf; CKYBuffer_InitEmpty(&buf); CKYAPDU_SetCLA(apdu, CKY_CLASS_GLOBAL_PLATFORM); CKYAPDU_SetINS(apdu, CAC_INS_READ_FILE); CKYAPDU_SetP1(apdu, (offset >> 8) & 0xff); C...
false
false
false
false
false
0
showPreview( const KUrl &url ) { d->controls->setEnabled(false); if (!d->player) { d->player = new MediaObject(this); Phonon::createPath(d->player, d->videoWidget); Phonon::createPath(d->player, d->audioOutput); connect(d->player, SIGNAL(stateChanged(Phonon::State,Phonon::State))...
false
false
false
false
false
0
branch_open(struct view *view) { const char *branch_log[] = { "git", "log", "--no-color", "--pretty=raw", "--simplify-by-decoration", "--all", NULL }; if (!io_run_rd(&view->io, branch_log, NULL, FORMAT_NONE)) { report("Failed to load branch data"); return TRUE; } setup_update(view, view->id); branch_op...
false
false
false
false
false
0
cleanup_all_probes(void) { struct trace_uprobe *tu; int ret = 0; mutex_lock(&uprobe_lock); while (!list_empty(&uprobe_list)) { tu = list_entry(uprobe_list.next, struct trace_uprobe, list); ret = unregister_trace_uprobe(tu); if (ret) break; } mutex_unlock(&uprobe_lock); return ret; }
false
false
false
false
false
0
qxl_dirty_update(struct qxl_fbdev *qfbdev, int x, int y, int width, int height) { struct qxl_device *qdev = qfbdev->qdev; unsigned long flags; int x2, y2; x2 = x + width - 1; y2 = y + height - 1; spin_lock_irqsave(&qfbdev->dirty.lock, flags); if ((qfbdev->dirty.y2 - qfbdev->dirty.y1) && (qfbdev->...
false
false
false
false
false
0
Sync(void) { uint8 bank; if (isresetbased) bank = (latche[0] & 0x1f) | (reset << 5) | ((latche[1] & 1) << 6); else bank = (latche[0] & 0x1f) | ((latche[0] & 0x80) >> 2) | ((latche[1] & 1) << 6); if (!(latche[0] & 0x20)) setprg32(0x8000, bank >> 1); else{ setprg16(0x8000, bank); setprg16(0xC000,...
false
false
false
false
false
0
process_replace (GtkSourceContextData *ctx_data, const gchar *id, const gchar *replace_with, GError **error) { ContextDefinition *to_replace, *new; to_replace = gtk_source_context_data_lookup (ctx_data, id); if (to_replace == NULL) { g_set_error (error, GTK_SOURCE_CONTEXT...
false
false
false
false
false
0
triggered() { if ( isFulfilled() ) eventReady( gamemap ); }
false
false
false
false
false
0
acpi_processor_max_state(struct acpi_processor *pr) { int max_state = 0; /* * There exists four states according to * cpufreq_thermal_reduction_pctg. 0, 1, 2, 3 */ max_state += cpufreq_get_max_state(pr->id); if (pr->flags.throttling) max_state += (pr->throttling.state_count -1); return max_state; }
false
false
false
false
false
0
_gsskrb5_verify_header(u_char **str, size_t total_len, const void *type, gss_OID oid) { OM_uint32 ret; size_t len; u_char *p = *str; ret = _gssapi_verify_mech_header(str, total_len, oid); if (ret) return ret; len = total_len - (*str - p); if (len < 2) return GSS_S_DEFECTI...
false
false
false
false
false
0
TriangulateBMesh( ) { AssertValidMesh( ); AssertValidSizes( ); PrepareTriMesh( ); for ( int i = 0; i < BMesh->totpoly; ++i ) { const MPoly& poly = BMesh->mpoly[ i ]; ConvertPolyToFaces( poly ); } return triMesh; }
false
false
false
false
false
0
get_proc_exe(const gchar *p_proc_path) { static gchar exe[PATH_MAX]; gchar *proc_exe = g_strdup_printf("%s/exe", p_proc_path); #ifdef DEBUG_VERBOSE purple_debug_misc("gfire", "get_proc_exe: Resolving symlink \"%s\"\n", proc_exe); #endif // DEBUG_VERBOSE int len = readlink(proc_exe, exe, PATH_MAX - 1); if(len == ...
false
false
false
false
false
0
cbf_put_stopcode (cbf_compress_data *data, unsigned int *bitcount) { unsigned int endcode; endcode = 1 << data->bits; cbf_failnez (cbf_put_bits (data->file, (int *) data->node [endcode].bitcode, data->node [endcode].bitcount)) ...
false
false
false
false
false
0
hexchat_plugin_init(hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg) { #ifdef IS_PY3K wchar_t *argv[] = { L"<hexchat>", 0 }; #else char *argv[] = { "<hexchat>", 0 }; #endif ph = plugin_handle; /* Block double initalization. */ if (initialize...
false
false
false
false
false
0
getNextBranchUChars(const UChar *pos, int32_t length, Appendable &out) { while(length>kMaxBranchLinearSubNodeLength) { ++pos; // ignore the comparison unit getNextBranchUChars(jumpByDelta(pos), length>>1, out); length=length-(length>>1); pos=skipDelta(pos); } do { ou...
false
false
false
false
false
0
setSelectionRange(long start, long end) { if (m_render) { RenderTextArea* renderArea = static_cast<RenderTextArea*>( m_render ); renderArea->setSelectionRange( start, end ); } }
false
false
false
false
false
0
setwp_cb (GtkWidget * widget, guint datum) { //gchar str[200]; gchar b[100], buf[1000], buf2[1000]; gchar *p, *tn; p = b; deleteline = datum; if (dontsetwp) return TRUE; /* enter selected_wp_mode -> * enables map jumping to target_lat/lon */ selected_wp_mode = TRUE; gtk_clist_get_text (GTK_CLIST (myl...
false
false
false
false
false
0
readUserSettingsFile(Tcl_Interp* interp, char* filename) { struct emf_ObjectData_X my_ObjectData; emf_ObjectData = &my_ObjectData; /*Set callback function*/ //int my_readDataCB(void**); emf_readDataCB = readUserSettingsFileCallBack; /*-----Start parser*/ int rc = emf_readData(filename, (void**)&interp,...
false
false
false
false
false
0
GMT_contlabel_init (struct GMT_CONTOUR *G, GMT_LONG mode) { /* Assign default values to structure */ memset ((void *)G, 0, sizeof (struct GMT_CONTOUR)); /* Sets all to 0 */ if (mode == 1) { G->line_type = 1; strcpy (G->line_name, "Contour"); } else { G->line_type = 0; strcpy (G->line_name, "Line"); } G->...
false
false
false
false
false
0
printArgument(const Argument *Arg, Attributes Attrs) { // Output type... TypePrinter.print(Arg->getType(), Out); // Output parameter attributes list if (Attrs != Attribute::None) Out << ' ' << Attribute::getAsString(Attrs); // Output name, if available... if (Arg->ha...
false
false
false
false
false
0
_rtpbin_request_pt_map (GstElement *element, guint session_id, guint pt, gpointer user_data) { FsRtpConference *self = FS_RTP_CONFERENCE (user_data); FsRtpSession *session = NULL; GstCaps *caps = NULL; session = fs_rtp_conference_get_session_by_id (self, session_id); ...
false
false
false
false
false
0
operator>>(const BigInt& x, u32bit shift) { if(shift == 0) return x; if(x.bits() <= shift) return 0; const u32bit shift_words = shift / MP_WORD_BITS, shift_bits = shift % MP_WORD_BITS, x_sw = x.sig_words(); BigInt y(x.sign(), x_sw - shift_words); bigint_s...
false
false
false
false
false
0
realtime_msg(unsigned char inbyte) { message_counter[inbyte]++; if (_offline) { return; } switch (inbyte) { case 0xf8: timing (*this); break; case 0xfa: start (*this); break; case 0xfb: contineu (*this); break; case 0xfc: stop (*this); break; case 0xfe: /* !!! active sense message in rea...
false
false
false
false
false
0
read_embedded_server_arguments(const char *name) { char argument[1024],buff[FN_REFLEN], *str=0; FILE *file; if (!test_if_hard_path(name)) { strxmov(buff, opt_basedir, name, NullS); name=buff; } fn_format(buff, name, "", "", MY_UNPACK_FILENAME); if (!embedded_server_arg_count) { embedded_se...
false
false
false
false
false
0
get_tlg_node_including_bfg_node(BfgNode *bfg_node, TlgLayer *layer) { List *li; for (li = layer->tlg_nodes; li != NULL; li = li->next) { TlgNode *n = (TlgNode *)li->data; if (in_IntSet(n->inner, bfg_node_no(bfg_node))) return n; } return NULL; }
false
false
false
false
false
0
maybe_add_dllexport (tree decl) { if (i386_pe_type_dllexport_p (decl)) { tree decl_attrs = DECL_ATTRIBUTES (decl); if (lookup_attribute ("dllexport", decl_attrs) != NULL_TREE) /* Already done. */ return; DECL_ATTRIBUTES (decl) = tree_cons (get_identifier ("dllexport"), NULL_TREE, d...
false
false
false
false
false
0
loop_add(struct loop_device **l, int i) { struct loop_device *lo; struct gendisk *disk; int err; err = -ENOMEM; lo = kzalloc(sizeof(*lo), GFP_KERNEL); if (!lo) goto out; lo->lo_state = Lo_unbound; /* allocate id, if @id >= 0, we're requesting that specific id */ if (i >= 0) { err = idr_alloc(&loop_index...
false
true
false
false
false
1
EXTRACTOR_plugin_remove (struct EXTRACTOR_PluginList *prev, const char *library) { struct EXTRACTOR_PluginList *pos; struct EXTRACTOR_PluginList *first; pos = prev; first = prev; while ( (NULL != pos) && (0 != strcmp (pos->short_libname, library)) ) { prev = pos; pos = pos->next; ...
false
false
false
false
false
0
iscsit_stop_session( struct iscsi_session *sess, int session_sleep, int connection_sleep) { u16 conn_count = atomic_read(&sess->nconn); struct iscsi_conn *conn, *conn_tmp = NULL; int is_last; spin_lock_bh(&sess->conn_lock); if (session_sleep) atomic_set(&sess->sleep_on_sess_wait_comp, 1); if (connection_sl...
false
false
false
false
false
0
grecs_txtacc_entry_tailor(struct grecs_txtacc_entry *ent) { if (ent->size > ent->len) { char *p = realloc(ent->buf, ent->len); if (!p) return; ent->buf = p; ent->size = ent->len; } }
false
false
false
false
false
0
protection_needed() { int protectionNeeded = population * 10; Firm* firmPtr; for( int i=linked_firm_count-1 ; i>=0 ; i-- ) { firmPtr = firm_array[ linked_firm_array[i] ]; if( firmPtr->nation_recno != nation_recno ) continue; //----- if this is a camp, add combat level points -----// if( firmPtr->fi...
false
false
false
false
false
0
nemo_window_set_active_slot (NemoWindow *window, NemoWindowSlot *new_slot) { NemoWindowSlot *old_slot; g_assert (NEMO_IS_WINDOW (window)); DEBUG ("Setting new slot %p as active", new_slot); if (new_slot) { g_assert ((window == nemo_window_slot_get_window (new_slot))); g_assert (NEMO_IS_WINDOW_PANE (new_slot->...
false
false
false
false
false
0
rb_intern(name) const char *name; { const char *m = name; ID id; int last; if (st_lookup(sym_tbl, (st_data_t)name, (st_data_t *)&id)) return id; last = strlen(name)-1; id = 0; switch (*name) { case '$': id |= ID_GLOBAL; if (is_special_global_name(++m)) goto new_id; break; ...
false
false
false
false
false
0
print_setting( const struct stControlSettings *ctrlSetting, int localOpen ){ Stmt q; if( g.repositoryOpen ){ db_prepare(&q, "SELECT '(local)', value FROM config WHERE name=%Q" " UNION ALL " "SELECT '(global)', value FROM global_config WHERE name=%Q", ctrlSetting->name, ctrlSettin...
false
false
false
false
false
0
ajSeqrefSetLoctype(AjPSeqRef ref, const AjPStr str) { if(ajStrPrefixC(str, "Submitted ")) ajStrAssignC(&ref->Loctype, "submission"); else if(ajStrPrefixC(str, "(in) ")) ajStrAssignC(&ref->Loctype, "book"); else if(ajStrPrefixC(str, "(er) ")) ajStrAssignC(&ref->Loctype, "electronic"); else if(ajStrPre...
false
false
false
false
false
0
SDLGui_DrawObject(SGOBJ *dlg, int objnum) { switch (dlg[objnum].type) { case SGBOX: SDLGui_DrawBox(dlg, objnum); break; case SGTEXT: SDLGui_DrawText(dlg, objnum); break; case SGEDITFIELD: SDLGui_DrawEditField(dlg, objnum); break; case SGBUTTON: SDLGui_DrawBu...
false
false
false
false
false
0
exec_append_initialize_next(AppendState *appendstate) { EState *estate; int whichplan; /* * get information from the append node */ estate = appendstate->ps.state; whichplan = appendstate->as_whichplan; if (whichplan < appendstate->as_firstplan) { /* * if scanning in reverse, we start at the last...
false
false
false
false
false
0
response_cb (GtkWidget *dialog, gint response, gpointer data) { free (g_object_get_data (G_OBJECT (dialog), "msg")); if (!data) gtk_widget_destroy (dialog); }
false
false
false
false
false
0
nautilus_list_model_get_first_iter_for_file (NautilusListModel *model, NautilusFile *file, GtkTreeIter *iter) { GList *list; gboolean res; res = FALSE; list = nautilus_list_model_get_all_iters_for_file (model, file); if (list != NULL) { res = TRUE; *iter = *(Gtk...
false
false
false
false
false
0
vector_init(unsigned int size) { vector_t *v = vector_alloc(); /* allocate at least one slot */ if (size == 0) size = 1; v->allocated = size; v->active = 0; v->slot = (void *) MALLOC(sizeof(void *) * size); return v; }
false
false
false
false
false
0
assimilate_handler( WORKUNIT& wu, vector<RESULT>& /*results*/, RESULT& canonical_result ) { int retval; char buf[1024]; unsigned int i; retval = boinc_mkdir(config.project_path("sample_results")); if (retval) return retval; if (wu.canonical_resultid) { vector<OUTPUT_FILE_INFO> outp...
false
false
false
false
false
0
pkinit_server_get_edata(krb5_context context, krb5_kdc_req *request, krb5_kdcpreauth_callbacks cb, krb5_kdcpreauth_rock rock, krb5_kdcpreauth_moddata moddata, krb5_preauthtype pa_type, ...
false
false
false
false
false
0
hfi1_filter_dlid(void *ibhdr, void *packet_data, void *value) { struct hfi1_ib_header *hdr; int ret; ret = hfi1_filter_check(ibhdr, "header"); if (ret) return ret; ret = hfi1_filter_check(value, "user"); if (ret) return ret; hdr = (struct hfi1_ib_header *)ibhdr; if (*((u16 *)value) == be16_to_cpu(hdr->lr...
false
false
false
false
false
0
System_rmdir(CTX ctx, ksfp_t *sfp _RIX) { RETURNb_(fileop(ctx, sfp, "rmdir", rmdir, sfp[1].pth)); }
false
false
false
false
false
0
nameonly(string s) { string tmp; try { int i = 0; while (i < (int)s.size()) { if(s.at(i) != '/') { tmp += s.at(i); i++; } else { break; } } } catc...
false
false
false
false
false
0
getCharBBox(int charIdx, double *xMinA, double *yMinA, double *xMaxA, double *yMaxA) { if (charIdx < 0 || charIdx >= len) { return; } switch (rot) { case 0: *xMinA = edge[charIdx]; *xMaxA = edge[charIdx + 1]; *yMinA = yMin; *yMaxA = yMax; break; case 1: *xMinA = xMin; *xM...
false
false
false
false
false
0
ajTableMapDel(AjPTable table, void (*apply)(void** Pkey, void** Pvalue, void* cl), void* cl) { ajulong i = 0UL; ajuint stamp = 0U; AjPTableNode node1 = NULL; AjPTableNode node2 = NULL; if(!table) return; stamp = table->Timestamp; for(i = 0...
false
false
false
false
false
0
ValidWindow(display, wid, atom) Display *display; Window wid; Atom atom; { Atom gotAtom; int gotFormat; unsigned long gotItems, moreBytes; unsigned char *propValue; TrapErrors(display); if (XGetWindowProperty(display, wid, a...
false
false
false
false
false
0
status(void) const { MESSAGE_ITEM mitem; mitem.setprecision(5); mitem << "(audiofx) Optimal value for DC-adjust: "; mitem << get_deltafix(SAMPLE_SPECS::ch_left) << " (left), "; mitem << get_deltafix(SAMPLE_SPECS::ch_right) << " (right)."; return mitem.to_string(); }
false
false
false
false
false
0
back_unit_del_by_index(Topform unit, Lindex idx) { Plist nonunits = NULL; Context subst = get_context(); Literals clit = unit->literals; Mindex mdx = clit->sign ? idx->neg : idx->pos; Mindex_pos pos; Term datom = mindex_retrieve_first(clit->atom, mdx, INSTANCE, subst, NULL, FALSE, &pos); whil...
false
false
false
false
false
0
isValidIsoWeekDate(int year, int isoWeekNumber, int dayOfIsoWeek) const { Q_D(const KCalendarSystem); //Tests Year value in standard YMD isValid() if (!isValid(year, 1, 1)) { return false; } //Test Week Number falls in valid range for this year int weeksInThisYear = weeksInYear(year); ...
false
false
false
false
false
0
Align() { vector<vector3>::size_type N = _ptarget->size(); if (_pref->size() != N) { obErrorLog.ThrowError(__FUNCTION__, "Cannot align the reference and target as they are of different size" , obError); return false; } if (!_symmetry || _aut.size() == 1) { if (_method == OBAlign::K...
false
false
false
false
false
0
onTestMethodEnd(const svutTestCase & testCase,const svUnitTest::svutTestMethod& method, svutStatusInfo status) { svutListenerSummary::onTestMethodEnd(testCase,method,status); formatter->closeTestMethod(testCase,method,status); }
false
false
false
false
false
0
format(const Size& area_size) { d_spaceExtras.clear(); for (size_t i = 0; i < d_renderedString->getLineCount(); ++i) { const size_t space_count = d_renderedString->getSpaceCount(i); const float string_width = d_renderedString->getPixelSize(i).d_width; if ((space_count == 0) || (str...
false
false
false
false
false
0
chdir_mkdir(char *path) { char *c, *p; if (path[0] == '~' && path[1] == '/') path += 2; if (chdir(path) == 0) return 0; if (errno != ENOENT) { perror(path); return -1; } c = path; p = strchr(c, '/'); for (;;) { int tmp; if (p) *p = '\0'; tmp = chdir(c); if (tmp < 0 && err...
false
false
false
false
false
0
insert_obstacles_into_blitting_list(int mask) { int i; level *obstacle_level; int LineStart, LineEnd, ColStart, ColEnd, line, col; int px, py; int tstamp = next_glue_timestamp(); obstacle *OurObstacle; gps tile_vpos, tile_rpos; gps virtpos, reference; get_floor_boundaries(mask, &LineStart, &LineEnd, &ColStar...
false
false
false
false
false
0
gsb_form_transaction_currency_changed ( GtkWidget *widget, gpointer null ) { gint account_number; gint currency_number; gint account_currency_number; gint transaction_number; gint link_number; account_number = gsb_form_get_account_number ( ); gtk_widget_grab_focus ( gsb_form_widget_get_widg...
false
false
false
false
false
0
read_header(struct pstore *ps, int *new_snapshot) { int r; struct disk_header *dh; unsigned chunk_size; int chunk_size_supplied = 1; char *chunk_err; /* * Use default chunk size (or logical_block_size, if larger) * if none supplied */ if (!ps->store->chunk_size) { ps->store->chunk_size = max(DM_CHUNK_SI...
false
false
false
false
false
0
prepare_b_async (TpProxy *proxy, const TpProxyFeature *feature, GAsyncReadyCallback callback, gpointer user_data) { GSimpleAsyncResult *result; g_assert (tp_proxy_is_prepared (proxy, TP_TESTS_MY_CONN_PROXY_FEATURE_CORE)); g_assert (tp_proxy_is_prepared (proxy, TP_TESTS_MY_CONN_PROXY_FEATURE_A)); r...
false
false
false
false
false
0
eog_util_show_file_in_filemanager (GFile *file, GdkScreen *screen) { GDBusProxy *proxy; gboolean done = FALSE; g_return_if_fail (file != NULL); proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS | G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL, "org.f...
false
false
false
false
false
0
Dialog_Layout_List_Related(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder) : Dialog_Layout_List(cobject, builder), m_combo_relationship(0), m_checkbutton_show_child_relationships(0), m_radio_navigation_automatic(0), m_radio_navigation_none(0), m_radio_navigation_specify(0), m_label_navig...
false
false
false
false
false
0
buffer_write(struct buffer *self, int fd) { ssize_t count, nr; count = buffer_size(self); nr = write_in_full(fd, buffer_start(self), count); if (nr != count) return -1; return nr; }
false
false
false
false
false
0
zmod_vec_scalar_mul_range(ulong * r1, ulong * r2, ulong u, ulong p, double p_inv, ulong start, ulong end) { #if FLINT_BITS == 64 if (FLINT_BIT_COUNT(p) >= FLINT_D_BITS) { for (ulong i = start; i < end; i++) r1[i] = z_mulmod2_precomp(r2[i], u, p, p_inv); } else #endif { for (ulong i =...
false
false
false
false
false
0
is_playing(void) { giveinfo(); int &comMessage = LockComs(); // If a stop command has been issued, we'll return and say that we have actually stopped // even though, there may still be some output. bool ret = playing && comMessage != FMOPL_MESSAGE_STOP; UnlockComs(); return ret; }
false
false
false
false
false
0
exo_tree_view_button_release_event (GtkWidget *widget, GdkEventButton *event) { GtkTreeViewColumn *column; GtkTreeSelection *selection; GtkTreePath *path; ExoTreeView *tree_view = EXO_TREE_VIEW (widget); /* verify that the release event is for the interna...
false
false
false
false
false
0
wi_string_has_suffix(wi_string_t *string, wi_string_t *suffix) { wi_integer_t offset; offset = string->length - suffix->length; if(offset < 0) return false; return (strcmp(string->string + offset, suffix->string) == 0); }
false
false
false
false
false
0
bfad_hal_mem_alloc(struct bfad_s *bfad) { struct bfa_meminfo_s *hal_meminfo = &bfad->meminfo; struct bfa_mem_dma_s *dma_info, *dma_elem; struct bfa_mem_kva_s *kva_info, *kva_elem; struct list_head *dm_qe, *km_qe; bfa_status_t rc = BFA_STATUS_OK; dma_addr_t phys_addr; bfa_cfg_get_default(&bfad->ioc_cfg); bfad_u...
false
false
false
false
false
0
clutter_drag_action_set_drag_threshold (ClutterDragAction *action, gint x_threshold, gint y_threshold) { ClutterDragActionPrivate *priv; GObject *self; g_return_if_fail (CLUTTER_IS_DRAG_ACTION (action)); ...
false
false
false
false
false
0
ProcessFromenvLocked(const string& flagval, FlagSettingMode set_mode, bool errors_are_fatal) { if (flagval.empty()) return ""; string msg; vector<string> flaglist; ParseFlagList(flagval.c_str(), &flaglist)...
false
false
false
false
false
0
dmi_memory_module_connections(uint8_t code, char *connection, int sizeof_connection) { if (code == 0xFF) sprintf(connection, "%s", "None"); else { if ((code & 0xF0) != 0xF0) sprintf(connection, "%u ", code >> 4); if ((code & 0x0F) != 0x0F) snprintf(connection, sizeof_connection, "%s%u", connection,...
false
true
false
false
false
1
free_nested(struct vcpu_vmx *vmx) { if (!vmx->nested.vmxon) return; vmx->nested.vmxon = false; free_vpid(vmx->nested.vpid02); nested_release_vmcs12(vmx); if (enable_shadow_vmcs) free_vmcs(vmx->nested.current_shadow_vmcs); /* Unpin physical memory we referred to in current vmcs02 */ if (vmx->nested.apic_acce...
false
false
false
false
false
0
fix_bad(DOS_FS * fs) { unsigned long i; if (verbose) printf("Checking for bad clusters.\n"); for (i = 2; i < fs->clusters + 2; i++) { FAT_ENTRY curEntry; get_fat(&curEntry, fs->fat, i, fs); if (!get_owner(fs, i) && !FAT_IS_BAD(fs, curEntry.value)) if (!fs_test(cluster_start(fs, i), fs->cluster_si...
false
false
false
false
false
0
process_wait(int timeout) { struct process_info *p; if(!complete_list) complete_list = list_create(); p = list_pop_head(complete_list); if(p) return p; process_work(timeout); return list_pop_head(complete_list); }
false
false
false
false
false
0
write_slice_end(MpegEncContext *s){ if(CONFIG_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4){ if(s->partitioned_frame){ ff_mpeg4_merge_partitions(s); } ff_mpeg4_stuffing(&s->pb); }else if(CONFIG_MJPEG_ENCODER && s->out_format == FMT_MJPEG){ ff_mjpeg_encode_stuffing(&s...
false
false
false
false
false
0
_item_block_realize(Item_Block *itb) { if (itb->realized) return; itb->realized = EINA_TRUE; itb->want_unrealize = EINA_FALSE; }
false
false
false
false
false
0
fix_point(pf_state_t *s, point_t p, point_t *ret, polygon_t **ret_pol) /* Checks a point for containment in any of the polygons in the polygon set. ** If the point is contained in a totally accessible polygon that polygon ** is removed from the set. If the point is contained in a polygon of another ** type the near poi...
false
false
false
false
false
0
complete_transfer(int callno, struct iax_ies *ies) { int peercallno = 0; struct chan_iax2_pvt *pvt = iaxs[callno]; struct iax_frame *cur; jb_frame frame; if (ies->callno) peercallno = ies->callno; if (peercallno < 1) { ast_log(LOG_WARNING, "Invalid transfer request\n"); return -1; } remove_by_transferca...
false
true
false
false
false
1
get_color(vector3 base_color, vector3 normal) { //return vector3(0,0,position[2] / 750); vector3 final_color; final_color[0] = base_color[0] * ambient_light_color[0]; final_color[1] = base_color[1] * ambient_light_color[1]; final_color[2] = base_color[2] * ambient_light_color[2]; //flip normal if it doesn't f...
false
false
false
false
false
0
getSat(int r, int g, int b) { int rgbMin, rgbMax; rgbMin = rgbMax = r; if (g < rgbMin) { rgbMin = g; } else if (g > rgbMax) { rgbMax = g; } if (b < rgbMin) { rgbMin = b; } else if (b > rgbMax) { rgbMax = b; } return rgbMax - rgbMin; }
false
false
false
false
false
0
md_cluster_stop(struct mddev *mddev) { if (!md_cluster_ops) return; md_cluster_ops->leave(mddev); module_put(md_cluster_mod); }
false
false
false
false
false
0
cmd_http_timeout(CMD_ARGS) { struct http *hp; (void)cmd; (void)vl; CAST_OBJ_NOTNULL(hp, priv, HTTP_MAGIC); AN(av[1]); AZ(av[2]); hp->timeout = (int)(strtod(av[1], NULL) * 1000.0); }
false
false
false
false
false
0
cmdline_scan(int *argc, char ***argv) { GOptionContext* context; GError *error = NULL; gfm_version(); // Get rid of GTK+ Logging if need-be (GTK, GDK, GLib, libglade) #if !defined(_DEBUG) g_log_set_handler("Gtk", G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE | ...
false
false
false
false
false
0
buildYield (Node *node) { issue (new IFInstruction (node, opSTATEMENT)) ; IFNode *val = NULL ; // value to return // expression must be executed inside the current scope. It might throw an // exception if (node->left != NULL) { // expression to return? val = expres...
false
false
false
false
false
0
map_clear_int(buf, mode, local, abbr) buf_T *buf; /* buffer for local mappings */ int mode; /* mode in which to delete */ int local; /* TRUE for buffer-local mappings */ int abbr; /* TRUE for abbreviations */ { mapblock_T *mp, **mpp; int hash; int new_hash; validate...
false
false
false
false
false
0
baryBlend(double abc[3], const double co[3], const double abc0[3], const double abc1[3], const double abc2[3]) { unsigned int ii; for (ii=0; ii<3; ii++) { abc[ii] = co[0]*abc0[ii] + co[1]*abc1[ii] + co[2]*abc2[ii]; } return; }
false
false
false
false
false
0