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
robust_xmlEscape (xmlDocPtr doc, const std::string& value) { xmlChar* escaped = xmlEncodeEntitiesReentrant (doc, BAD_CAST value.c_str ()); std::string result((const char*)escaped); xmlFree (escaped); return result; }
false
false
false
false
false
0
dragMoveEvent(QDragMoveEvent* event) { QMouseEvent mouseEvent(QMouseEvent(QEvent::MouseMove, event->pos(), Qt::LeftButton, event->mouseButtons(), event->keyboardModifiers())); mouseMoveEvent(&mouseEvent); }
false
false
false
false
false
0
init_work() { int err = is_almost_full(source_stat()); if (err == 0) err = is_almost_full(target_stat()); if (err != 0) return err; ft_uoff source_used = source_stat().get_used(); ft_uoff target_used = target_stat().get_used(); ft_uoff work_total = source_used > target_used ? so...
false
false
false
false
false
0
on_contact_clicked (GtkWidget *tree_view, GdkEventButton *event, gpointer data) { GtkTreePath *path = NULL; GtkTreeIter iter; GtkTreeModel *model = NULL; if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (tree_view), (gint) event->x, (gint) event->y, &path, NULL, NULL, NULL)) { ...
false
false
false
false
false
0
gst_jpeg_dec_ensure_buffers (GstJpegDec * dec, guint maxrowbytes) { gint i; if (G_LIKELY (dec->idr_width_allocated == maxrowbytes)) return TRUE; /* FIXME: maybe just alloc one or three blocks altogether? */ for (i = 0; i < 16; i++) { dec->idr_y[i] = g_try_realloc (dec->idr_y[i], maxrowbytes); dec-...
false
false
false
false
false
0
snapVtx(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const { // snap to control points for (uint i = 0; i < iCP.size(); ++i) snapVertex(mouse, m * iCP[i], pos, bound); }
false
false
false
false
false
0
Zoom_set(int index) { Hide_cursor(); if (index<0) { /* Zoom 1:1 */ if (Main_magnifier_mode) Unselect_button(BUTTON_MAGNIFIER); } else { Change_magnifier_factor(index,1); if (!Main_magnifier_mode) Select_button(BUTTON_MAGNIFIER,1); Display_all_screen(); } Display_cursor();...
false
false
false
false
false
0
mgt_clean(islpci_private *priv) { int i; if (!priv->mib) return; for (i = 0; i < OID_NUM_LAST; i++) { kfree(priv->mib[i]); priv->mib[i] = NULL; } kfree(priv->mib); priv->mib = NULL; }
false
false
false
false
false
0
e_cal_backend_http_get_backend_property (ECalBackend *backend, const gchar *prop_name) { g_return_val_if_fail (prop_name != NULL, NULL); if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES)) { return g_strjoin ( "," CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS, ...
false
false
false
false
false
0
queuePush(struct queue* que, void* value){ if(que == NULL) return False; struct queueItem* item = (struct queueItem*)gcMalloc(sizeof(struct queueItem)); if(item == NULL){ Log("queue: Allocation error", ERROR, STACK); exit(intern); } item->value = value; item->next = NULL; if(que->start == NULL) qu...
false
false
false
false
false
0
pi_prot_format_store(struct config_item *item, const char *page, size_t count) { struct se_dev_attrib *da = to_attrib(item); struct se_device *dev = da->da_dev; bool flag; int ret; ret = strtobool(page, &flag); if (ret < 0) return ret; if (!flag) return count; if (!dev->transport->format_prot) { pr_e...
false
false
false
false
false
0
b64_2byte(struct convert_rock *rock, int c) { struct b64_state *s = (struct b64_state *)rock->state; char b = CHAR64(c); /* could just be whitespace, ignore it */ if (b == XX) return; switch (s->bytesleft) { case 0: s->codepoint = b; s->bytesleft = 3; break; case 3: convert_put...
false
false
false
false
false
0
tsignal(const int sig, void (*const handler)(int)) { struct sigaction sa; sa.sa_handler = handler; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; if (sigaction(sig, &sa, NULL) == -1) { perror("sigaction"); exit(2); } }
false
false
false
false
false
0
mindex_free(Mindex mdx) { if (!mindex_empty(mdx)) fprintf(stderr, "WARNING, mindex_free called with nonempty mindex.\n"); else { switch (mdx->index_type) { case FPA: zap_fpa_index(mdx->fpa); break; case LINEAR: break; case DISCRIM_WILD: case DISCRIM_BIND: discrim_deal...
false
false
false
false
false
0
clk_sys_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); switch (event) { case SND_SOC_DAPM_PRE_PMU: return configure_clock(codec); case SND_SOC_DAPM_...
false
false
false
false
false
0
inf_communication_group_get_method_for_connection(InfCommunicationGroup* grp, InfXmlConnection* conn) { gchar* network; const gchar* method; g_return_val_if_fail(INF_COMMUNICATION_IS_GROUP(grp), NULL); g_return_val_if_fail(INF_IS_XML_CONNECTION(conn), NULL); ...
false
false
false
false
false
0
console_intr(int (*getc)(void)) { int c; acquire(&input.lock); while((c = getc()) >= 0){ switch(c){ case C('P'): // Process listing. procdump(); break; case C('U'): // Kill line. while(input.e > input.w && input.buf[(input.e-1) % INPUT_BUF] != '\n'){ input.e--;...
false
false
false
false
false
0
doubleclick(File *f, Posn p1) { int c, i; Rune *r, *l; Posn p; if(p1 > f->b.nc) return; f->dot.r.p1 = f->dot.r.p2 = p1; for(i=0; left[i]; i++){ l = left[i]; r = right[i]; /* try left match */ p = p1; if(p1 == 0) c = '\n'; else c = filereadc(f, p - 1); if(strrune(l, c)){ if(clickmatch(f, ...
false
false
false
false
false
0
hybrid_conv_stop_input(HybridAccount *account, const gchar *buddy_id) { HybridBuddy *buddy; HybridChatWindow *chat; gchar *text; g_return_if_fail(account != NULL); g_return_if_fail(buddy_id != NULL); if (!(buddy = hybrid_blist_find_buddy(account, buddy_id))) { hybrid_d...
false
false
false
false
false
0
EnterAlias( n, nd ) register int n; nptr nd; { register int i; register nptr *tbl; i = AliasTblBucket( n ); if( i >= aliases.size ) IncreaseAliasTbl( i ); if( (tbl = aliases.bucket[ i ]) == NULL ) { register nptr *t, *t_end; tbl = (nptr *) Valloc( SIZEOF( nptr ) * ALI...
false
false
false
false
false
0
saveOrCancelDialog() { if ( ( !mSceneHasChanged ) || ( mGraphicsScene->items().size() == 0 ) ) return true; if ( !checkAllItems() ) return false; QMessageBox::StandardButton result = QMessageBox::question ( 0, "Save", "The scene has been modified. Would you like to save the current scene ?", QMessageBox::Ye...
false
false
false
false
false
0
close_singleton (void) { ACE_TRACE ("ACE_Proactor::close_singleton"); ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon, *ACE_Static_Object_Lock::instance ())); if (ACE_Proactor::delete_proactor_) { delete ACE_Proactor::proactor_; ACE_Proactor::proactor_ = 0; ACE_...
false
false
false
false
false
0
erath2(llong lower, llong upper, int print) { llong ret = 0; enumerate_bitset_precomp(); bucket_list* list = NULL; ret = presieve(&lower, upper, &list, CHUNK_SIZE, print); if (list == NULL) { return ret; } char* chunk = (char*)malloc(CHUNK_BYTES); if (chunk == NULL) {...
false
false
false
false
false
0
create_file(const char *name, umode_t mode, struct dentry *parent, struct dentry **dentry, const struct file_operations *fops, void *data) { int error; mutex_lock(&d_inode(parent)->i_mutex); *dentry = lookup_one_len(name, parent, strlen(name)); if (!IS_ERR(*dentry)) error = qibfs_mknod(d_inode(...
false
false
false
false
false
0
get_we_logging_tab(GtkBuilder *ui_builder, World *world) { GObject *panel; GObject *btnStart; panel = gtk_builder_get_object(ui_builder, "we_panel_logging"); if (world != default_world) { GtkWidget *image; /* FIXME: Someday it should be possible to do this directly in the XML file. */ btnS...
false
false
false
false
false
0
dccsend_connectfailed(struct dccproxy *p, int sock, int bad) { if (sock != p->sender_sock) { error("Unexpected socket %d in dccsend_connectfailed, expected %d", sock, p->sender_sock); net_close(&sock); return; } if (p->notify_func) p->notify_func(p->notify_data, p->notify_msg, ...
false
false
false
false
false
0
rt_tile_add(RendererTiles *rt, gint x, gint y) { PixbufRenderer *pr = rt->pr; ImageTile *it; it = rt_tile_new(x, y, rt->tile_width, rt->tile_height); if (it->x + it->w > pr->width) it->w = pr->width - it->x; if (it->y + it->h > pr->height) it->h = pr->height - it->y; rt->tiles = g_list_prepend(rt->tiles, it); ...
false
false
false
false
false
0
grab_entry(const char *const tn, TERMTYPE *const tp) { char filename[PATH_MAX]; int status = _nc_read_entry(tn, filename, tp); /* * If we have an entry, force all of the cancelled strings to null * pointers so we don't have to test them in the rest of the library. * (The terminfo compiler by...
false
false
false
false
false
0
replace_cursor_markers(GeanyEditor *editor, GString *pattern) { gssize cur_index = -1; gint i; GList *temp_list = NULL; gint cursor_steps = 0, old_cursor = 0; i = 0; while (1) { cursor_steps = utils_string_find(pattern, cursor_steps, -1, geany_cursor_marker); if (cursor_steps == -1) break; g_string_er...
false
false
false
false
false
0
gst_asf_demux_get_uint16 (guint8 ** p_data, guint64 * p_size) { guint16 ret; g_assert (*p_size >= 2); ret = GST_READ_UINT16_LE (*p_data); *p_data += sizeof (guint16); *p_size -= sizeof (guint16); return ret; }
false
false
false
false
false
0
dico_list_insert_sorted(struct dico_list *list, void *data) { if (!list) { errno = EINVAL; return 1; } return _dico_list_insert_sorted(list, data, list->comp); }
false
false
false
false
false
0
apol_config_get_var(const char *var, FILE * fp) { char line[APOL_LINE_SZ], t1[APOL_LINE_SZ], t2[APOL_LINE_SZ]; char *line_ptr = NULL; if (var == NULL || fp == NULL) { errno = EINVAL; return NULL; } rewind(fp); while (fgets(line, APOL_LINE_SZ, fp) != NULL) { if ((line_ptr = strdup(line)) == NULL) { retu...
false
false
false
false
false
0
snd_hdspm_proc_read_raydat(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct hdspm *hdspm = entry->private_data; unsigned int status1, status2, status3, i; unsigned int lock, sync; status1 = hdspm_read(hdspm, HDSPM_RD_STATUS_1); /* s1 */ status2 = hdspm_read(hdspm, HDSPM_RD_STATUS_2); /* ...
false
false
false
false
false
0
scsi_esp_intr(int irq, void *dev_id) { struct esp *esp = dev_id; unsigned long flags; irqreturn_t ret; spin_lock_irqsave(esp->host->host_lock, flags); ret = IRQ_NONE; if (esp->ops->irq_pending(esp)) { ret = IRQ_HANDLED; for (;;) { int i; __esp_interrupt(esp); if (!(esp->flags & ESP_FLAG_QUICKIRQ_CH...
false
false
false
false
false
0
attr_syntax_create( const char *attr_oid, char *const *attr_names, const char *attr_desc, const char *attr_superior, const char *mr_equality, const char *mr_ordering, const char *mr_substring, schemaext *extensions, const char *attr_syntax, int syntaxlength, unsigned long flags, struct asyntaxin...
false
false
false
false
false
0
GetParser(const string &name, std::ostream &os, bool null_parser) { if( null_parser ) { // use null parser return ParserPtr( new DataDumpParser(os) ); } // check for recognized database names else if( name == Contact::GetDBName() ) { return ParserPtr( new RecordParser<Contact, Store<Contact> > ( new St...
false
false
false
false
false
0
validAddress(Address *Addr, tsectype action) { FLTAddress ea; if (!convertAddressToFLTAddress(Addr, &ea)) return false; if (ea >= flt_shared->code_start) { if (ea >= flt_shared->data_start) { if (ea >= flt_shared->bss_start) { if (ea >= flt_shared->bss_end) { return false; } switch (action)...
false
false
false
false
false
0
setInput(size_t id, const String &input, size_t mrtIndex) { assert(id<OGRE_MAX_TEXTURE_LAYERS); mInputs[id] = InputTex(input, mrtIndex); }
false
false
false
false
false
0
_handle_signal_task_local(int fd, slurmd_job_t *job, uid_t uid) { int rc = SLURM_SUCCESS; int signal; int ltaskid; /* local task index */ debug("_handle_signal_task_local for job %u.%u", job->jobid, job->stepid); safe_read(fd, &signal, sizeof(int)); safe_read(fd, &ltaskid, sizeof(int)); debug3(" uid =...
false
false
false
false
false
0
saa7134_buffer_timeout(unsigned long data) { struct saa7134_dmaqueue *q = (struct saa7134_dmaqueue *)data; struct saa7134_dev *dev = q->dev; unsigned long flags; spin_lock_irqsave(&dev->slock, flags); /* try to reset the hardware (SWRST) */ saa_writeb(SAA7134_REGION_ENABLE, 0x00); saa_writeb(SAA7134_REGION_ENA...
false
false
false
false
false
0
LodePNG_chunk_check_crc(const unsigned char* chunk) /*returns 0 if the crc is correct, error code if it's incorrect*/ { unsigned length = LodePNG_chunk_length(chunk); unsigned CRC = LodePNG_read32bitInt(&chunk[length + 8]); unsigned checksum = Crc32_crc(&chunk[4], length + 4); /*the CRC is taken of the data and t...
false
false
false
false
false
0
prefs_template_key_pressed_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) { if (event && event->keyval == GDK_KEY_Escape) prefs_template_cancel_cb(NULL, NULL); else { GtkWidget *focused = gtkut_get_focused_child( GTK_CONTAINER(widget)); if (focused && GTK_IS_EDITABLE(focused)) { mod...
false
false
false
false
false
0
build_address(int t, struct aetags *ae, stringlist_t *sl, stringlist_t *pl) { test_t *ret = new_test(t); /* can be either ADDRESS or ENVELOPE */ assert((t == ADDRESS) || (t == ENVELOPE)); if (ret) { ret->u.ae.comptag = ae->comptag; ret->u.ae.relation=ae->relation; ret->u.ae.comparator=xstrdup(a...
false
false
false
false
false
0
write_ext_content_description_tag (const GstTagList * taglist, const gchar * tag, gpointer user_data) { const gchar *asftag = gst_asf_get_asf_tag (tag); GValue value = { 0 }; guint type; GstAsfExtContDescData *data = (GstAsfExtContDescData *) user_data; if (asftag == NULL) return; if (!gst_tag_lis...
false
false
false
false
false
0
get_ols_vcv (gretl_matrix *V, double *s2) { if (gretl_invert_general_matrix(V)) { gretl_matrix_print(V, "get_ols_vcv: inversion failed"); return 1; } if (s2 != NULL) { gretl_matrix_multiply_by_scalar(V, *s2); } return 0; }
false
false
false
false
false
0
expkey_alloc(void) { struct svc_expkey *i = kmalloc(sizeof(*i), GFP_KERNEL); if (i) return &i->h; else return NULL; }
false
false
false
false
false
0
e1000_setup_fiber_serdes_link_82540(struct e1000_hw *hw) { struct e1000_mac_info *mac = &hw->mac; s32 ret_val = E1000_SUCCESS; DEBUGFUNC("e1000_setup_fiber_serdes_link_82540"); switch (mac->type) { case e1000_82545_rev_3: case e1000_82546_rev_3: if (hw->phy.media_type == e1000_media_type_internal_serdes) { ...
false
false
false
false
false
0
wrapped_row(int row) { if (!mContinuousWrap || row < 0 || row > mNVisibleLines) return row; return buffer()->count_lines(mFirstChar, mLineStarts[row]); }
false
false
false
false
false
0
dib8096p_tuner_sleep(struct dvb_frontend *fe, int onoff) { struct dib8000_state *state = fe->demodulator_priv; u16 en_cur_state; dprintk("sleep dib8096p: %d", onoff); en_cur_state = dib8000_read_word(state, 1922); /* LNAs and MIX are ON and therefore it is a valid configuration */ if (en_cur_state > 0xff) st...
false
false
false
false
false
0
dirname(char *path) { static char dir[MAXPATHLEN]; char *cp; if (path[strlen(path)-1] == '/') return path; else { strncpy(dir, path, sizeof(dir)); dir[sizeof(dir)-1] = '\0'; for (cp = dir+strlen(dir); cp > dir && *(cp-1) != '/'; cp--) ; *cp = NUL; ...
false
false
false
false
false
0
gtk_plot_real_get_point(GtkWidget *widget, gint x, gint y, gdouble *px, gdouble *py) { GtkPlot *plot; gdouble xx, yy; gdouble xp, yp, width, height; gdouble rx, ry; plot = GTK_PLOT(widget); xp = plot->internal_allocation.x; yp = plot->inter...
false
false
false
false
false
0
disconnect_service(DBusConnection *conn, DBusMessage *msg, void *user_data) { struct connman_service *service = user_data; int err; DBG("service %p", service); reply_pending(service, ECONNABORTED); service->ignore = TRUE; set_reconnect_state(service, FALSE); err = __connman_service_disconnect(service);...
false
false
false
false
false
0
left_neighbour_leaf(GBT_TREE *node) { if (node) { GBT_TREE *father = node->father; while (father) { if (father->rightson==node) { node = rightmost_leaf(father->leftson); nt_assert(node->is_leaf); if (!node->gb_node) { // Zombie ...
false
false
false
false
false
0
attach_item(struct linked_server *ls, struct item *item) { struct world *world = &ls->connection->client.world; item->attach_sequence = world->item_attach_sequence; if (item->packet_container_update.cmd == PCK_ContainerUpdate) { /* attach parent first */ uint32_t parent_serial ...
false
false
false
false
false
0
gst_ts_demux_push (MpegTSBase * base, MpegTSPacketizerPacket * packet, GstMpegTsSection * section) { GstTSDemux *demux = GST_TS_DEMUX_CAST (base); TSDemuxStream *stream = NULL; GstFlowReturn res = GST_FLOW_OK; if (G_LIKELY (demux->program)) { stream = (TSDemuxStream *) demux->program->streams[packet->p...
false
false
false
false
false
0
xml_wispr_parser_callback(const char *str, gpointer user_data) { struct connman_wispr_portal_context *wp_context = user_data; GMarkupParseContext *parser_context = NULL; gboolean result; DBG(""); parser_context = g_markup_parse_context_new(&xml_wispr_parser_handlers, G_MARKUP_TREAT_CDATA_AS_TEXT, &(wp_...
false
false
false
false
false
0
H5FD_family_sb_size(H5FD_t UNUSED *_file) { hsize_t ret_value = 0; /*size of header*/ FUNC_ENTER_NOAPI(H5FD_family_sb_size, UFAIL) /* 8 bytes field for the size of member file size field should be * enough for now. */ ret_value += 8; done: FUNC_LEAVE_NOAPI(ret_value) }
false
false
false
false
false
0
FindRuleTable(std::string staTableName) { Symbol psymTableName = g_cman.SymbolTable()->FindSymbol(staTableName); if (!psymTableName) return NULL; return FindRuleTable(psymTableName); }
false
false
false
false
false
0
odf_write_interpolation_attribute (GnmOOExport *state, G_GNUC_UNUSED GOStyle const *style, GogObject const *series) { gchar *interpolation = NULL; g_object_get (G_OBJECT (series), "interpolation", &interpolation, NULL); if (interpolation != NULL) { if (0 == strcmp (interpolation, "linear"))...
false
false
false
false
false
0
ReportSettings( thread_Settings *agent ) { if ( isSettingsReport( agent ) ) { /* * Create in one big chunk */ ReportHeader *reporthdr = malloc( sizeof(ReportHeader) ); if ( reporthdr != NULL ) { ReporterData *data = &reporthdr->report; data->inf...
false
false
false
false
false
0
compareResults(PIX *pixs, PIX *pixt1, PIX *pixt2, l_int32 count1, l_int32 count2, const char *descr) { l_int32 ret, same; ret = 0; pixEqual(pixs, pixt1, &same); if (!same) { fprintf(stderr...
false
false
false
false
false
0
read_idle_cb (gpointer data) { GVfsJobRead *job = data; int fd; ssize_t res; fd = GPOINTER_TO_INT (job->handle); res = read (fd, job->buffer, job->bytes_requested); if (res == -1) { int errsv = errno; g_vfs_job_failed (G_VFS_JOB (job), G_IO_ERROR, g_io_error_from_errno (errsv), "Er...
false
false
false
false
false
0
cb_auto_res_control(GkrellmChart *cp, guint option, GtkWidget* widget) { GkrellmChartconfig *cf; gint grid_res; gboolean active; cf = cp->config; switch (option) { case 0: cp->maxval_auto_base = 0; cp->maxval_peak = 0; break; case 1: active = GTK_CHECK_MEN...
false
false
false
false
false
0
onCmdShowCurrent(FXObject*,FXSelector,void*){ if (!source->findCurrent(tracklist,GMPlayerManager::instance()->getSource())){ if (source->hasCurrentTrack(GMPlayerManager::instance()->getSource())){ refresh(); } else { GMPlayerManager::instance()->getSourceView()->setSource(GMPlayerManager::in...
false
false
false
false
false
0
intel_ddi_init_hdmi_connector(struct intel_digital_port *intel_dig_port) { struct intel_connector *connector; enum port port = intel_dig_port->port; connector = intel_connector_alloc(); if (!connector) return NULL; intel_dig_port->hdmi.hdmi_reg = DDI_BUF_CTL(port); intel_hdmi_init_connector(intel_dig_port, co...
false
false
false
false
false
0
display_report(short num) { if(bitree_is_eob(bitree_root(&tree))) { printf("No variables declared.\n"); return; } switch(num) { case 1: report1_header(); report1_data(); break; case 2: report2_header(); report2_data(); break; default: fprintf(stderr, "Invalid report type: %d\n", n...
false
false
false
false
false
0
contains(const Loop *L) const { // BBs that are not part of any loop are element of the Loop // described by the NULL pointer. This loop is not part of any region, // except if the region describes the whole function. if (L == 0) return getExit() == 0; if (!contains(L->getHeader())) return false; ...
false
false
false
false
false
0
WordListSet(int n, const char *wl) { WordList *wordListN = 0; switch (n) { case 0: wordListN = &keywords; break; case 1: wordListN = &keywords2; break; case 2: wordListN = &keywords3; break; case 3: wordListN = &keywords4; break; case 4: wordListN = &ppDefinitions; break; } int firstModific...
false
false
false
false
false
0
nego_recv(rdpTransport* transport, STREAM* s, void* extra) { uint8 li; uint8 type; rdpNego* nego = (rdpNego*) extra; tpkt_read_header(s); li = tpdu_read_connection_confirm(s); if (li > 6) { /* rdpNegData (optional) */ stream_read_uint8(s, type); /* Type */ switch (type) { case TYPE_RDP_NEG_RSP: ...
false
false
false
false
false
0
special_char(unsigned char c1) { return !c1 || c1 == '*' || c1 == '[' || c1 == '?'; }
false
false
false
false
false
0
gr_ubox(int left,int top,int right,int bot) { if (TYPE==BM_LINEAR) gr_ubox0( left, top, right, bot ); else gr_ubox12( left, top, right, bot ); }
false
false
false
false
false
0
on_stage_destroyed (ClutterStage * stage, ClutterEvent * event, gpointer user_data) { ClutterGstSource *gst_source = user_data; ClutterGstVideoSinkPrivate *priv = gst_source->sink->priv; g_mutex_lock (&gst_source->buffer_lock); clutter_actor_hide (CLUTTER_ACTOR (stage)); clutter_actor_remove_child (CLUT...
false
false
false
false
false
0
j_find_agent_by_type(char *agent_type) { Agent *agent = NULL; GList *list = agent_list; for (list = agent_list; list; list = list->next) { agent = list->data; if (!strcmp(agent->type, agent_type)) break; } return (agent); }
false
false
false
false
false
0
flush_delayed_errors( struct gl_context *ctx ) { char s[MAX_DEBUG_MESSAGE_LENGTH]; if (ctx->ErrorDebugCount) { _mesa_snprintf(s, MAX_DEBUG_MESSAGE_LENGTH, "%d similar %s errors", ctx->ErrorDebugCount, _mesa_lookup_enum_by_nr(ctx->ErrorValue)); output_if_deb...
true
true
false
false
false
1
unprojectPoint(const GeometryBuffer& buff, const Vector2& p_in, Vector2& p_out) const { if (!d_matrixValid) updateMatrix(); const OgreGeometryBuffer& gb = static_cast<const OgreGeometryBuffer&>(buff); const Ogre::Real midx = d_area.getWidth() * 0.5f; const...
false
false
false
false
false
0
ungetch(int c) { if (c < 0) return; assert(getch_line_pos > 0); --getch_line_pos; assert(c == getch_line_buffer[getch_line_pos]); }
false
false
false
false
false
0
GC_init_parallel(void) { if (parallel_initialized) return; parallel_initialized = TRUE; /* GC_init() calls us back, so set flag first. */ if (!GC_is_initialized) GC_init(); /* Initialize thread local free lists if used. */ # if defined(THREAD_LOCAL_ALLOC) LOCK(); GC_init_thr...
false
false
false
false
true
1
isEmpty() const { if (!m_usingTable) return !m_singleEntryKey; else return !m_u.table->keyCount; }
false
false
false
false
false
0
radeon_resume(struct drm_device *dev) { drm_radeon_private_t *dev_priv = dev->dev_private; if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) return 0; /* Restore interrupt registers */ if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RS600) RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_r...
false
false
false
false
false
0
gnutls_cipher_get_block_size (gnutls_cipher_algorithm_t algorithm) { size_t ret = 0; GNUTLS_ALG_LOOP (ret = p->blocksize); return ret; }
false
false
false
false
false
0
mangle_type_check (ostream &out) { const char *str = _str.c_str (); while (*str) { switch (*str) { case ':' : out << "___S___"; break; case '%' : out << "___A___"; break; case '(' : out << "___L___"; break; case ')' : out << "___R___"; break; case ',': out << "___C___"; break; ...
false
false
false
false
false
0
e_operation_pool_new (guint max_threads, GFunc thread_func, gpointer user_data) { EOperationPool *pool; GThreadPool *thread_pool; GError *error = NULL; g_return_val_if_fail (thread_func != NULL, NULL); thread_pool = g_thread_pool_new (thread_func, user_data, max_thread...
false
false
false
false
false
0
slotGameLoadRandom() { if(databaseInfo()->filter()->count()) { int random = rand() % databaseInfo()->filter()->count(); gameLoad(databaseInfo()->filter()->indexToGame(random)); m_gameList->setFocus(); } }
false
false
false
false
false
0
guc_create_log(struct intel_guc *guc) { struct drm_i915_private *dev_priv = guc_to_i915(guc); struct drm_i915_gem_object *obj; unsigned long offset; uint32_t size, flags; if (i915.guc_log_level < GUC_LOG_VERBOSITY_MIN) return; if (i915.guc_log_level > GUC_LOG_VERBOSITY_MAX) i915.guc_log_level = GUC_LOG_VERB...
false
false
false
false
false
0
odf_preparse_table_start (GsfXMLIn *xin, xmlChar const **attrs) { OOParseState *state = (OOParseState *)xin->user_state; state->pos.eval.col = 0; state->pos.eval.row = 0; state->extent_data.col = 0; state->extent_data.row = 0; state->object_name = NULL; for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2...
false
false
false
false
false
0
debug_save_buffer(char* pstrFilename, char* pstrBuffer, int iSize) { FILE* pFile; pFile = fopen(pstrFilename, "wb"); if (pFile) { fwrite(pstrBuffer, 1, iSize, pFile); fclose(pFile); } }
false
false
false
false
false
0
IsSolComment(Accessor &styler, int pos, int len) { char c; if(len > 0) { c = styler[pos]; if(c == '`') return true; if(len > 1) { if(c == '/') { c = styler[pos + 1]; if(c == '/') return true; if(c == '*') return true; } } } re...
false
false
false
false
false
0
fimc_request_dst_buffers (Fimc * fimc) { struct v4l2_requestbuffers requestbuffers; if (fimc->has_dst_buffers) { GST_ERROR ("Already have dst buffers"); return -1; } fimc->has_dst_buffers = 0; memset (&requestbuffers, 0, sizeof (requestbuffers)); requestbuffers.type = V4L2_BUF_TYPE_VIDEO_CAPTURE...
false
false
false
false
false
0
loadImage(const FXString & filename) { FXImage * img=NULL; const FXString ext = FXPath::extension(filename); FXFileStream store; if(store.open(filename,FXStreamLoad,65536)){ if(comparecase(FXPNGImage::fileExt,ext)==0){ img=new FXPNGImage(app); } else if(comparecase(FXJPGImage::fileExt,ext)==...
false
false
false
false
false
0
remove_group_line(grouplist *eg) { LList *contacts; if (!eg->list_item) return; for (contacts = eg->members; contacts; contacts = contacts->next) { struct contact *ec = contacts->data; if (ec->list_item) remove_contact_line(ec); } gtk_tree_store_remove(contact_list_store, eg->list_item); eg->list_item...
false
false
false
false
false
0
aoeblk_open(struct block_device *bdev, fmode_t mode) { struct aoedev *d = bdev->bd_disk->private_data; ulong flags; if (!virt_addr_valid(d)) { pr_crit("aoe: invalid device pointer in %s\n", __func__); WARN_ON(1); return -ENODEV; } if (!(d->flags & DEVFL_UP) || d->flags & DEVFL_TKILL) return -ENODEV; ...
false
false
false
false
false
0
gst_frei0r_mixer_sink_event (GstCollectPads * pads, GstCollectData * cdata, GstEvent * event, GstFrei0rMixer * self) { gboolean ret = TRUE; switch (GST_EVENT_TYPE (event)) { case GST_EVENT_CAPS: { GstCaps *caps; gst_event_parse_caps (event, &caps); ret = gst_frei0r_mixer_set_caps (sel...
false
false
false
false
false
0
qlcnic_sriov_pf_cfg_guest_vlan_cmd(struct qlcnic_bc_trans *tran, struct qlcnic_cmd_args *cmd) { struct qlcnic_vf_info *vf = tran->vf; struct qlcnic_adapter *adapter = vf->adapter; struct qlcnic_vport *vp = vf->vp; int err = -EIO; u8 op; if (vp->vlan_mode != QLC_GUEST_VLAN_MODE) { cmd->rsp.arg[0] |...
false
false
false
false
false
0
aurora_rc_style_merge (GtkRcStyle *dest, GtkRcStyle *src) { AuroraRcStyle *dest_w, *src_w; AuroraRcFlags flags; parent_class->merge (dest, src); if (!AURORA_IS_RC_STYLE (src)) return; src_w = AURORA_RC_STYLE (src); dest_w = AURORA_RC_STYLE (dest); flags = (~dest_w->flags) & src_w->flags; if (...
false
false
false
false
false
0
gnc_split_reg2_balancing_entry (GNCSplitReg2 *gsr, Account *account, time64 statement_date, gnc_numeric balancing_amount) // this works { GncTreeViewSplitReg *view; Transaction *transaction; Split *split; view = gnc_ledger_display2_get_split_view_register (gsr->ledger); ...
false
false
false
false
false
0
get_view_file(c) int c; { int len = 0; char_u *p, *s; char_u *retval; char_u *sname; if (curbuf->b_ffname == NULL) { EMSG(_(e_noname)); return NULL; } sname = home_replace_save(NULL, curbuf->b_ffname); if (sname == NULL) return NULL; /* * We want a file name witho...
false
false
false
false
false
0
createEmptyIntervalFrom(unsigned OldReg) { unsigned VReg = MRI.createVirtualRegister(MRI.getRegClass(OldReg)); if (VRM) { VRM->setIsSplitFromReg(VReg, VRM->getOriginal(OldReg)); } LiveInterval &LI = LIS.createEmptyInterval(VReg); return LI; }
false
false
false
false
false
0
operator= (const CallID& a) { _id.resize(a._id.length()); for (u_int i = 0; i < _id.length(); i++) _id[i] = a._id[i]; }
false
false
false
false
false
0
hmdf_get_mtg_table(const Block *block_head) { Mtg_table *mtg_ptr; Boolean found = FALSE; int _mtg_id; const Block *bptr; if (!block_head) { return NULL; } else if (!block_head->outer && block_head->hmdf) { bptr = block_head; } else { for (bptr = block_head->outer; bptr && !bptr->...
false
false
false
true
false
1
output_pipe_tryopen(struct output_s *o) { o->pipe.fd=open(o->pipe.filename, O_NONBLOCK|O_WRONLY); if (o->pipe.fd >= 0) { logwrite(LOG_INFO, "stream_pipe: starting to write to %s - got reader", o->pipe.filename); o->receiver++; return 1; } if (errno == ENXIO) return 0; logwrite(LOG_ERROR, "stream_pipe: f...
false
false
false
false
true
1