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
cm_env_ensure_dir(char *path) { char *p, *q, *tmp; int i; if (path != NULL) { tmp = strdup(path); if (tmp != NULL) { p = tmp + strlen(tmp); for (q = tmp + 1; q < p; q++) { if (*q == '/') { *q = '\0'; i = mkdir(tmp, S_IRWXU); if ((i != 0) && (errno != EEXIST)) { cm_log(0,...
false
false
false
false
false
0
parse_names_n(struct parser *p) { unsigned int section = parser_getint(p, "section"); struct names_parse *s = parser_priv(p); if (s->section >= RANDNAME_NUM_TYPES) return PARSE_ERROR_GENERIC; s->section = section; return PARSE_ERROR_NONE; }
false
false
false
false
false
0
ecore_con_url_ftp_use_epsv_set(Ecore_Con_Url *url_con, Eina_Bool use_epsv) { #ifdef HAVE_CURL if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) { ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, "ecore_con_url_ftp_use_epsv_set"); return; } if (!url_con->url) ...
false
false
false
false
false
0
time_to_interval(::CosTime::UTO_ptr uto) { _0RL_cd_99dff546ea0f9974_40000000 _call_desc(_0RL_lcfn_99dff546ea0f9974_50000000, "time_to_interval", 17); _call_desc.arg_0 = uto; _invoke(_call_desc); return _call_desc.result._retn(); }
false
false
false
false
false
0
ipmi_cmd_get_system_info_parameters_operating_system_name (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector,...
false
false
false
false
false
0
argtokey(char *arg) { int ret; switch(target) { #ifdef ENABLE_X case X: if((ret=XStringToKeysym(arg))==NoSymbol) printf("argtokey:Can't find %s, check include/X11/keysymdef.h\n", arg); printf("argtokey:read key %s dblcheck %s\n",arg, XKeysymToString(XStringToKeysym(arg)) ); ret=XKeysymToKeyco...
false
false
false
false
false
0
create_branch(const char *head, const char *name, const char *start_name, int force, int reflog, enum branch_track track) { struct ref_lock *lock; struct commit *commit; unsigned char sha1[20]; char *real_ref, ref[PATH_MAX], msg[PATH_MAX + 20]; int forcing = 0; snprintf(ref, sizeof ref, "refs/heads/%s"...
false
false
false
false
false
0
SetValue(uint32_t index, Object* value) { uint32_t cast_value = 0; if (index < static_cast<uint32_t>(length())) { if (value->IsSmi()) { int int_value = Smi::cast(value)->value(); cast_value = static_cast<uint32_t>(int_value); } else if (value->IsHeapNumber()) { double double_value = HeapNu...
false
false
false
false
false
0
add_credentials_key_values (GoaOAuth2Provider *provider, GVariantBuilder *credentials) { GoaOAuth2ProviderPrivate *priv = provider->priv; if (priv->authorization_code != NULL) g_variant_builder_add (credentials, "{sv}", "authorization_code", g_variant_new_...
false
false
false
false
false
0
ath5k_hw_update_noise_floor(struct ath5k_hw *ah) { struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom; u32 val; s16 nf, threshold; u8 ee_mode; /* keep last value if calibration hasn't completed */ if (ath5k_hw_reg_read(ah, AR5K_PHY_AGCCTL) & AR5K_PHY_AGCCTL_NF) { ATH5K_DBG(ah, ATH5K_DEBUG_CALIBRATE...
false
false
false
false
false
0
facebook_thumbnail_loader (GInputStream *istream, GthFileData *file_data, int requested_size, int *original_width, int *original_height, gpointer user_data, GCancellable *cancellable, GError **error) { GthImage *image = NULL;...
false
false
false
false
false
0
gg_image_strip_read_from_bin_grid (gGraphStripImagePtr img, int *progress) { /* decoding a BIN-GRID or a FLT-GRID [by strip] */ struct grid_codec_data *grid_codec = (struct grid_codec_data *) (img->codec_data); FILE *in = img->file_handle; if (grid_codec->grid_type == GRID_BIN_HDR || grid_codec->grid_typ...
false
false
false
false
false
0
ReturnPackedExpression( void *theEnv, struct expr *packPtr) { if (packPtr != NULL) { rm3(theEnv,(void *) packPtr,(long) sizeof (struct expr) * ExpressionSize(packPtr)); } }
false
false
false
false
false
0
decode(string s) { if (decoder) decoder->decode(s); // 7bit or 8bit, or something... else decoded(s); }
false
false
false
false
false
0
GetExpandedVirtualBuildTargetGroup(const wxString& alias) const { wxArrayString result; VirtualBuildTargetsMap::const_iterator it = m_VirtualTargets.find(alias); if (it == m_VirtualTargets.end()) return result; ExpandVirtualBuildTargetGroup(alias, result); return result; }
false
false
false
false
false
0
get_int(FILE *fp) { int result; size_t j; unsigned char *ptr; trace(("get_int()\n{\n")); ptr = (unsigned char *)&result; for (j = 0; j < sizeof(int); ++j) { int c = fgetc(fp); if (c == EOF) { if (ferror(fp)) nfatal("reading pipe"); fatal_raw("reading pipe: proxy prot...
false
false
false
false
false
0
radeon_dp_mst_prepare_pll(struct drm_crtc *crtc, struct drm_display_mode *mode) { struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); struct drm_device *dev = crtc->dev; struct radeon_device *rdev = dev->dev_private; struct radeon_encoder *radeon_encoder = to_radeon_encoder(radeon_crtc->encoder); struct radeon...
false
false
false
false
false
0
trim_right(const string& source , const string& t) { string str = source; return str.erase(str.find_last_not_of(t) + 1); }
false
false
false
false
false
0
PaintMenu(MenuRoot *mr, XEvent *e) { MenuItem *mi; for (mi = mr->first; mi != NULL; mi = mi->next) { /* be smart about handling the expose, redraw only the entries * that we need to */ if (e->xexpose.y < (mi->y_offset + mi->y_height) && (e->xexpose.y + e->xexpose.height) > mi->y_...
false
false
false
false
false
0
alloc_blocks_array_dependence_range(Block *block_head) { int block_num; Block *bpt; Array_def_use_table_semnode ***def_use; Array_def_use_table_semnode ***use_use; Array_def_use_table_semnode ***LCD; block_num = block_head->outer->mt_num; def_use = alloc_block_array_dependence_range_edge(b...
false
false
false
false
false
0
ti_bandgap_tshut_init(struct ti_bandgap *bgp, struct platform_device *pdev) { int gpio_nr = bgp->tshut_gpio; int status; /* Request for gpio_86 line */ status = gpio_request(gpio_nr, "tshut"); if (status < 0) { dev_err(bgp->dev, "Could not request for TSHUT GPIO:%i\n", 86); return status; } status = gp...
false
false
false
false
false
0
alloc_re(x,m,n) char **x; unsigned int m; unsigned int n; { char *y; y = alloc(n); if (!y) return 0; byte_copy(y,m,*x); alloc_free(*x); *x = y; return 1; }
false
false
false
false
false
0
gfs_domain_timer_start (GfsDomain * domain, const gchar * name) { GfsTimer * t; g_return_if_fail (domain != NULL); g_return_if_fail (name != NULL); t = g_hash_table_lookup (domain->timers, name); if (t == NULL) { t = g_malloc (sizeof (GfsTimer)); gts_range_init (&t->r); g_hash_table_insert (doma...
false
false
false
false
false
0
find_contact_by_uid (EContactStore *contact_store, const gchar *find_uid) { GArray *array; gint i; array = contact_store->priv->contact_sources; for (i = 0; i < array->len; i++) { ContactSource *source = &g_array_index (array, ContactSource, i); gint j; for (j = 0; j < source...
false
false
false
false
false
0
_gtk_file_chooser_set_file_parent (GtkFileChooser *chooser, GFile *file, GError **error) { GFile *parent; gboolean result; parent = g_file_get_parent (file); result = gtk_file_chooser_set_file (chooser, parent, error); if (parent != NULL) g_object_unref (parent); return re...
false
false
false
false
false
0
deflate_init(struct comp_ctx **comp_ctx, int level) { z_stream *strm; if (init_comp_ctx(comp_ctx) < 0) return -1; strm = &(*comp_ctx)->strm; if (deflateInit2(strm, level, Z_DEFLATED, global.tune.zlibwindowsize, global.tune.zlibmemlevel, Z_DEFAULT_STRATEGY) != Z_OK) { deinit_comp_ctx(comp_ctx); return -1; ...
false
false
false
false
false
0
hpi_outstream_close(u32 h_outstream) { struct hpi_message hm; struct hpi_response hr; hpi_init_message_response(&hm, &hr, HPI_OBJ_OSTREAM, HPI_OSTREAM_HOSTBUFFER_FREE); if (hpi_handle_indexes(h_outstream, &hm.adapter_index, &hm.obj_index)) return HPI_ERROR_INVALID_HANDLE; hpi_send_recv(&hm, &hr); hpi_init_...
false
false
false
false
false
0
encode_alpha_block_DXT5(unsigned char *dst, const unsigned char *block, const int offset) { int i, v, mn, mx; int dist, bias, dist2, dist4, bits, mask; int a, idx, t; block += offset; block += 3; /* find min/max alpha pair */ ...
false
false
false
false
false
0
__ecereMethod_CodeEditor_ListEnums(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Type * dest) { struct CodeEditor * __ecerePointer_CodeEditor = (struct CodeEditor *)(this ? (((char *)this) + __ecereClass_CodeEditor->offset) : 0); struct __ecereN...
false
true
false
false
false
1
adjust_pci_device ( struct pci_device *pci ) { unsigned short new_command, pci_command; unsigned char pci_latency; pci_read_config_word ( pci, PCI_COMMAND, &pci_command ); new_command = ( pci_command | PCI_COMMAND_MASTER | PCI_COMMAND_MEM | PCI_COMMAND_IO ); if ( pci_command != new_command ) { DBG ( "PCI BIO...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__gfx__Display_ApplyMaterial(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__gfx3D__Material * material, struct __ecereNameSpace__ecere__gfx3D__Mesh * mesh) { struct __ecereNameSpace__ecere__gfx__Display * __ecerePointer___ecereNameSpace__ecere_...
false
false
false
true
false
1
db_get_boolean(const char *zName, int dflt){ char *zVal = db_get(zName, dflt ? "on" : "off"); if( is_truth(zVal) ) return 1; if( is_false(zVal) ) return 0; return dflt; }
false
false
false
false
false
0
Delink(string &FileName,const char *OriginalPath, unsigned long long &DeLinkBytes, unsigned long long const &FileSize) { // See if this isn't an internaly prefix'd file name. if (InternalPrefix.empty() == false && InternalPrefix.length() < FileName.length() && stringcmp(FileName.begin(),FileN...
false
false
false
false
false
0
EliminateDuplicatePHINodes(BasicBlock *BB) { // This implementation doesn't currently consider undef operands // specially. Theoretically, two phis which are identical except for // one having an undef where the other doesn't could be collapsed. struct PHIDenseMapInfo { static PHINode *getEmptyKey() { ...
false
false
false
false
false
0
memblock_isolate_range(struct memblock_type *type, phys_addr_t base, phys_addr_t size, int *start_rgn, int *end_rgn) { phys_addr_t end = base + memblock_cap_size(base, &size); int i; *start_rgn = *end_rgn = 0; if (!size) return 0; /* we'll create at most two more regions */ while (type->cnt + 2 > t...
false
false
false
false
false
0
mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (!m_owner->isSelected()) { event->ignore(); return; } if (m_spaceBarWasPressed) { event->ignore(); return; } if (m_doDrag) { m_owner->partLabelMoved(m_initialPosition, m_initialOffset, pos(), m_offset); } QGraphicsSvgItem::mouseReleaseEvent(ev...
false
false
false
false
false
0
package2filename(const char *package, int *len) { const char *s; char *d; char *filename; filename = malloc((strlen(package)+4)*sizeof(char)); for (s = package, d = filename; *s; s++, d++) { if (*s == ':' && s[1] == ':') { *d = '/'; s++; } else { ...
false
false
false
false
false
0
CSceneNodeAnimatorCameraFPS(gui::ICursorControl* cursorControl, f32 rotateSpeed, f32 moveSpeed, f32 jumpSpeed, SKeyMap* keyMapArray, u32 keyMapSize, bool noVerticalMovement, bool invertY) : CursorControl(cursorControl), MaxVerticalAngle(88.0f), MoveSpeed(moveSpeed), RotateSpeed(rotateSpeed), JumpSpeed(jumpSpee...
false
false
false
false
false
0
zslFree(zskiplist *zsl) { zskiplistNode *node = zsl->header->forward[0], *next; zfree(zsl->header->forward); zfree(zsl->header); while(node) { next = node->forward[0]; zslFreeNode(node); node = next; } zfree(zsl); }
false
false
false
false
false
0
scaleImage() { imageLabel->setPixmap (pix.scaled (size() * scaleFactor, Qt::KeepAspectRatio, Qt::SmoothTransformation)); imageLabel->adjustSize(); }
false
false
false
false
false
0
osinfo_loader_resources_list(OsinfoLoader *loader, xmlXPathContextPtr ctxt, xmlNodePtr root, const gchar *id, OsinfoOs *os, ...
false
false
false
false
false
0
akf_start_seq_get(krb5_context context, krb5_keytab id, krb5_kt_cursor *c) { int32_t ret; struct akf_data *d = id->data; c->fd = open (d->filename, O_RDONLY | O_BINARY | O_CLOEXEC, 0600); if (c->fd < 0) { ret = errno; krb5_set_error_message(context, ret, N_("keytab afs keyfile open ...
false
false
false
false
false
0
H5O_chunk_proxy_dest(H5O_chunk_proxy_t *chk_proxy) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5O_chunk_proxy_dest) /* Check arguments */ HDassert(chk_proxy); /* Decrement reference count of object header */ if(H5O_dec_rc(chk_proxy->oh) < 0) HGOTO_ERROR(H...
false
false
false
false
false
0
_get_status_updates (SwPlurkItemView *item_view) { SwPlurkItemViewPrivate *priv = GET_PRIVATE (item_view); RestProxyCall *call; SwService *service; service = sw_item_view_get_service (SW_ITEM_VIEW (item_view)); if (!sw_service_has_dynamic_cap (service, CREDENTIALS_VALID)) return; call = rest_proxy_new...
false
false
false
false
false
0
bitmap_elem_to_freelist (bitmap head, bitmap_element *elt) { if (head->using_obstack) { elt->next = bitmap_free; bitmap_free = elt; } else { elt->next = bitmap_ggc_free; bitmap_ggc_free = elt; } }
false
false
false
false
false
0
setFd(s32 fd) { if (fd == mFd) return; if (mFd != -1) { IoDispatcher::instance()->removeIoSource(this, true); close(mFd); } mFd = fd; if (mFd != -1) { fcntl(mFd, F_SETFD, fcntl(mFd, F_GETFD) | FD_CLOEXEC); fcntl(mFd, F_SETFL, fcntl(mFd, F_GETFL) | O_NONBLOCK); IoDispatcher::instance()->addIoSource(th...
false
false
false
false
false
0
camel_imapx_command_add_qresync_parameter (CamelIMAPXCommand *ic, CamelFolder *folder) { /* See RFC 5162 Section 3.1 */ CamelIMAPXFolder *imapx_folder; CamelIMAPXSummary *imapx_summary; guint64 last_known_uidvalidity; guint64 last_known_modsequence; guint32 last_known_m...
false
false
false
false
false
0
expand_copysign_bit (enum machine_mode mode, rtx op0, rtx op1, rtx target, int bitpos, bool op0_is_abs) { enum machine_mode imode; double_int mask; int word, nwords, i; rtx temp, insns; if (GET_MODE_SIZE (mode) <= UNITS_PER_WORD) { imode = int_mode_for_mode (mode); if (imode == BLKmode...
false
false
false
false
false
0
setup_remotetcp() { struct TCPFwdList * iter = NULL; TRACE(("enter setup_remotetcp")) if (cli_opts.remotefwds == NULL) { TRACE(("cli_opts.remotefwds == NULL")) } iter = cli_opts.remotefwds; while (iter != NULL) { send_msg_global_request_remotetcp(iter->listenport); iter = iter->next; } TRACE(("leave ...
false
false
false
false
false
0
cleanup ( int err ) { char *message; /* log names of files not sent */ /* Translator: this specifies a file (a fax page) the sending of which has failed (%s represents the file name of the page) */ message = strdup2 ( "I ", gettext ( "failed page %s") ) ; if ( message ) { logifnames ( &ifile, mess...
false
false
false
false
false
0
gather_mem_refs_stmt (struct loop *loop, gimple stmt) { tree *mem = NULL; hashval_t hash; PTR *slot; mem_ref_p ref; bool is_stored; unsigned id; if (!gimple_vuse (stmt)) return; mem = simple_mem_ref_in_stmt (stmt, &is_stored); if (!mem) { id = memory_accesses.refs_list.length (); ...
false
false
false
false
false
0
expandCvtFPInt(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, unsigned CvtOpc, unsigned MovOpc, bool IsI64) const { const MCInstrDesc &CvtDesc = get(CvtOpc), &MovDesc = get(MovOpc); const MachineOp...
false
false
false
false
false
0
enterLocalValueArea() { MachineBasicBlock::iterator OldInsertPt = FuncInfo.InsertPt; DebugLoc OldDL = DbgLoc; recomputeInsertPt(); DbgLoc = DebugLoc(); SavePoint SP = {OldInsertPt, OldDL}; return SP; }
false
false
false
false
false
0
ec_i2c_count_response(struct i2c_msg i2c_msgs[], int num) { int size; int i; size = sizeof(struct ec_response_i2c_passthru); for (i = 0; i < num; i++) if (i2c_msgs[i].flags & I2C_M_RD) size += i2c_msgs[i].len; return size; }
false
false
false
false
false
0
operator<<( QDebug dbg, const KDGantt::StyleOptionGanttItem& s ) { dbg << "KDGantt::StyleOptionGanttItem[ boundingRect="<<s.boundingRect <<", itemRect="<<s.itemRect <<", displayPosition="<<s.displayPosition <<", grid="<<s.grid <<", text="<<s.text <<"]"; return dbg; }
false
false
false
false
false
0
handle_emptytag(void *clientdata, string name, pairlist attribs) { pairlist p; if (top(skipping) == false && !target) { printf("<%s", name); for (p = attribs; p; p = p->next) { if (p->value != NULL) printf(" %s=\"%s\"", p->name, p->value); else if (do_xml) printf(" %s=\"%s\"", p->name, p->name)...
false
false
false
false
true
1
e1000_check_mng_mode(struct e1000_hw *hw) { uint32_t fwsm; fwsm = E1000_READ_REG(hw, FWSM); if (hw->mac_type == e1000_ich8lan) { if ((fwsm & E1000_FWSM_MODE_MASK) == (E1000_MNG_ICH_IAMT_MODE << E1000_FWSM_MODE_SHIFT)) return TRUE; } else if ((fwsm & E1000_FWSM_MODE_MASK...
false
false
false
false
false
0
init( const Configuration& config ) { *Log(mwuLog) << "initiating mwuChunker..." << endl; debug = tpDebug; string val = config.lookUp( "debug", "mwu" ); if ( !val.empty() ) debug = TiCC::stringTo<int>( val ); val = config.lookUp( "t", "mwu" ); if ( val.empty() ){ *Log(mwuLog) << "cannot find attri...
false
false
false
false
false
0
cmos_read_alarm(struct device *dev, struct rtc_wkalrm *t) { struct cmos_rtc *cmos = dev_get_drvdata(dev); unsigned char rtc_control; if (!is_valid_irq(cmos->irq)) return -EIO; /* Basic alarms only support hour, minute, and seconds fields. * Some also support day and month, for alarms up to a year in * the f...
false
false
false
false
false
0
build_bl_tree(void) { int max_blindex; /* index of last bit length code of non zero freq */ /* Determine the bit length frequencies for literal and distance trees */ scan_tree(G2.dyn_ltree, G2.l_desc.max_code); scan_tree(G2.dyn_dtree, G2.d_desc.max_code); /* Build the bit length tree: */ build_tree(&G2.bl_desc)...
false
false
false
false
false
0
save_preset_file (EqualizerPreset * preset, const char * filename) { GKeyFile *rcfile; int i; char *data; gsize len; rcfile = g_key_file_new(); g_key_file_set_double(rcfile, "Equalizer preset", "Preamp", preset->preamp); for (i = 0; i < 10; i++) { char tmp[7]; g_snprintf(tm...
true
true
false
false
false
1
serr(int eval, const char *fmt, ...) #else serr(eval, fmt, va_alist) int eval; const char *fmt; va_dcl #endif /* STDC_HEADERS */ { if (fmt != NULL) { va_list ap; char buf[2048]; size_t bufused; #ifdef STDC_HEADERS /* LINTED pointer casts may be troublesome */ va_start(ap, fmt); #else va_start(ap); #e...
false
false
false
false
false
0
cmd_execute_command_real(vector_t *vline, vty_t *vty, cmd_element_t **cmd) { unsigned int index, i; vector_t *cmd_vector; cmd_element_t *cmd_element; cmd_element_t *matched_element; unsigned int matched_count, incomplete_count; int argc; const char *argv[CMD_ARGC_MAX]; match_type_t match = 0; int varflag; cha...
true
true
false
false
false
1
score_set(guint value) { if(boardRootItem!=NULL) goo_canvas_item_remove(boardRootItem); boardRootItem = \ goo_canvas_group_new (goo_canvas_get_root_item(GOO_CANVAS(gc_board_get_current()->canvas)), NULL); switch(currentStyle) { case SCORESTYLE_NOTE : { gchar *tmp; GooCanvasItem *...
false
false
false
false
false
0
elm_transit_del(Elm_Transit *transit) { ELM_TRANSIT_CHECK_OR_RETURN(transit); transit->deleted = EINA_TRUE; if (transit->walking) return; _transit_del(transit); }
false
false
false
false
false
0
hpmud_probe_devices(enum HPMUD_BUS_ID bus, char *buf, int buf_size, int *cnt, int *bytes_read) { int len=0; DBG("[%d] hpmud_probe_devices() bus=%d\n", getpid(), bus); buf[0] = 0; *cnt = 0; if (bus == HPMUD_BUS_USB) { len = musb_probe_devices(buf, buf_size, cnt); } #ifdef HAVE_PPORT else...
false
false
false
false
false
0
Write(const char *S) { cout << S; for (unsigned int I = strlen(S); I < LastLen; I++) cout << ' '; cout << '\r' << flush; LastLen = strlen(S); }
false
false
false
false
false
0
qmonShareTreeAddLeaf(Widget w, XtPointer cld, XtPointer cad) { Widget tree = (Widget)cld; ListTreeItem *item = NULL; ListTreeItem *new = NULL; ListTreeMultiReturnStruct ret; char name[256]; Cardinal share = 0; Boolean status; DENTER(GUI_LAYER, "qmonShareTreeAddLeaf"); ListTreeGetHighlighted...
true
true
false
false
false
1
qed_drain(struct qed_dev *cdev) { struct qed_hwfn *hwfn; struct qed_ptt *ptt; int i, rc; for_each_hwfn(cdev, i) { hwfn = &cdev->hwfns[i]; ptt = qed_ptt_acquire(hwfn); if (!ptt) { DP_NOTICE(hwfn, "Failed to drain NIG; No PTT\n"); return -EBUSY; } rc = qed_mcp_drain(hwfn, ptt); if (rc) return rc...
false
false
false
false
false
0
gst_auto_convert_sink_query (GstPad * pad, GstObject * parent, GstQuery * query) { gboolean ret = TRUE; GstAutoConvert *autoconvert = GST_AUTO_CONVERT (parent); GstElement *subelement; if (GST_QUERY_TYPE (query) == GST_QUERY_CAPS) { GstCaps *filter, *caps; gst_query_parse_caps (query, &filter); ca...
false
false
false
false
false
0
endGame(char *reason,GameResult _result) { if (over) return; // can't end twice result=_result; // bughouse partner game if (protodata[2]) global.bugpane->stopClock(); if (myboard) myboard->stopClock(); over=1; g_strlcpy(ereason,reason,128); showResult(); if (myboard) myboard->setC...
false
false
false
false
false
0
gui_editor_set_font (GUIEditor *self, const gchar *font_name) { PangoFontDescription *font_desc = NULL; g_return_if_fail (font_name != NULL); font_desc = pango_font_description_from_string (font_name); g_return_if_fail (font_desc != NULL); gtk_widget_modify_font (GTK_WIDGET (self->widget), font_desc); ...
false
false
false
false
false
0
lsr_write_path_type(GF_LASeRCodec *lsr, SVG_PathData *path, const char *name) { #if USE_GF_PATH u32 i, *contour, nb_types; GF_List *pts = gf_list_new(); contour = path->contours; nb_types = 0; for (i=0; i<path->n_points; ) { switch (path->tags[i]) { case GF_PATH_CURVE_ON: gf_list_add(pts, &path->points[i])...
false
false
false
false
false
0
LLVMGetVolatile(LLVMValueRef MemAccessInst) { Value *P = unwrap<Value>(MemAccessInst); if (LoadInst *LI = dyn_cast<LoadInst>(P)) return LI->isVolatile(); return cast<StoreInst>(P)->isVolatile(); }
false
false
false
false
false
0
scm_i_normbig (SCM b) { /* convert a big back to a fixnum if it'll fit */ /* presume b is a bignum */ if (mpz_fits_slong_p (SCM_I_BIG_MPZ (b))) { long val = mpz_get_si (SCM_I_BIG_MPZ (b)); if (SCM_FIXABLE (val)) b = SCM_I_MAKINUM (val); } return b; }
false
false
false
false
false
0
gamgi_mesa_text_data_wired (gamgi_enum font, const float **points, const int **driver) { switch (font) { case GAMGI_IO_SUN_ROMAN: *points = gamgi_io_font_sun_roman_points; *driver = gamgi_io_font_sun_roman_driver; break; case GAMGI_IO_SUN_ROMAN_MONO: *points = gamgi_io_font_sun_roman_mono_points; *driv...
false
false
false
false
false
0
setData( const QModelIndex &index, const QVariant &value, int role ) { if ( index.isValid() && role == Qt::EditRole ) { m_labels.replace( index.row(), value.toString() ); emit dataChanged( index, index ); m_labels.sort(); return true; } return false; }
false
false
false
false
false
0
mergeLabels(const Theorem& thm, const Expr& e1, const Expr& e2) { DebugAssert(e2.hasFind() && findExpr(e2) == e2, "datatype: mergeLabels: Expected find(e2)=e2"); DebugAssert(d_labels.find(e1) != d_labels.end() && d_labels.find(e2) != d_labels.end(), ...
false
false
false
false
false
0
find_value (const ACE_Configuration_Section_Key& key, const ACE_TCHAR* name, VALUETYPE& type_out) { ACE_ASSERT (this->allocator_); const ACE_TCHAR *t_name = name ? name : &this->NULL_String_; if (validate_value_name (t_name)) return -1; ...
false
false
false
false
false
0
__find_tran_conn_np(struct expr_t *xp) { struct net_t *np; switch ((byte) xp->optyp) { case ID: case GLBREF: np = xp->lu.sy->el.enp; return(np); case LSB: case PARTSEL: np = xp->lu.x->lu.sy->el.enp; return(np); /* for opempty will be no npp */ default: __case_terr(__FILE__, __LINE__); } return(NULL); }
false
false
false
false
false
0
HeapCreate (gint32 flags, gint32 initial_size, gint32 max_size) { HeapInfo *hi; if (heaps == NULL) heaps = g_hash_table_new (g_direct_hash, g_direct_equal); if (flags != 0) g_warning ("Flags for HeapCreate are the unsupported value non-zero"); hi = g_new (HeapInfo, 1); hi->flags = flags; hi->initial_size...
false
false
false
false
false
0
GenerateRotationNodeAnim(const std::string& name, const Model& target, const std::vector<const AnimationCurveNode*>& curves, const LayerMap& layer_map, double& max_time, double& min_time) { ScopeGuard<aiNodeAnim> na(new aiNodeAnim()); na->mNodeName.Set(name); ConvertRotationKeys(na, curves, layer_ma...
false
false
false
false
false
0
xmlSecGnuTLSAppDefaultKeysMngrInit(xmlSecKeysMngrPtr mngr) { int ret; xmlSecAssert2(mngr != NULL, -1); /* create simple keys store if needed */ if(xmlSecKeysMngrGetKeysStore(mngr) == NULL) { xmlSecKeyStorePtr keysStore; keysStore = xmlSecKeyStoreCreate(xmlSecSimpleKeysStoreId); ...
false
false
false
false
false
0
WriteChar(FILE *bdf,struct MacFontRec *font,int enc, int index, int size, FOND *mine, struct assoc *ass) { Rect rct; int width; short *widths = NULL; if ( mine!=NULL && ass!=NULL ) { int i; /* I'm ignoring the glyph width table in the nfnt, and just looking at*/ /* the family table in the fond */ ...
false
false
false
false
false
0
dfb_wm_update_stack( CoreWindowStack *stack, const DFBRegion *region, DFBSurfaceFlipFlags flags ) { D_ASSERT( wm_local != NULL ); D_ASSERT( wm_local->funcs != NULL ); D_ASSERT( wm_local->funcs->UpdateStack != NULL ); D_MAGIC_ASSERT( stack, CoreWind...
false
false
false
false
false
0
btc8723b2ant_bt_rssi_state(u8 level_num, u8 rssi_thresh, u8 rssi_thresh1) { s32 bt_rssi = 0; u8 bt_rssi_state = coex_sta->pre_bt_rssi_state; bt_rssi = coex_sta->bt_rssi; if (level_num == 2) { if ((coex_sta->pre_bt_rssi_state == BTC_RSSI_STATE_LOW) || (coex_sta->pre_bt_rssi_state == BTC_RSSI_STATE...
false
false
false
false
false
0
g_daemon_file_get_relative_path (GFile *parent, GFile *descendant) { GDaemonFile *parent_daemon = G_DAEMON_FILE (parent); GDaemonFile *descendant_daemon = G_DAEMON_FILE (descendant); if (descendant_daemon->mount_spec == parent_daemon->mount_spec) { const char *remainder; remainder = match_p...
false
false
false
false
false
0
s35390a_read_alarm(struct i2c_client *client, struct rtc_wkalrm *alm) { struct s35390a *s35390a = i2c_get_clientdata(client); char buf[3], sts; int i, err; /* * initialize all members to -1 to signal the core that they are not * defined by the hardware. */ alm->time.tm_sec = -1; alm->time.tm_min = -1; alm...
false
false
false
false
false
0
cachefiles_allocate_page(struct fscache_retrieval *op, struct page *page, gfp_t gfp) { struct cachefiles_object *object; struct cachefiles_cache *cache; int ret; object = container_of(op->op.object, struct cachefiles_object, fscache); cache = container_of(object->fscache.cache, st...
false
false
false
false
false
0
Ns_MySQL_CloseDb(Ns_DbHandle *handle) { assert(handle != NULL); if (handle->verbose) Ns_Log(Notice, "Ns_MySQL_CloseDb(%s) called.", handle->datasource); mysql_close((MYSQL *) handle->connection); handle->connected = NS_FALSE; /* * From http://www.mysql.com/documentation/mysql/bychapt...
false
false
false
false
false
0
IDirectFB_GetScreen( IDirectFB *thiz, DFBScreenID id, IDirectFBScreen **interface ) { IDirectFBScreen *iface; GetScreen_Context context; DIRECT_INTERFACE_GET_DATA(IDirectFB) D_DEBUG_AT( IDFB, "%s( %p, %d )\n", __FUNCTION__, thiz, id ); ...
false
false
false
false
false
0
set_hint_predicate (struct predicate **p, struct predicate new_predicate) { if (false_predicate_p (&new_predicate) || true_predicate_p (&new_predicate)) { if (*p) pool_free (edge_predicate_pool, *p); *p = NULL; } else { if (!*p) *p = (struct predicate *) pool_alloc (edge_predicate_po...
false
false
false
false
false
0
r100_debugfs_rbbm_info(struct seq_file *m, void *data) { struct drm_info_node *node = (struct drm_info_node *) m->private; struct drm_device *dev = node->minor->dev; struct radeon_device *rdev = dev->dev_private; uint32_t reg, value; unsigned i; seq_printf(m, "RBBM_STATUS 0x%08x\n", RREG32(RADEON_RBBM_STATUS)); ...
false
false
false
false
false
0
hr222_iec958_capture_byte(struct snd_pcxhr *chip, int aes_idx, unsigned char *aes_bits) { unsigned char idx = (unsigned char)(aes_idx * 8); unsigned char temp = 0; unsigned char mask = chip->mgr->board_has_aes1 ? PCXHR_SUER1_BIT_C_READ_MASK : PCXHR_SUER_BIT_C_READ_MASK; int i; for (i = 0; i < 8; i++) { ...
false
false
false
false
false
0
SeekInlineDataPosition(vtkXMLDataElement *element) { istream* stream = this->GetStream(); if(!element->GetInlineDataPosition()) { // Scan for the start of the actual inline data. char c=0; stream->clear(stream->rdstate() & ~ios::eofbit); stream->clear(stream->rdstate() & ~ios::failbit); this...
false
false
false
false
false
0
echo_big_core(sph_echo_big_context *sc, const unsigned char *data, size_t len) { unsigned char *buf; size_t ptr; buf = sc->buf; ptr = sc->ptr; if (len < (sizeof sc->buf) - ptr) { memcpy(buf + ptr, data, len); ptr += len; sc->ptr = ptr; return; } while (len > 0) { size_t clen; clen = (sizeof sc->b...
false
false
false
false
false
0
avdtp_set_configuration_resp(struct avdtp *session, struct avdtp_stream *stream, struct avdtp_single_header *resp, int size) { struct avdtp_local_sep *sep = stream->lsep; if (sep->cfm && sep->cfm->set_configuration) sep->cfm->set_configuration(session, sep, stream, NULL, sep->user_data); ...
false
false
false
false
false
0
dftlistfuncs_(void) { int i; fun_printf("\nAvailable functionals:"); for(i=0; available_functionals[i]; i++) fun_printf(available_functionals[i]->name); }
false
false
false
false
false
0
becke_first(FunFirstFuncDrv *ds, real factor, const FunDensProp* dp) { real alpha, aa2, asha, sq1aa2; real alphb, ab2, ashb, sq1ab2; real denoma, denoma2; real denomb, denomb2; real alphaa10, alphaa01; real alphab10, alphab01; real ffa, ff1a; real ffb, ff1b; if (dp->rhoa >BECKE_THR...
false
false
false
false
false
0
au_write_header(AVFormatContext *s) { ByteIOContext *pb = s->pb; s->priv_data = NULL; /* format header */ if (put_au_header(pb, s->streams[0]->codec) < 0) { return -1; } put_flush_packet(pb); return 0; }
false
false
false
false
false
0