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
_clutter_event_set_pointer_emulated (ClutterEvent *event, gboolean is_emulated) { if (!is_event_allocated (event)) return; ((ClutterEventPrivate *) event)->is_pointer_emulated = !!is_emulated; }
false
false
false
false
false
0
gnl_object_ghost_pad_set_target (GnlObject * object, GstPad * ghost, GstPad * target) { GnlPadPrivate *priv = gst_pad_get_element_private (ghost); g_return_val_if_fail (priv, FALSE); if (target) GST_DEBUG_OBJECT (object, "setting target %s:%s on ghostpad", GST_DEBUG_PAD_NAME (target)); else ...
false
false
false
false
false
0
tp_vardict_get_boolean (GVariant *variant, const gchar *key, gboolean *valid) { gboolean ret; g_return_val_if_fail (variant != NULL, FALSE); g_return_val_if_fail (key != NULL, FALSE); g_return_val_if_fail (g_variant_is_of_type (variant, G_VARIANT_TYPE_VARDICT), FALSE); if (!g_variant_lookup (variant...
false
false
false
false
false
0
NetA_distance_from_points(dglGraph_s * graph, struct ilist *from, int *dst, dglInt32_t ** prev) { int i, nnodes; dglHeap_s heap; nnodes = dglGet_NodeCount(graph); dglEdgesetTraverser_s et; for (i = 1; i <= nnodes; i++) { dst[i] = -1; prev[i] = NULL; } dglHeapInit(&heap); f...
false
false
false
false
false
0
r8712_bb_reg_read(struct _adapter *pAdapter, u16 offset) { u8 shift = offset & 0x0003; /* 4 byte access */ u16 bb_addr = offset & 0x0FFC; /* 4 byte access */ u32 bb_val = 0; struct IOCMD_STRUCT iocmd; iocmd.cmdclass = IOCMD_CLASS_BB_RF; iocmd.value = bb_addr; iocmd.index = IOCMD_BB_READ_IDX; bb_val = fw_iocmd_...
false
false
false
false
false
0
PrintSelf(ostream& os, vtkIndent indent) { this->Superclass::PrintSelf(os, indent); os << indent << "FileName: " << (this->FileName? this->FileName:"(none)") << "\n"; if(this->ByteOrder == vtkXMLWriter::BigEndian) { os << indent << "ByteOrder: BigEndian\n"; } else { os << indent << "Byt...
false
false
false
false
false
0
xmpp_account_tooltip(HybridAccount *account, HybridTooltipData *tip_data) { XmppStream *stream; gchar *status; stream = hybrid_account_get_protocol_data(account); status = g_strdup_printf("[%s] %s", hybrid_get_presence_name(account->state), ...
false
false
false
false
false
0
Evaluate( const Hypothesis& hypo, const FFState* prev_state, ScoreComponentCollection* out) const { const DistortionState_traditional* prev = static_cast<const DistortionState_traditional*>(prev_state); const float distortionScore = CalculateDistortionScore( hypo, ...
false
false
false
false
false
0
light_filter_push( int objnum, vec3d *pos, float rad ) { int i; light *l; if ( Lighting_off ) return 0; light_filter_reset(); int n1,n2; n1 = Num_light_levels-1; n2 = Num_light_levels; Num_light_levels++; Assert( Num_light_levels < MAX_LIGHT_LEVELS ); Num_relevent_lights[n2] = 0; for (i=0; i<Num_releven...
false
false
false
false
false
0
seq_rank(unsigned char *bwt, int **sidx, int blocksize, int idx, char c, const unsigned char * lookup) { int x, i; // First we look up the appropriate block prefix sum x = sidx[idx/blocksize][c]; // Now we iterate through the block /* unoptimized version */ //for (i = 0; i < idx % blocksize; i ++) { // if...
false
false
false
false
false
0
cal_backend_store_has_component (ECalBackendStore *store, const gchar *uid, const gchar *rid) { gboolean ret_val = FALSE; FullCompObject *obj = NULL; g_rw_lock_reader_lock (&store->priv->lock); obj = g_hash_table_lookup (store->priv->comp_uid_hash,...
false
false
false
false
false
0
__heap_open(dbp, ip, txn, name, base_pgno, flags) DB *dbp; DB_THREAD_INFO *ip; DB_TXN *txn; const char *name; db_pgno_t base_pgno; u_int32_t flags; { HEAP *h; db_pgno_t npgs; int ret; h = (HEAP *)dbp->heap_internal; COMPQUIET(name, NULL); ret = __heap_read_meta(dbp, ip, txn, base_pgno, flags); if (h->gb...
false
false
false
false
false
0
check_app_exited() { ACTIVE_TASK* atp; bool found = false; #ifdef _WIN32 unsigned long exit_code; unsigned int i; for (i=0; i<active_tasks.size(); i++) { atp = active_tasks[i]; if (!atp->process_exists()) continue; if (GetExitCodeProcess(atp->process_handle, &exit_code)) { ...
false
false
false
false
false
0
on_file_monitor_changed (GFileMonitor *monitor, GFile *file, GFile *other_file, GFileMonitorEvent event, AnjutaCommand *command) { /* Handle created and modified events just to cover all possible cases. * Sometimes git does some odd things... */ if (event == G_FILE_MONITOR_EVENT_CHANGED ||...
false
false
false
false
false
0
glade_gtk_icon_factory_set_property (GladeWidgetAdaptor *adaptor, GObject *object, const gchar *property_name, const GValue *value) { if (strcmp (property_name, "sources") == 0) { glade_gtk_icon_factory_set_sources (object, value); } else /* Chain Up */ GWA_GET_CLASS (G_TYPE_OBJECT...
false
false
false
false
false
0
feature_node_free(GtGenomeNode *gn) { GtFeatureNode *fn = gt_feature_node_cast(gn); gt_str_delete(fn->seqid); gt_str_delete(fn->source); gt_tag_value_map_delete(fn->attributes); if (fn->children) { GtDlistelem *dlistelem; for (dlistelem = gt_dlist_first(fn->children); dlistelem != NULL; ...
false
false
false
false
false
0
_e_mod_kbd_cb_animate(void *data __UNUSED__) { double t, v; t = (ecore_loop_time_get() - _e_illume_kbd->start); if (t > _e_illume_kbd->len) t = _e_illume_kbd->len; if (_e_illume_kbd->len > 0.0) { v = (t / _e_illume_kbd->len); v = (1.0 - v); v = (v * v * v * v); v = (1...
false
false
false
false
false
0
ipoib_cm_create_srq(struct net_device *dev, int max_sge) { struct ipoib_dev_priv *priv = netdev_priv(dev); struct ib_srq_init_attr srq_init_attr = { .srq_type = IB_SRQT_BASIC, .attr = { .max_wr = ipoib_recvq_size, .max_sge = max_sge } }; priv->cm.srq = ib_create_srq(priv->pd, &srq_init_attr); if (IS_...
false
false
false
false
false
0
on_button_color_set() { Gdk::Color _color = colorBt->get_color(); m_line_color = _color.to_string(); }
false
false
false
false
false
0
pv_evite_element(fp, type_element) FILE *fp; int type_element; { register int retour; hinfo_type infobuf; int error = FALSE; char poubelle[TRASHSIZE]; char *texte; static char *name[] = { "Illegal type name!", "Unable to parse aref (array of subcells)", "Unable to ...
false
false
false
false
true
1
store_pwm_enable(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { SETUP_STORE_DATA_PARAM(dev, attr); long reqval; u8 currval, config, altbit, newval, minoff = 255; if (kstrtol(buf, 10, &reqval)) return -EINVAL; switch (reqval) { case 0: newval = 0x04; break; cas...
false
false
false
false
false
0
ff_h264_decode_sei(H264Context *h){ MpegEncContext * const s = &h->s; while(get_bits_count(&s->gb) + 16 < s->gb.size_in_bits){ int size, type; type=0; do{ type+= show_bits(&s->gb, 8); }while(get_bits(&s->gb, 8) == 255); size=0; do{ size+...
false
false
false
false
false
0
DIMSE_dumpMessage(OFString &str, T_DIMSE_N_CreateRQ &msg, enum DIMSE_direction dir, DcmItem *dataset, T_ASC_PresentationContextID presID) { OFOStringStream stream; const char *uid = dcmFindNameOfUID(msg.AffectedSOPClassUID); DIMSE_dumpMessage_start(str, dir); stream << "Message Type : ...
false
false
false
false
false
0
collect_subexpression_of_dosum_sum(Quadruple *qr, Quadruple *top, int ope_num) { int total, count; Quadruple *qpt; Operand **temparray; Operand **tmparytmp; total=0; total += count_temp_in_operand(qr->op[ope_num]); if (total==0) { return; } tem...
false
false
false
false
false
0
parse_data (Call *c, char **bufp, size_t *buf_lenp) { size_t bytes_needed, buf_len = *buf_lenp; Conn *s = c->conn; char *buf = *bufp; struct iovec iov; Any_Type arg; bytes_needed = (s->content_length - c->reply.content_bytes); if (buf_len > bytes_needed) buf_len = bytes_needed; iov.iov_base = (ca...
false
false
false
false
false
0
gncBillTermEqual(const GncBillTerm *a, const GncBillTerm *b) { if (a == NULL && b == NULL) return TRUE; if (a == NULL || b == NULL) return FALSE; g_return_val_if_fail(GNC_IS_BILLTERM(a), FALSE); g_return_val_if_fail(GNC_IS_BILLTERM(b), FALSE); if (g_strcmp0(a->name, b->name) != 0) { PW...
false
false
false
false
false
0
substate2str(int ind) { char *tmp; switch (ind) { case SUBSTATE_UNSET: return "SUBSTATE_UNSET"; case SUBSTATE_OFFHOOK: return "SUBSTATE_OFFHOOK"; case SUBSTATE_ONHOOK: return "SUBSTATE_ONHOOK"; case SUBSTATE_RINGOUT: return "SUBSTATE_RINGOUT"; case SUBSTATE_RINGIN: return "SUBSTATE_RINGIN"; case SUBS...
false
false
false
false
false
0
obj2cmd (void *obj) { static char buf[32]; switch (AGTYPE(obj)) { case AGRAPH: sprintf(buf,"graph%p",obj); break; case AGNODE: sprintf(buf,"node%p",obj); break; case AGINEDGE: case AGOUTEDGE: sprintf(buf,"edge%p",obj); break; } return buf; }
false
false
false
false
false
0
dhcpv6_recv_rebind(struct dhcpv6_packet *req) { struct dhcpv6_pd *pd = req->pd; if (!req->clientid) { log_ppp_error("dhcpv6: no Client-ID option\n"); return; } if (req->serverid) { log_ppp_error("dhcpv6: unexcpected Server-ID option\n"); return; } if (!pd->clientid) { pd->clientid = _malloc(sizeof(st...
false
true
false
false
false
1
ntree_alignment(struct ntree_data* ntree_data) { int i; ntree_data->profile = malloc(sizeof(float*)*numprofiles); for ( i = 0;i< numprofiles;i++){ ntree_data->profile[i] = 0; } ntree_data->map = malloc(sizeof(int*)*numprofiles); for ( i = 0;i < numprofiles;i++){ ntree_data->map[i] = 0; } ntree_data = al...
false
true
false
false
true
1
list_pop(struct list_head *lh) { struct list_head *r = lh->next; BUG_ON(!r); list_del_init(r); return r; }
false
false
false
false
false
0
R3Intersects(const R3Span& span, const R3Triangle& triangle, R3Point *hit_point1, RNScalar *hit_t1) { // Find intersection of span and plane R3Point p; RNScalar t; switch (R3Intersects(span, triangle.Plane(), &p, &t)) { case RN_NULL_CLASS_ID: // Span does not intersect triangle plane return R...
false
false
false
false
false
0
genrtl_decl_stmt (tree t) { tree decl; emit_line_note (input_location); decl = DECL_STMT_DECL (t); /* If this is a declaration for an automatic local variable, initialize it. Note that we might also see a declaration for a namespace-scope object (declared with `extern'). We don't have to handle...
false
false
false
false
false
0
LogBufferLineToFile(char *LogLine, tLogConfiguration *configuration, int *OutputBufferChars) { char buffer[MAX_LOG_LINE_LENGTH]; int output_chars; /* No configuration is bad. */ if (configuration == NULL) { // [Temp removal] DirectErrorMessage(GOGO_STR_NO_CONFIG_CANNOT_LOG_TO_FILE); *OutputBufferChars ...
false
false
false
false
true
1
get_value(DbTreeModel& model, int column, int row) { fill_values_if_necessary(model, row); type_vec_values::const_iterator iterFind = m_db_values.find(column); if(iterFind != m_db_values.end()) return iterFind->second; else { std::cout << "debug: " << G_STRFUNC << ": column not found." << std::endl; ...
false
false
false
false
false
0
SetReputation(FactionEntry const* factionEntry, int32 standing, bool incremental) { // Used by Eluna sEluna->OnReputationChange(m_player, factionEntry->ID, standing, incremental); bool res = false; // if spillover definition exists in DB if (const RepSpilloverTemplate* repTemplate = sObjectMgr.GetR...
false
false
false
false
false
0
addChildren(const QVector<CategoryItem *> &children) { d->m_Children.append(children.toList()); for(int i=0; i<children.count(); ++i) children.at(i)->setParent(this); }
false
false
false
false
false
0
gl_object_editor_set_text_color (glObjectEditor *editor, gboolean merge_flag, glColorNode *text_color_node) { gl_debug (DEBUG_EDITOR, "START"); if (text_color_node == NULL) { return; } g_signal_handlers_block_by_func (G_OBJECT (edito...
false
false
false
false
false
0
plugin_register_data (GModule *handle, gchar *function, PLUGIN_DATA_DIRECTION dir) { PLUGIN_DATA * data; plugin_datafunc datafunc; void *temp; gpointer *dataptr; /* Stupid hack for Gmodule */ temp = (void *)&datafunc; dataptr = (gpointer *)temp; if (!g_module_symbol(handle, functio...
false
false
false
false
false
0
decode_dc_progressive(MJpegDecodeContext *s, DCTELEM *block, int component, int dc_index, int16_t *quant_matrix, int Al) { int val; s->dsp.clear_block(block); val = mjpeg_decode_dc(s, dc_index); if (val == 0xffff) { av_log(s->avctx, AV_LOG_ERROR, "error dc\n"); ...
false
false
false
false
false
0
check_line_hdr(void) { int i, rc = FALSE; /* Get number of options entered on the command line */ if (get_activity_nr(act, AO_SELECTED, COUNT_OUTPUTS) > 1) return TRUE; for (i = 0; i < NR_ACT; i++) { if (IS_SELECTED(act[i]->options)) { /* Special processing for activities using a bitmap */ if (act[i]->...
false
false
false
false
false
0
kdtree_update_funcs(kdtree_t* kd) { KD_DISPATCH(kdtree_update_funcs, kd->treetype,, (kd)); }
false
false
false
false
false
0
write_exif_undefined_tag_from_taglist (GstExifWriter * writer, const GstTagList * taglist, const GstExifTagMatch * exiftag) { const GValue *value; GstMapInfo info; guint8 *data = NULL; gsize size = 0; gint tag_size = gst_tag_list_get_tag_size (taglist, exiftag->gst_tag); GstSample *sample = NULL; GstB...
false
false
false
false
false
0
doPrintBNL() { time_t ts; int tsint; char *tsstr; int i, j; char addrstr[256]; struct bnl_record_subnet csub; if(loadBNL() != 0) return 1; ts = ntohl(cur_bnlhdr->timestamp); tsint = ts; tsstr = ctime(&ts); if(tsstr[strlen(tsstr) - 1] == '\n') tsstr[strlen(tsstr) - 1] = 0; printf("Timestamp: %d (%s)\n", tsin...
false
false
false
false
false
0
PlaceObjectAfter(Widget w, Widget after) #else static void PlaceObjectAfter(w, after) Widget w; Widget after; #endif { XmtLayoutConstraintsPart *c = LayoutConstraintsRec(w); XmtLayoutConstraintsPart *p = LayoutConstraintsRec(after); XmtLayoutConstraintsPart *n; Widget container = p->in ? p->in : ((XmtL...
false
false
false
false
false
0
_step_state_validate(char *config, void **gres_data, slurm_gres_context_t *context_ptr) { int rc; uint32_t gres_cnt; rc = _job_config_validate(config, &gres_cnt, context_ptr); if ((rc == SLURM_SUCCESS) && (gres_cnt > 0)) { gres_step_state_t *gres_ptr; gres_ptr = xmalloc(sizeof(gres_step_state_t)); gres_p...
false
false
false
false
false
0
_n_long_tap_test_reset(Gesture_Info *gesture) { Eina_List *l; Pointer_Event *p; Long_Tap_Type *st; EINA_SAFETY_ON_NULL_RETURN(gesture); if (!gesture->data) return; st = gesture->data; EINA_LIST_FOREACH (st->touched, l, p) free(p); eina_list_free(st->touched); if (st->timeout) { ...
false
false
false
false
false
0
show_ibdev(struct device *device, struct device_attribute *attr, char *buf) { int ret = -ENODEV; int srcu_key; struct ib_uverbs_device *dev = dev_get_drvdata(device); struct ib_device *ib_dev; if (!dev) return -ENODEV; srcu_key = srcu_read_lock(&dev->disassociate_srcu); ib_dev = srcu_dereference(dev->ib...
false
false
false
false
false
0
remove_double_dots_and_double_slashes(char *s) { char *p = s; while (*s != '\0') { *p++ = *s++; if (s[-1] == '/' || s[-1] == '\\') { // Skip all following slashes, backslashes and double-dots while (s[0] != '\0') { if (s[0] == '/' || s[0] == '\\') { s++; } el...
false
false
false
false
false
0
exo_icon_view_item_accessible_text_get_character_count (AtkText *text) { ExoIconViewItemAccessible *item; item = EXO_ICON_VIEW_ITEM_ACCESSIBLE (text); if (!EXO_IS_ICON_VIEW (item->widget)) return 0; if (atk_state_set_contains_state (item->state_set, ATK_STATE_DEFUNCT)) return 0; return gtk_text_bu...
false
false
false
false
false
0
cgraph_build_static_cdtor_1 (char which, tree body, int priority, bool final) { static int counter = 0; char which_buf[16]; tree decl, name, resdecl; /* The priority is encoded in the constructor or destructor name. collect2 will sort the names and arrange that they are called at program startup. */...
true
true
false
false
false
1
_glewInit_GL_NV_gpu_multicast () { GLboolean r = GL_FALSE; r = ((glMulticastBarrierNV = (PFNGLMULTICASTBARRIERNVPROC)glewGetProcAddress((const GLubyte*)"glMulticastBarrierNV")) == NULL) || r; r = ((glMulticastBlitFramebufferNV = (PFNGLMULTICASTBLITFRAMEBUFFERNVPROC)glewGetProcAddress((const GLubyte*)"glMulticast...
false
false
false
false
false
0
VCL_Load(const char *fn, const char *name, struct cli *cli) { struct vcls *vcl; struct VCL_conf const *cnf; ASSERT_CLI(); vcl = vcl_find(name); if (vcl != NULL) { VCLI_Out(cli, "Config '%s' already loaded", name); return (1); } ALLOC_OBJ(vcl, VVCLS_MAGIC); XXXAN(vcl); vcl->dlh = dlopen(fn, RTLD_NOW | RT...
false
true
false
false
false
1
HIstart(void) { CONSTR(FUNC, "HIstart"); /* for HERROR */ intn ret_value = SUCCEED; /* Don't call this routine again... */ library_terminate = TRUE; /* Install atexit() library cleanup routine */ if(install_atexit==TRUE) if (HDatexit(&HPend) != 0) HGOTO_ERROR(DFE_CA...
false
false
false
false
false
0
t1_hinter__simplify_representation(t1_hinter * self) { int i, j; int last_pole = self->pole_count - 1; int primary_hint_count = self->primary_hint_count; if (last_pole > 1 && self->pole[last_pole -1].type == closepath) last_pole -= 2; /* Skip the trailing moveto. */ if (self->pole_count <= 1)...
false
false
false
false
false
0
hash_foreach(HASH * h, void (*func) (void *, void *), void *funcdata) { HASHENT *he, *ptr; int i; for (i = 0; i < h->numbuckets; i++) { he = h->bucket[i]; while (he) { /* we use a temp pointer here so that we can remove this entry from the hash table ...
false
false
false
false
false
0
HandleSavedRegionsLocked( void (*insert_func)(const Region& region)) { while (saved_regions_count > 0) { // Making a local-var copy of the region argument to insert_func // including its stack (w/o doing any memory allocations) is important: // in many cases the memory in saved_regions /...
false
false
false
false
false
0
link_address_remote(struct link *link, char *addr, int *port) { struct sockaddr_in iaddr; SOCKLEN_T length; int result; if(link->type == LINK_TYPE_FILE) { return 0; } length = sizeof(iaddr); result = getpeername(link->fd, (struct sockaddr *) &iaddr, &length); if(result != 0) return 0; *port = ntohs(iadd...
false
false
false
false
true
1
mono_crystal_fitness(gsl_vector const *x, void *params) { size_t i, j; double fitness; double euler_x; double euler_y; double euler_z; HklSample *sample = params; sample->ux->value = euler_x = gsl_vector_get(x, 0); sample->uy->value = euler_y = gsl_vector_get(x, 1); sample->uz->value = euler_z = gsl_vector_ge...
false
false
false
false
false
0
sq_pushstring(HSQUIRRELVM v,const SQChar *s,SQInteger len) { if(s) v->Push(SQObjectPtr(SQString::Create(_ss(v), s, len))); else v->Push(_null_); }
false
false
false
false
false
0
vfsub_sio_notify_change(struct path *path, struct iattr *ia, struct inode **delegated_inode) { int err, wkq_err; struct notify_change_args args = { .errp = &err, .path = path, .ia = ia, .delegated_inode = delegated_inode }; wkq_err = au_wkq_wait(call_notify_change, &args); if (unlikely(wkq_er...
false
false
false
false
false
0
OnRemove(wxCommandEvent & WXUNUSED(event)) { size_t row = mGrid->GetCursorRow(); if (!mEditTitle && mGrid->GetCellValue(row, 0).CmpNoCase(LABEL_TITLE) == 0) { return; } else if (!mEditTrack && mGrid->GetCellValue(row, 0).CmpNoCase(LABEL_TRACK) == 0) { return; } else if (row < STATICCNT) {...
false
false
false
false
false
0
wait_for_and_update_peer_seq(struct drbd_peer_device *peer_device, const u32 peer_seq) { struct drbd_device *device = peer_device->device; DEFINE_WAIT(wait); long timeout; int ret = 0, tp; if (!test_bit(RESOLVE_CONFLICTS, &peer_device->connection->flags)) return 0; spin_lock(&device->peer_seq_lock); for (;;)...
false
false
false
false
false
0
parser_parse_string(struct parser_params *parser, NODE *quote) { int func = (int)quote->nd_func; int term = nd_term(quote); int paren = nd_paren(quote); int c, space = 0; rb_encoding *enc = parser->enc; if (func == -1) return tSTRING_END; c = nextc(); if ((func & STR_FUNC_QWORDS) && ISS...
false
false
false
false
false
0
display_base_board_features(s_dmi * dmi) { int i; for (i = 0; i < BASE_BOARD_NB_ELEMENTS; i++) { if (((bool *) (&dmi->base_board.features))[i] == true) { moreprintf("\t\t%s\n", base_board_features_strings[i]); } } }
false
false
false
false
false
0
spl_filesystem_tree_it_current_data(zend_object_iterator *iter, zval ***data TSRMLS_DC) { spl_filesystem_iterator *iterator = (spl_filesystem_iterator *)iter; spl_filesystem_object *object = spl_filesystem_iterator_to_object(iterator); if (SPL_FILE_DIR_CURRENT(object, SPL_FILE_DIR_CURRENT_AS_PATHNAME)) { if (...
false
false
false
false
false
0
gedit_document_goto_line_offset (GeditDocument *doc, gint line, gint line_offset) { gboolean ret; GtkTextIter iter; g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), FALSE); g_return_val_if_fail (line >= -1, FALSE); g_return_val_if_fail (line_offset >= -1, FALSE); ret = gedit_document...
false
false
false
false
false
0
AtAbort_Portals(void) { HASH_SEQ_STATUS status; PortalHashEnt *hentry; hash_seq_init(&status, PortalHashTable); while ((hentry = (PortalHashEnt *) hash_seq_search(&status)) != NULL) { Portal portal = hentry->portal; /* Any portal that was actually running has to be considered broken */ if (portal->status...
false
false
false
false
false
0
IsInverse(const SubTree &p1, const SubTree &p2) /*const*/ { if(p1->IsImmed() && p2->IsImmed()) { // FIXME: potential divide by zero. return p1->GetImmed() == 1.0 / p2->GetImmed(); } if(p1.getsign() == p2.getsign()) return false; return *p1 == *p2; }
false
false
false
false
false
0
buildExtractSubRegOrImm( MachineBasicBlock::iterator MII, MachineRegisterInfo &MRI, MachineOperand &Op, const TargetRegisterClass *SuperRC, unsigned SubIdx, const TargetRegisterClass *SubRC) const { if (Op.isImm()) { // XXX - Is there a better way to do this? if (SubIdx == AMDGPU::sub0) retu...
false
false
false
false
false
0
svr_buf_match_algo(buffer* buf, algo_type localalgos[], int *goodguess) { unsigned char * algolist = NULL; unsigned char * remotealgos[MAX_PROPOSED_ALGO]; unsigned int len; unsigned int count, i, j; algo_type * ret = NULL; *goodguess = 0; /* get the comma-separated list from the buffer ie "algo1,algo2,algo3...
true
true
false
false
false
1
luaB_tostring (lua_State *L) { luaL_checkany(L, 1); if (luaL_callmeta(L, 1, "__tostring")) /* is there a metafield? */ return 1; /* use its value */ switch (lua_type(L, 1)) { case LUA_TNUMBER: lua_pushstring(L, lua_tostring(L, 1)); break; case LUA_TSTRING: lua_pushvalue(L, 1); ...
false
false
false
false
false
0
convert_modes (mode, oldmode, x, unsignedp) enum machine_mode mode, oldmode; rtx x; int unsignedp; { rtx temp; /* If FROM is a SUBREG that indicates that we have already done at least the required extension, strip it. */ if (GET_CODE (x) == SUBREG && SUBREG_PROMOTED_VAR_P (x) && GET_M...
false
false
false
false
false
0
addPending(char *text, int source, int x) { Assert(text != NULL); HUD_message_data new_message; new_message.text = text; new_message.source = source; new_message.x = x; pending_messages.push(new_message); }
false
false
false
false
false
0
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); PrescriptionViewer *_t = static_cast<PrescriptionViewer *>(_o); switch (_id) { case 0: { bool _r = _t->savePrescription(); ...
false
false
false
false
false
0
pixaaCreate(l_int32 n) { PIXAA *paa; PROCNAME("pixaaCreate"); if (n <= 0) n = INITIAL_PTR_ARRAYSIZE; if ((paa = (PIXAA *)CALLOC(1, sizeof(PIXAA))) == NULL) return (PIXAA *)ERROR_PTR("paa not made", procName, NULL); paa->n = 0; paa->nalloc = n; if ((paa->pixa = (PIXA **)CALL...
false
false
false
false
false
0
inpname_exists (const gchar *inppath, const gchar *inpname) { gchar *inpfile; gchar *filename; gboolean exists; /* Last version of xmame creates input files named "game.inp", * but sdlmame names them "game". Not sure when the extension * was dropped (tested versions 0...
false
false
false
false
false
0
InitDbus( GMainLoop *psLoop ) { DBusConnection *psBus; DBusError sError; dbus_error_init( &sError ); psBus = dbus_bus_get( DBUS_BUS_SESSION, &sError ); if ( dbus_error_is_set( &sError ) ) { g_warning( "Failed to connect to the D-BUS daemon: %s", sError.message ); dbus_error_free( &sError ); return 1; } d...
false
false
false
false
false
0
QRinput_encodeBitStream(QRinput_List *entry, int version) { int words, ret; QRinput_List *st1 = NULL, *st2 = NULL; if(entry->bstream != NULL) { BitStream_free(entry->bstream); entry->bstream = NULL; } words = QRspec_maximumWords(entry->mode, version); if(entry->size > words) { st1 = QRinput_List_newEntry(...
false
false
false
true
false
1
MapArrayTypeName(char *s) { int i, j; static char newStr[NAMEDATALEN]; /* array type names < NAMEDATALEN long */ if (s == NULL || s[0] == '\0') return s; j = 1; newStr[0] = '_'; for (i = 0; i < NAMEDATALEN - 1 && s[i] != '['; i++, j++) newStr[j] = s[i]; newStr[j] = '\0'; return newStr; }
false
false
false
false
false
0
try_auto_wep(struct airo_info *ai) { if (auto_wep && !test_bit(FLAG_RADIO_DOWN, &ai->flags)) { ai->expires = RUN_AT(3*HZ); wake_up_interruptible(&ai->thr_wait); } }
false
false
false
false
false
0
up_wakeup_item_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { UpWakeupItem *wakeup_item = UP_WAKEUP_ITEM (object); switch (prop_id) { case PROP_IS_USERSPACE: wakeup_item->priv->is_userspace = g_value_get_boolean (value); break; case PROP_ID: wakeup_item->priv->id = g_...
false
false
false
false
false
0
addfunc(struct kbsentry kbs) { int sh, i, x; char *ptr, *q, *r; x = kbs.kb_func; if (x >= MAX_NR_FUNC) { fprintf(stderr, _("%s: addfunc called with bad func %d\n"), progname, kbs.kb_func); exit(EXIT_FAILURE); } q = func_table[x]; if (q) { /* throw out old previous def */ sh = strlen(q) + 1; ptr = ...
false
true
false
false
true
1
tpm_tis_send(struct tpm_chip *chip, u8 *buf, size_t len) { int rc, irq; struct priv_data *priv = chip->vendor.priv; if (!chip->vendor.irq || priv->irq_tested) return tpm_tis_send_main(chip, buf, len); /* Verify receipt of the expected IRQ */ irq = chip->vendor.irq; chip->vendor.irq = 0; rc = tpm_tis_send_mai...
false
false
false
false
false
0
gck_object_get_data_finish (GckObject *self, GAsyncResult *result, gsize *n_data, GError **error) { GetAttributeData *args; guchar *data; g_return_val_if_fail (GCK_IS_OBJECT (self), NULL); g_return_val_if_fail (GCK_IS_CALL (result)...
false
false
false
false
false
0
pp_cxx_offsetof_expression (cxx_pretty_printer *pp, tree t) { pp_cxx_ws_string (pp, "offsetof"); pp_cxx_left_paren (pp); if (!pp_cxx_offsetof_expression_1 (pp, TREE_OPERAND (t, 0))) pp_cxx_expression (pp, TREE_OPERAND (t, 0)); pp_cxx_right_paren (pp); }
false
false
false
false
false
0
rs_insert(struct gfs2_inode *ip) { struct rb_node **newn, *parent = NULL; int rc; struct gfs2_blkreserv *rs = ip->i_res; struct gfs2_rgrpd *rgd = rs->rs_rbm.rgd; u64 fsblock = gfs2_rbm_to_block(&rs->rs_rbm); BUG_ON(gfs2_rs_active(rs)); spin_lock(&rgd->rd_rsspin); newn = &rgd->rd_rstree.rb_node; while (*newn)...
false
false
false
false
false
0
calc_clu_hash(const char *name) { unsigned sum = 0; while (*name) sum += *name++; return sum % NETHASHMOD; }
false
false
false
false
false
0
handle_locking_key(struct input_dev *visorinput_dev, int keycode, int desired_state) { int led; switch (keycode) { case KEY_CAPSLOCK: led = LED_CAPSL; break; case KEY_SCROLLLOCK: led = LED_SCROLLL; break; case KEY_NUMLOCK: led = LED_NUML; break; default: led = -1; break; } if (led >= 0) { ...
false
false
false
false
false
0
gt_contfinder_process_buckets( const GtContfinder contfinder, const GtContfinderBucketInfo parentbucket, gt_contfinder_seqnum_t **bucketsize, GtStackGtContfinderBucketInfo *stackptr, GtBitsequence **bucketcontained) { GtContfinderBucketInfo subbucket; gt_contfinder_seqnum_t i; gt_contfinder_overflow_t...
false
false
false
false
false
0
formatFile(const char* name) { FILE* fp = fopen(name, "r"); if (fp != NULL) { curFile = name; formatFile(fp); fclose(fp); } else error(NLS::TEXT("%s: Cannot open file: %s"), name, strerror(errno)); }
false
false
false
false
false
0
activate_control(struct oxygen *chip, struct snd_kcontrol *ctl, unsigned int mode) { unsigned int access; if (ctl->private_value & mode) access = 0; else access = SNDRV_CTL_ELEM_ACCESS_INACTIVE; if ((ctl->vd[0].access & SNDRV_CTL_ELEM_ACCESS_INACTIVE) != access) { ctl->vd[0].access ^= SNDRV_CTL_ELEM_...
false
false
false
false
true
1
init_front(VgaBuf *b) { b->init(new SurfaceSDL(front), 1); refresh_palette(); return 1; }
false
false
false
false
false
0
puzzle_view_set_puzzle (PuzzleView* self, Puzzle* value) { Puzzle* _tmp0_; Puzzle* _tmp2_; Puzzle* _tmp3_; Puzzle* _tmp4_; g_return_if_fail (self != NULL); _tmp0_ = self->priv->_puzzle; if (_tmp0_ != NULL) { Puzzle* _tmp1_; _tmp1_ = self->priv->_puzzle; g_signal_handlers_disconnect_by_func (_tmp1_, NULL, s...
false
false
false
false
false
0
parse_traditional_patch(const char *first, const char *second, struct patch *patch) { char *name; first += 4; /* skip "--- " */ second += 4; /* skip "+++ " */ if (!p_value_known) { int p, q; p = guess_p_value(first); q = guess_p_value(second); if (p < 0) p = q; if (0 <= p && p == q) { p_value = p; ...
false
false
false
false
false
0
print_sccs (FILE *file, ddg_all_sccs_ptr sccs, ddg_ptr g) { unsigned int u = 0; sbitmap_iterator sbi; int i; if (!file) return; fprintf (file, "\n;; Number of SCC nodes - %d\n", sccs->num_sccs); for (i = 0; i < sccs->num_sccs; i++) { fprintf (file, "SCC number: %d\n", i); EXECUTE_IF_SE...
false
false
false
false
false
0
afr_unlink_unwind (call_frame_t *frame, xlator_t *this) { call_frame_t *main_frame = NULL; afr_local_t *local = NULL; local = frame->local; LOCK (&frame->lock); { if (local->transaction.main_frame) { main_frame = local->transaction.main_...
false
false
false
false
false
0
peerSourceHashSelectParent(request_t * request) { int k; const char *c; peer *p = NULL; peer *tp; unsigned int user_hash = 0; unsigned int combined_hash; double score; double high_score = 0; const char *key = NULL; key = inet_ntoa(request->client_addr); /* calculate hash ke...
false
false
false
false
false
0
L3() {register object *base=vs_base; register object *sup=base+VM3; VC3 vs_check; {object V9; object V10; register object V11; V9=(base[0]); V10=(base[1]); V11=(base[2]); vs_top=sup; goto TTL; TTL:; {object V12; V12= ((V11))->v.v_self[(long)16]; base[3]= CMPcar((V12)); base[4]= (V10); base[5]= CMPcdr((V1...
false
false
false
false
false
0
canRead(QIODevice *device) { if (!device) { qWarning("RASHandler::canRead() called with no device"); return false; } if (device->isSequential()) { qWarning("Reading ras files from sequential devices not supported"); return false; } qint64 oldPos = de...
false
false
false
false
false
0