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
iscsi_target_destroy(int tid, int force) { struct iscsi_target* target; struct iscsi_session *session, *stmp; struct iscsi_connection *conn, *ctmp; target = target_find_by_id(tid); if (!target) { eprintf("can't find the target %d\n", tid); return; } if (!force && target->nr_sessions) { eprintf("the targe...
false
false
false
false
false
0
asd_init_phy_identify(struct asd_phy *phy) { phy->identify_frame = phy->id_frm_tok->vaddr; memset(phy->identify_frame, 0, sizeof(*phy->identify_frame)); phy->identify_frame->dev_type = SAS_END_DEVICE; if (phy->sas_phy.role & PHY_ROLE_INITIATOR) phy->identify_frame->initiator_bits = phy->sas_phy.iproto; if (phy...
false
false
false
false
false
0
cfg_sections_prev(char *dname, char *current) { struct list_head *item; struct cfg_domain *domain; struct cfg_section *section; domain = cfg_find_domain(dname); if (NULL == domain) return NULL; section = cfg_find_section(domain,current); if (NULL == section) return NULL; item = &se...
false
false
false
false
false
0
on_browse_nomail_image (GtkWidget *widget) { GtkWidget *preview = gtk_image_new (); browse (_("Browse for a new mail image"), "nomail_image_entry", false, preview); }
false
false
false
false
false
0
soap_in_m__PutDataResponse(struct soap *soap, const char *tag, struct m__PutDataResponse *a, const char *type) { size_t soap_flag_x__keys = 1; if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (struct m__PutDataResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_m__PutDataResponse, sizeof(struct m_...
false
false
false
false
false
0
test_get_next(hid_t fid) { herr_t err; hid_t table; particle_t readBuf[NRECORDS]; particle_t readBuf2[NRECORDS]; size_t c; TESTING("H5PTget_next"); /* Open the table */ table = H5PTopen(fid, PT_NAME); if( H5PTis_valid(table) < 0) goto out; /* Read several particles con...
false
false
false
false
false
0
gee_abstract_multi_map_real_get (GeeMultiMap* base, gconstpointer key) { GeeAbstractMultiMap * self; GeeCollection* result = NULL; GeeMap* _tmp0_ = NULL; gconstpointer _tmp1_ = NULL; gboolean _tmp2_ = FALSE; self = (GeeAbstractMultiMap*) base; _tmp0_ = self->_storage_map; _tmp1_ = key; _tmp2_ = gee_map_has_key...
false
false
false
false
false
0
snd_es1938_capture_copy(struct snd_pcm_substream *substream, int channel, snd_pcm_uframes_t pos, void __user *dst, snd_pcm_uframes_t count) { struct snd_pcm_runtime *runtime = substream->runtime; struct es1938 *chip = snd_pcm_substream_chip(substream); pos <<= chip->dma1_shift; count <<=...
false
false
false
false
false
0
ajFmtPrintF(AjPFile file, const char *fmt, ...) { va_list ap; if(!file) return; va_start(ap, fmt); ajFmtVfmt(fmtOutC, file->fp, fmt, ap); va_end(ap); return; }
false
false
false
false
false
0
disconnect(struct usb_interface *intf) { struct ieee80211_hw *hw = zd_intf_to_hw(intf); struct zd_mac *mac; struct zd_usb *usb; /* Either something really bad happened, or we're just dealing with * a DEVICE_INSTALLER. */ if (hw == NULL) return; mac = zd_hw_mac(hw); usb = &mac->chip.usb; dev_dbg_f(zd_usb_...
false
false
false
false
false
0
GListButtonCreate(struct gwindow *base, GGadgetData *gd,void *data) { GListButton *gl = gcalloc(1,sizeof(GListButton)); int i; gl->labeltype = 2; gl->g.takes_input = true; if ( gd->u.list!=NULL ) { gl->ti = GTextInfoArrayFromList(gd->u.list,&gl->ltot); if ( gd->flags & gg_list_alphabetic ) q...
false
false
false
false
false
0
plug_proxy_closing (Plug p, const char *error_msg, int error_code, int calling_back) { Proxy_Plug pp = (Proxy_Plug) p; Proxy_Socket ps = pp->proxy_socket; if (ps->state != PROXY_STATE_ACTIVE) { ps->closing_error_msg = error_msg; ps->closing_error_code = error_code; ps->closing_calling_back = c...
false
false
false
false
false
0
IOWarrior_flush(Driver *drvthis) { PrivateData *p = drvthis->private_data; int x, y; int i; int count; /* Update LCD incrementally by comparing with last contents */ for (y = 0; y < p->height; y++) { int offset = y * p->width; for (x = 0; x < p->width; x++) { if (p->backingstore[offset+x] !...
false
false
false
false
false
0
srcimp_map(struct srcimp *srcimp, struct src *src, struct rsc *input) { struct imapper *entry; int i; srcimp->rsc.ops->master(&srcimp->rsc); src->rsc.ops->master(&src->rsc); input->ops->master(input); /* Program master and conjugate resources */ for (i = 0; i < srcimp->rsc.msr; i++) { entry = &srcimp->imappe...
false
false
false
false
false
0
createMode(int icharge, unsigned int imode, DecayPhaseSpaceModePtr mode, unsigned int iloc,unsigned int ires, DecayPhaseSpaceChannelPtr phase,Energy upp) { tPDPtr part(getParticleData(_id[imode])); // check the mode has the correct charge if(abs(icharge)!=abs(int(getParticleData(_id[imode]...
false
false
false
false
false
0
set_prop_border_x_width_from_value (CRStyle * a_style, CRTerm * a_value, enum CRDirection a_dir) { enum CRStatus status = CR_OK; CRNum *num_val = NULL; g_return_val_if_fail (a_value && a_style, CR_BAD_PARAM_ERROR); ...
false
false
false
false
false
0
host_array_alloc(int *nhostsp, struct host ***hostsp) { int i, nhosts; struct host **hosts; struct gfarm_hash_iterator it; nhosts = 0; FOR_ALL_HOSTS(&it) { host_iterator_access(&it); ++nhosts; } GFARM_MALLOC_ARRAY(hosts, nhosts > 0 ? nhosts : 1); if (hosts == NULL) return (GFARM_ERR_NO_MEMORY); i = 0;...
false
false
false
false
false
0
DohNext(DohIterator iter) { DohIterator niter; if (iter.object) { DohBase *b; DohObjInfo *binfo; b = (DohBase *) iter.object; binfo = b->type; if (binfo->doh_next) { return (binfo->doh_next) (iter); } } niter = iter; return niter; }
false
false
false
false
false
0
generic_dialog_show_cb(GtkWidget *widget, gpointer data) { GenericDialog *gd = data; if (gd->cancel_button) { gtk_box_reorder_child(GTK_BOX(gd->hbox), gd->cancel_button, -1); } g_signal_handlers_disconnect_by_func(G_OBJECT(widget), G_CALLBACK(generic_dialog_show_cb), gd); }
false
false
false
false
false
0
opj_set_decode_area( opj_codec_t *p_codec, opj_image_t* p_image, OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, OPJ_INT32 p_end_x, OPJ_INT32 p_end_y ) { if (p_codec) { opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; if (! l_codec->is_decompressor) { ret...
false
false
false
false
false
0
set_gain_info (Tuple * tuple, int field, int unit_field, const char * text) { int value, unit; parse_gain_text (text, & value, & unit); if (tuple_get_value_type (tuple, unit_field, NULL) == TUPLE_INT) value = value * (int64_t) tuple_get_int (tuple, unit_field, NULL) / unit; else tuple...
false
false
false
false
false
0
soap_in_simple_vectorTemplateOfint(struct soap *soap, const char *tag, simple_vector<int >*a, const char *type) { (void)type; /* appease -Wall -Werror */ short soap_flag; for (soap_flag = 0;; soap_flag = 1) { int n; if (tag && *tag != '-') { if (soap_element_begin_in(soap, tag, 1, NULL)) break; soap_reve...
false
false
false
false
false
0
db_add_functions(void){ if( pDb==0 ) db_open(); sqlite3_create_function(pDb, "sdate", 1, SQLITE_ANY, 0, &sdate, 0, 0); sqlite3_create_function(pDb, "ldate", 1, SQLITE_ANY, 0, &ldate, 0, 0); sqlite3_create_function(pDb, "parsedate", 1, SQLITE_ANY, 0, &pdate, 0, 0); sqlite3_create_function(pDb, "now", 0, SQLITE...
false
false
false
false
false
0
Vect_point_in_poly(double X, double Y, struct line_pnts *Points) { int n_intersects; G_debug(3, "Vect_point_in_poly(): x = %f y = %f n_points = %d", X, Y, Points->n_points); n_intersects = segments_x_ray(X, Y, Points); if (n_intersects == -1) return 2; if (n_intersects % 2) return 1; ...
false
false
false
false
false
0
doEstCdACrr() { RideItem *ride = mainWindow->rideItem(); /* Estimate Crr&Cda */ const QString errMsg = aerolab->estimateCdACrr(ride); if (errMsg.isEmpty()) { /* Update Crr/Cda values values in UI */ crrLineEdit->setText(QString("%1").arg(aerolab->getCrr()) ); crrSlider->setValue(...
false
false
false
false
false
0
DollyXY( int X, int Y ) { int i; double cn[2], ln[2]; this->NormalizeMouseXY(X, Y, &cn[0], &cn[1]); this->NormalizeMouseXY(static_cast<int>(this->LastPix[0]), static_cast<int>(this->LastPix[1]), &ln[0], &ln[1]); double delta[2]; delta[0] = cn[0] - ln[0]; delta[1] = cn[1] - ln[1]...
false
false
false
false
false
0
nilfs_dat_get_vinfo(struct inode *dat, void *buf, unsigned visz, size_t nvi) { struct buffer_head *entry_bh; struct nilfs_dat_entry *entry; struct nilfs_vinfo *vinfo = buf; __u64 first, last; void *kaddr; unsigned long entries_per_block = NILFS_MDT(dat)->mi_entries_per_block; int i, j, n, ret; for (i = ...
false
false
false
false
false
0
timeout_handler(ScreenshotWindow *self) { if (self->_window->window == NULL) return FALSE; if (!self->is_visible()) return FALSE; self->_offset += 1; if (self->_offset > 16) self->_offset = 0; gtk_widget_queue_draw(self->_w.canvas); return TRUE; }
false
false
false
false
false
0
rt_sync_scroll(RendererTiles *rt) { PixbufRenderer *pr = rt->pr; rt->x_scroll = (rt->stereo_mode & PR_STEREO_MIRROR) ? pr->width - pr->vis_width - pr->x_scroll : pr->x_scroll; rt->y_scroll = (rt->stereo_mode & PR_STEREO_FLIP) ? pr->height - pr->vis_height - pr->...
false
false
false
false
false
0
EndEdit(const wxSheetCoords& coords, wxSheet* sheet) { wxCHECK_MSG(IsCreated() && sheet, false, wxT("The wxSheetCellEditor must be Created first!")); bool changed; long value = 0; long oldValue = m_startValue; wxString text; if ( HasRange() ) { value = GetSpinCtrl()->GetValue...
false
false
false
false
false
0
skl_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) { struct skl *skl; struct hdac_ext_bus *ebus = NULL; struct hdac_bus *bus = NULL; int err; /* we use ext core ops, so provide NULL for ops here */ err = skl_create(pci, NULL, &skl); if (err < 0) return err; ebus = &skl->ebus; bus = e...
false
false
false
false
false
0
_mesa_find_used_registers(const struct gl_program *prog, gl_register_file file, GLboolean used[], GLuint usedSize) { GLuint i, j; memset(used, 0, usedSize); for (i = 0; i < prog->NumInstructions; i++) { const struct prog_instruction *inst = prog->Inst...
false
false
false
false
false
0
read_avail( void* out, long count ) { if ( !in || read_( out, &count ) ) count = -1; return count; }
false
false
false
false
false
0
run() { _started.set(); for (;;) { _targetReady.wait(); _mutex.lock(); if (_pTarget) // a NULL target means kill yourself { _mutex.unlock(); try { _pTarget->run(); } catch (Exception& exc) { ErrorHandler::handle(exc); } catch (std::exception& exc) { ErrorHandler::handle...
false
false
false
false
false
0
CleanupInitClass(Tcl_Interp *interp, XOTclClass *cl, Tcl_Namespace *namespacePtr, int softrecreate, int recreate) { XOTclObject *obj = (XOTclObject*)cl; assert(softrecreate? recreate == 1 : 1); #ifdef OBJDELETION_TRACE fprintf(stderr,"+++ CleanupInitClass\n"); #endif /* * during init of O...
false
false
false
false
false
0
test_IsOnSameAtom2() { obErrorLog.SetOutputLevel(obInfo); OBConversion conv; conv.SetInFormat("smi"); OBMol mol; // // Br I C I 0 5 // \ / | | | | // C===C | C C | | 1 3 | // / \ | | | | // Cl F Cl-----F ...
false
false
false
false
false
0
print( std::ostream &os, const problem_t &problem ) const { os << "<hash>: table begin" << std::endl; if (!initialized()) { std::cout<<"<empty>"<<std::endl; } else { for( unsigned i = 0; i < dimension_; ++i ) { if( table_[i] ) os << " bucket[" << i << "] = { "; for( hashEntry_t<d...
false
false
false
false
false
0
trf7970a_tg_config_rf_tech(struct trf7970a *trf, int tech) { int ret = 0; dev_dbg(trf->dev, "rf technology: %d\n", tech); switch (tech) { case NFC_DIGITAL_RF_TECH_106A: trf->iso_ctrl_tech = TRF7970A_ISO_CTRL_NFC_NFC_CE_MODE | TRF7970A_ISO_CTRL_NFC_CE | TRF7970A_ISO_CTRL_NFC_CE_14443A; trf->modulator_sys...
false
false
false
false
false
0
radeon_combios_asic_init(struct drm_device *dev) { struct radeon_device *rdev = dev->dev_private; uint16_t table; /* port hardcoded mac stuff from radeonfb */ if (rdev->bios == NULL) return; /* ASIC INIT 1 */ table = combios_get_table_offset(dev, COMBIOS_ASIC_INIT_1_TABLE); if (table) combios_parse_mmio_ta...
false
false
false
false
false
0
_e_fm_main_hal_volume_del(const char *udi) { E_Volume *v; v = e_volume_find(udi); if (!v) return; if (v->guard) { ecore_timer_del(v->guard); v->guard = NULL; } if (v->prop_handler) e_dbus_signal_handler_del(_e_fm_main_hal_conn, v->prop_handler); if (v->validated) { ...
false
false
false
false
false
0
inherits( const QString& servTypeName ) const { if ( name() == servTypeName ) return true; QString st = parentServiceType(); while ( !st.isEmpty() ) { KServiceType::Ptr ptr = KServiceType::serviceType( st ); if (!ptr) return false; //error if ( ptr->name() == servTypeName...
false
false
false
false
false
0
destroy(SoState * state) { int n = PRIVATE(this)->nestedcachelist.getLength(); for (int i = 0; i < n; i++) { PRIVATE(this)->nestedcachelist[i]->unref(state); } PRIVATE(this)->nestedcachelist.truncate(0); if (PRIVATE(this)->displaylist) { PRIVATE(this)->displaylist->unref(state); PRIVATE(this)->dis...
false
false
false
false
false
0
function_offsets (sqlite3_context *context, int argc, sqlite3_value *argv[]) { gchar *offsets, **names; gint offset_values[4]; GString *result = NULL; gint i = 0; if (argc != 2) { sqlite3_result_error(context, "wrong number of arguments t...
false
false
false
false
false
0
queue_control_request(hfcusb_data *hfc, __u8 reg, __u8 val, int action) { ctrl_buft *buf; if (hfc->ctrl_cnt >= HFC_CTRL_BUFSIZE) return (1); /* no space left */ buf = &hfc->ctrl_buff[hfc->ctrl_in_idx]; /* pointer to new index */ buf->hfc_reg = reg; buf->reg_val = val; buf->action = action; if (++hfc->ctrl_in_...
false
false
false
false
false
0
double_string (gdouble x) { gchar* result = NULL; gchar* value = NULL; gdouble _tmp0_ = 0.0; gchar* _tmp1_ = NULL; const gchar* _tmp2_ = NULL; _tmp0_ = x; _tmp1_ = g_strdup_printf ("%.6f", _tmp0_); value = _tmp1_; _tmp2_ = value; if (g_strcmp0 (_tmp2_, "-0.000000") == 0) { gchar* _tmp3_ = NULL; _tmp3_ = g...
false
false
false
false
false
0
__scanctx_add_filename(struct scan_context *ctx, const char *filename) { unsigned int count = ctx->num_filenames; const char **f; for(f = ctx->filenames; count > 0; ++f, --count) { if(!strcmp(*f, filename)) { free((void *)filename); return(*f); /* a...
false
false
false
false
false
0
utf8_to_cp (const char *s) { char to_set[8]; gsize read, wrote; GError *err = NULL; char *ret = NULL; get_gp_encoding_set(to_set, ENC_CODEPAGE); ret = g_convert(s, -1, to_set, "UTF-8", &read, &wrote, &err); if (err != NULL) { gretl_errmsg_set(err->message); g_error_free(err); ...
false
false
false
false
false
0
leland_i186_sh_start(const struct MachineSound *msound) { int i; /* bail if nothing to play */ if (Machine->sample_rate == 0) return 0; /* determine which sound hardware is installed */ has_ym2151 = 0; for (i = 0; i < MAX_SOUND; i++) if (Machine->drv->sound[i].sound_type == SOUND_YM2151) has_...
false
false
false
false
false
0
smakeleaf(exp) struct nodestruct *exp; { struct nodestruct *left; left = exp->left.nodeptr; if (left->tag == INDIRECTOP || left->tag == STRUCELTOP) smakeleaf(left); else if (left->tag != LEAF) makeleaf(left); if (exp->tag == INDIRECTOP) indirec(left->left.symptr); else { if (left->left....
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)); restoreTree *_t = static_cast<restoreTree *>(_o); switch (_id) { case 0: _t->refreshButtonPushed(); break; case 1: _t->r...
false
false
false
false
false
0
write(std::ostream &s) const{ s << fileHeader <<"\n# (feel free to add / change comments, but leave the first line as it is!)\n#\n"; s << "id " << getTreeType() << std::endl; s << "size "<< size() << std::endl; s << "res " << getResolution() << std::endl; s << "data" << std::endl; // write the ...
false
false
false
false
false
0
module_load_dir_match(const char *dirspec, const char *pattern) { DIR *module_dir = NULL; struct dirent *ldirent = NULL; char module_filename[4096]; module_dir = opendir(dirspec); if (!module_dir) { slog(LG_ERROR, "module_load_dir(): %s: %s", dirspec, strerror(errno)); return; } while ((ldirent = readdir...
false
false
false
false
false
0
createDestination(Arc::JobLogFile &joblog) { std::string url=joblog["loggerurl"]; if (url.substr(0,3) == "CAR") { return new CARDestination(joblog); } //TODO distinguish if ( !joblog["topic"].empty() || url.substr(0,4) == "APEL"){ return new ApelDestination(joblog); }e...
false
false
false
false
false
0
xpc_do_exit(enum xp_retval reason) { short partid; int active_part_count, printed_waiting_msg = 0; struct xpc_partition *part; unsigned long printmsg_time, disengage_timeout = 0; /* a 'rmmod XPC' and a 'reboot' cannot both end up here together */ DBUG_ON(xpc_exiting == 1); /* * Let the heartbeat checker thre...
false
false
false
false
false
0
centroid_and_area(Geom::Point& centroid) const { const unsigned n = boundary.size(); if (n < 2) return 0; if(n < 3) { centroid = (boundary[0] + boundary[1])/2; return 0; } Geom::Point centroid_tmp(0,0); double atmp = 0; for (unsigned i = n-1, j = 0; j < n; i = j, j++)...
false
false
false
false
false
0
ReadChemObject(OBConversion* pConv) { //Makes a new OBReaction and new associated OBMols OBReaction* pReact = new OBReaction; if(pConv->IsFirstInput()) { IMols.clear(); //add special species obsharedptr<OBMol> sp(new OBMol); sp.get()->SetTitle("M"); IMols["M"] = sp; } bool ret=ReadMole...
false
false
false
false
false
0
check_removal_cb( const git_diff_delta *delta, const git_diff_range *range, char line_origin, const char *formatted_output, size_t output_len, void *payload) { GIT_UNUSED(payload); GIT_UNUSED(output_len); switch (line_origin) { case GIT_DIFF_LINE_FILE_HDR: cl_assert_equal_s(EXPECTED_HEADER, formatted_outpu...
false
false
false
false
false
0
asn1_get_alg( unsigned char **p, const unsigned char *end, asn1_buf *alg, asn1_buf *params ) { int ret; size_t len; if( ( ret = asn1_get_tag( p, end, &len, ASN1_CONSTRUCTED | ASN1_SEQUENCE ) ) != 0 ) return( ret ); if( ( end - *p ) < 1 ) ...
false
false
false
false
false
0
Append_DD_to_List (ISNS_DD_LIST p_dlist, uint32_t id) { int ii; __DEBUG (isns_reg_debug &1,(Append_DD_to_List id=%i),id); for (ii = 0; ii < MAX_DD_PER_LIST; ii++) { if (p_dlist[ii] == 0) { p_dlist[ii] = id; return (ISNS_NO_ERR); } else if (p_dlist[ii] == id) ...
false
false
false
false
false
0
H5FD_core_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr, size_t size, void *buf/*out*/) { H5FD_core_t *file = (H5FD_core_t*)_file; herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5FD_core_read, FAIL) assert(file && file->pub.cls); ...
false
false
false
false
false
0
PrintTraces( t1, t2 ) TimeType t1,t2; { Trptr t; int nt; for( t = traces.first, nt = traces.disp; nt != 0; nt--, t = t->next ) { if( IsVector( t ) ) PrintVector( t, t1, t2 ); else PrintSignal( t, t1, t2 ); } }
false
false
false
false
false
0
tp_call_content_media_description_add_rtcp_feedback_message ( TpCallContentMediaDescription *self, guint codec_identifier, const gchar *type, const gchar *subtype, const gchar *parameters) { GValueArray *properties; GValue *value; GPtrArray *messages_array; g_return_if_fail (TP_IS_CALL_CONT...
false
false
false
false
false
0
release_list( CTX c ) { if( !c->list ) return; proc_tree(c, c->list ); release_kbnode( c->list ); while( c->pkenc_list ) { struct kidlist_item *tmp = c->pkenc_list->next; xfree( c->pkenc_list ); c->pkenc_list = tmp; } c->pkenc_list = NULL; c->list = NULL; c->have_data = 0; c->las...
false
false
false
false
false
0
pwm_regulator_list_voltage(struct regulator_dev *rdev, unsigned selector) { struct pwm_regulator_data *drvdata = rdev_get_drvdata(rdev); if (selector >= rdev->desc->n_voltages) return -EINVAL; return drvdata->duty_cycle_table[selector].uV; }
false
false
false
false
false
0
jas_iccattrtab_get(jas_iccattrtab_t *attrtab, int i, jas_iccattrname_t *name, jas_iccattrval_t **val) { jas_iccattr_t *attr; if (i < 0 || i >= attrtab->numattrs) goto error; attr = &attrtab->attrs[i]; *name = attr->name; if (!(*val = jas_iccattrval_clone(attr->val))) goto error; return 0; error: return -1;...
false
false
false
false
false
0
config_destroy(void) { g_cond_signal(cond); /* ??? g_thread_join(saving_thread); */ g_mutex_free(change_config_mutex); g_cond_free(cond); g_free(plugin_config_path); g_key_file_free(keyfile_plugin); if(keyfile_project) { g_key_file_free(keyfile_project); } }
false
false
false
false
false
0
open(QIODevice::OpenMode mode) { if((mode & QIODevice::ReadOnly) != 0) { if(inflateInit(&d->zins) != Z_OK) { setErrorString(d->zins.msg); return false; } } if((mode & QIODevice::WriteOnly) != 0) { if(deflateInit(&d->zouts, Z_DEFAULT_COMPRESSION...
false
false
false
false
false
0
doc_pl_parse(const char *str, int len, unsigned int *resolution) { PclType type; *resolution = 0; if ((len >= 9) && (memcmp(str, "\033%-12345X", 9) == 0)) type = doc_pjl_parse(str, len, resolution); else if ((len >= 11) && (memcmp(str, ") HP-PCL XL", 11) == 0)) type = PCLTYPE_PXL; else if ((len >=...
false
false
false
false
false
0
gd_tagged_entry_tag_draw (GdTaggedEntryTag *tag, cairo_t *cr, GdTaggedEntry *entry) { GtkStyleContext *context; GtkStateFlags state; GtkAllocation background_allocation, layout_allocation, button_allocation; context = gd_tagged_entry_tag_get_context (entry); ...
false
false
false
false
false
0
direct_thread_destroy( DirectThread *thread ) { D_MAGIC_ASSERT( thread, DirectThread ); D_ASSUME( !pthread_equal( thread->thread, pthread_self() ) ); D_ASSUME( !thread->detached ); D_DEBUG_AT( Direct_Thread, "%s( %p, '%s' %d )\n", __FUNCTION__, thread->main, thread->name, thread->tid ); if (t...
false
false
false
false
false
0
cm_gdata_update_contacts_cache(void) { if(prefs_common.work_offline) { debug_print("GData plugin: Offline mode\n"); } else if(!cm_gdata_config.username || *(cm_gdata_config.username) == '\0' || !cm_gdata_config.password) { /* noop if no credentials are given */ debug_print("GData plugin: Empty use...
false
false
false
false
false
0
abort_ind(struct avdtp *session, struct avdtp_local_sep *sep, struct avdtp_stream *stream, uint8_t *err, void *user_data) { struct a2dp_sep *a2dp_sep = user_data; struct a2dp_setup *setup; if (a2dp_sep->type == AVDTP_SEP_TYPE_SINK) DBG("Sink %p: Abort_Ind", sep); else DBG("Source %p: Abort_Ind", sep); ...
false
false
false
false
false
0
overwrite_type_check (parser *p) { int err = 0; if (p->targ == NUM && p->lh.t == VEC && p->lh.obs >= 0) { ; /* OK */ } else if ((p->targ == BOBJ || p->targ == BMEMB) && p->lh.t == BUNDLE) { ; /* OK */ } else if (p->targ != p->lh.t) { /* don't overwrite one type with another */ maybe_do_type_errmsg(...
false
false
false
false
false
0
panel_menu_item_presence_new (TpAccountManager *account_manager, PanelSessionManagerPresenceType presence_type, const char *name, const char *icon, gboolean use_icon) { GtkWidget *item; if (!account_...
false
false
false
false
false
0
sign_test_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button, SignTestToolState *state) { data_analysis_output_t *dao; GtkWidget *w; analysis_tools_data_sign_test_t *data; analysis_tool_engine engine; data = g_new0 (analysis_tools_data_sign_test_t, 1); dao = parse_output ((GenericToolState *)state, N...
false
false
false
false
false
0
e_volume_eject(E_Volume *v) { switch (mode) { #ifdef HAVE_HAL_MOUNT case EFM_MODE_USING_HAL_MOUNT: _e_fm_main_hal_volume_eject(v); break; #endif #ifdef HAVE_UDISKS_MOUNT case EFM_MODE_USING_UDISKS_MOUNT: _e_fm_main_udisks_volume_eject(v); break; #endif #ifdef HAVE_EEZE_MOUNT ...
false
false
false
false
false
0
active_ofld_conn_reply(struct c4iw_dev *dev, struct sk_buff *skb, struct cpl_fw6_msg_ofld_connection_wr_rpl *req) { struct c4iw_ep *ep; int atid = be32_to_cpu(req->tid); ep = (struct c4iw_ep *)lookup_atid(dev->rdev.lldi.tids, (__force u32) req->tid); if (!ep) return; switch (req->retval) { case FW_...
false
false
false
false
false
0
group_requests(netsnmp_agent_request_info *agtreq_info, netsnmp_request_info *requests, netsnmp_container *request_group, table_container_data * tad) { netsnmp_table_request_info *tblreq_info; netsnmp_index *row, *tmp, index; netsnmp_request_info *current; netsnmp_request_g...
false
false
false
false
false
0
asn1PE_H245MediaDistributionCapability (OOCTXT* pctxt, H245MediaDistributionCapability* pvalue) { int stat = ASN_OK; ASN1BOOL extbit; /* extension bit */ extbit = 0; encodeBit (pctxt, extbit); encodeBit (pctxt, (ASN1BOOL)pvalue->m.centralizedDataPresent); encodeBit (pctxt, (ASN1BOOL)pvalue->m....
false
false
false
false
false
0
replaceDefinition(const char *name, const void *def, void **v) { void *old_def = this->removeDefinition(name); if (v) *v = old_def; this->addDefinition(name, def); return TRUE; }
false
false
false
false
false
0
enic_isr_legacy(int irq, void *data) { struct net_device *netdev = data; struct enic *enic = netdev_priv(netdev); unsigned int io_intr = enic_legacy_io_intr(); unsigned int err_intr = enic_legacy_err_intr(); unsigned int notify_intr = enic_legacy_notify_intr(); u32 pba; vnic_intr_mask(&enic->intr[io_intr]); p...
false
false
false
false
false
0
wlc_phy_down(struct brcms_phy_pub *pih) { struct brcms_phy *pi = container_of(pih, struct brcms_phy, pubpi_ro); int callbacks = 0; if (pi->phycal_timer && !wlapi_del_timer(pi->phycal_timer)) callbacks++; pi->nphy_iqcal_chanspec_2G = 0; pi->nphy_iqcal_chanspec_5G = 0; return callbacks; }
false
false
false
false
false
0
vjc_print(register const char *bp, u_short proto _U_) { int i; switch (bp[0] & 0xf0) { case TYPE_IP: if (eflag) printf("(vjc type=IP) "); return PPP_IP; case TYPE_UNCOMPRESSED_TCP: if (eflag) printf("(vjc type=raw TCP) "); return PPP_IP; case TYPE_COMPRESSED_TCP: if (eflag) printf("(vjc type=co...
false
false
false
false
false
0
create_multi_NUBspline_3d_c (NUgrid* x_grid, NUgrid* y_grid, NUgrid* z_grid, BCtype_c xBC, BCtype_c yBC, BCtype_c zBC, int num_splines) { // Create new spline multi_NUBspline_3d_c* restrict spline = malloc (sizeof(multi_NUBspline_3d_c)); spline->spcode = MULTI_NU3D; spline->tcode = SINGLE_COMPL...
false
false
false
false
true
1
display_cats_update(void *closure, int sxn, int syn, int button) { struct display_cats *dc = closure; double x = D_d_to_u_col(sxn); double y = D_d_to_u_row(syn); G_debug(2, "button = %d x = %d = %f y = %d = %f", button, sxn, x, syn, y); /* Display last highlighted in normal color */ G_debug(2,...
false
false
false
false
false
0
strprint(STRING *str) { long n; char *c; c = str->s_str; n = str->s_len; while (n-- > 0) (void) printechar(c++); }
false
false
false
false
false
0
qof_query_printSearchFor (QofQuery * query, GList * output) { QofIdType searchFor; GString *gs; searchFor = qof_query_get_search_for (query); gs = g_string_new ("Query Object Type: "); g_string_append (gs, (NULL == searchFor) ? "(null)" : searchFor); output = g_list_append (output, gs); re...
false
false
false
false
false
0
oaktrail_output_init(struct drm_device *dev) { struct drm_psb_private *dev_priv = dev->dev_private; if (dev_priv->iLVDS_enable) oaktrail_lvds_init(dev, &dev_priv->mode_dev); else dev_err(dev->dev, "DSI is not supported\n"); if (dev_priv->hdmi_priv) oaktrail_hdmi_init(dev, &dev_priv->mode_dev); psb_intel_sdv...
false
false
false
false
false
0
Build_LCTree (const wfa_t *wfa, LCTree_t *LCTree, toptions_t *options, int local_root, int *lrw_to_lwr, int depth) /* * recursive construction of the new LCTree out of the wfa-tree * * wfa - pointer on wfa-tree containing the data * LCTree - pointer on LCTree-struct to build * options - po...
false
false
false
false
false
0
fimc_is_hw_set_isp_buf_mask(struct fimc_is *is, unsigned int mask) { if (hweight32(mask) == 1) { dev_err(&is->pdev->dev, "%s(): not enough buffers (mask %#x)\n", __func__, mask); return; } if (mcuctl_read(is, MCUCTL_REG_ISSR(23)) != 0) dev_dbg(&is->pdev->dev, "non-zero DMA buffer mask\n"); mcuctl_wri...
false
false
false
false
false
0
checkValue(AttributeValue *value, AttributeContext &context) const { const AttributeValue *fixedValue = DefaultAttributeDefinition::defaultValue(0); if (value && fixedValue && context.validate()) { const Text *text; const StringC *str; const Text *fixedText; const StringC *fixedS...
false
false
false
false
false
0
taxEmbossTaxAll(AjPTaxin taxin) { AjPQuery qry; TaxPEmbossQry qryd; static ajint i = 0; ajuint iref; AjPStr name = NULL; AjBool ok = ajFalse; /* AjPStrTok handle = NULL; AjPStr wildname = NULL; AjBool found = ajFalse; */ qry = taxin->Input->Query; qryd...
false
false
false
false
false
0
create_description() { /*TO TRANSLATORS: looks like Check and repair file system (ext3) on /dev/hda4 */ description = String::ucompose( _("Check and repair file system (%1) on %2"), Utils::get_filesystem_string( partition_original .filesystem ), partition_original .get_path() ) ; }
false
false
false
false
false
0
art_vpath_affine_transform (const ArtVpath *src, const double matrix[6]) { int i; int size; ArtVpath *new; double x, y; for (i = 0; src[i].code != ART_END; i++); size = i; new = art_new (ArtVpath, size + 1); for (i = 0; i < size; i++) { new[i].code = src[i].code; x = src[i].x; y...
false
true
false
false
false
1
lookupSection(ObjectFile &OF, StringRef Name) { StringRef FoundName; for (const auto &Section : OF.sections()) { if (auto EC = Section.getName(FoundName)) return EC; if (FoundName == Name) return Section; } return coveragemap_error::no_data_found; }
false
false
false
false
false
0
gnm_expr_top_unref (GnmExprTop const *texpr) { g_return_if_fail (IS_GNM_EXPR_TOP (texpr)); ((GnmExprTop *)texpr)->refcount--; if (texpr->refcount == 0) { gnm_expr_free (texpr->expr); ((GnmExprTop *)texpr)->magic = 0; g_free ((GnmExprTop *)texpr); } }
false
false
false
false
false
0
break_out_subroutines (struct decision_head *head, int initial) { int size = 0; struct decision *sub; for (sub = head->first; sub; sub = sub->next) size += 1 + break_out_subroutines (&sub->success, 0); if (size > SUBROUTINE_THRESHOLD && ! initial) { head->first->subroutine_number = ++next_subrou...
false
false
false
false
false
0
get_best_samplerate(GF_AudioMixer *am, u32 *out_sr, u32 *out_ch, u32 *out_bps) { if (!am->ar) return GF_OK; if (!am->ar->audio_out || !am->ar->audio_out->QueryOutputSampleRate) return GF_OK; return am->ar->audio_out->QueryOutputSampleRate(am->ar->audio_out, out_sr, out_ch, out_bps); }
false
false
false
false
false
0
secure_write(Port *port, void *ptr, size_t len) { ssize_t n; int waitfor; retry: waitfor = 0; #ifdef USE_SSL if (port->ssl_in_use) { n = be_tls_write(port, ptr, len, &waitfor); } else #endif { n = secure_raw_write(port, ptr, len); waitfor = WL_SOCKET_WRITEABLE; } if (n < 0 && !port->noblock && (err...
false
false
false
false
false
0
nvkm_perfsrc_new(struct nvkm_pm *pm, struct nvkm_perfsig *sig, const struct nvkm_specsrc *spec) { const struct nvkm_specsrc *ssrc; const struct nvkm_specmux *smux; struct nvkm_perfsrc *src; u8 source_nr = 0; if (!spec) { /* No sources are defined for this signal. */ return 0; } ssrc = spec; while (ssrc...
false
false
false
false
false
0