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
GetFixedTree(unsigned* ll_lengths, unsigned* d_lengths) { size_t i; for (i = 0; i < 144; i++) ll_lengths[i] = 8; for (i = 144; i < 256; i++) ll_lengths[i] = 9; for (i = 256; i < 280; i++) ll_lengths[i] = 7; for (i = 280; i < 288; i++) ll_lengths[i] = 8; for (i = 0; i < 32; i++) d_lengths[i] = 5; }
false
false
false
false
false
0
notLaurent(PolynomialSet const &s) { PolynomialRing theRing=s.getRing(); PolynomialSet ret(theRing); for(PolynomialSet::const_iterator i=s.begin();i!=s.end();i++) ret.push_back(notLaurent(*i)); return ret; }
false
false
false
false
false
0
ftmask_def_eval(struct ftmask_def *active_def, char *rec, struct fts3rec_offsets *fo) { struct radix_node_head *rhead; struct radix_sockaddr_in sock1; struct ftmask_prefix_rec *prefix_rec; if ((fo->xfields & FT_XFIELD_SRCADDR) && (fo->xfields & FT_XFIELD_SRC_MASK)) { rhead = active_def->rhead; ...
false
false
false
false
false
0
spif_socket_done(spif_socket_t self) { ASSERT_RVAL(!SPIF_SOCKET_ISNULL(self), FALSE); if (self->fd >= 0) { spif_socket_close(self); } self->fam = AF_INET; self->type = SOCK_STREAM; self->proto = 0; if (self->addr != SPIF_NULL_TYPE(sockaddr)) { SPIF_DEALLOC(self->addr); ...
false
false
false
false
false
0
DeleteCacheRecord(Widget w, XtPointer tag, XtPointer data) #else static void DeleteCacheRecord(w, tag, data) Widget w; XtPointer tag, data; #endif { MsgDialogCache *cache = (MsgDialogCache *)tag; int i; XtFree((char *)cache->dialogs); /* the dialogs will be auto. destroyed */ for(i=0; i < cache->num; ...
false
false
false
false
false
0
operator<<(QDebug dbg, const QServicePackage& p) { if (p.isValid()) { QString type; switch(p.d->packageType) { case QServicePackage::ObjectCreation: type = QString("ObjectCreation"); break; case QServicePackage::MethodCall: type...
false
false
false
false
false
0
CalculateBleu(Phrase translation) const { if (translation.GetSize() == 0) return 0.0; Phrase normTranslation = translation; // remove start and end symbol for chart decoding if (m_cur_source_length != m_cur_norm_source_length) { WordsRange* range = new WordsRange(1, translation.GetSize()-2); normT...
false
false
false
false
false
0
H5G_compact_build_table_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_udata) { const H5O_link_t *lnk = (const H5O_link_t *)_mesg; /* Pointer to link */ H5G_iter_bt_t *udata = (H5G_iter_bt_t *)_udata; /* 'User data' passed in */ herr_t ret_value=H5_ITER_CONT; /* Return value */ ...
false
false
false
false
false
0
send_ext_msg_udp(struct netconsole_target *nt, const char *msg, int msg_len) { static char buf[MAX_PRINT_CHUNK]; /* protected by target_list_lock */ const char *header, *body; int offset = 0; int header_len, body_len; if (msg_len <= MAX_PRINT_CHUNK) { netpoll_send_udp(&nt->np, msg, msg_len); return; ...
false
false
false
false
false
0
read_image( QIODevice* io ) { jas_stream_t* in = 0; in = jas_stream_qiodevice( io ); if( !in ) return 0; jas_image_t* image = jas_image_decode( in, -1, 0 ); jas_stream_close( in ); // image may be 0, but that's Ok return image; }
false
false
false
false
false
0
thermal_generate_netlink_event(struct thermal_zone_device *tz, enum events event) { struct sk_buff *skb; struct nlattr *attr; struct thermal_genl_event *thermal_event; void *msg_header; int size; int result; static unsigned int thermal_event_seqnum; if (!tz) return -EINVAL; /* allocate memory */ size...
false
false
false
false
false
0
mark_exp_read (tree exp) { if (exp == NULL) return; switch (TREE_CODE (exp)) { case VAR_DECL: case PARM_DECL: DECL_READ_P (exp) = 1; break; case ARRAY_REF: case COMPONENT_REF: case MODIFY_EXPR: case REALPART_EXPR: case IMAGPART_EXPR: CASE_CONVERT: case ADDR_E...
false
false
false
false
true
1
set_redial(const std::string& redial) { std::string temp(utf8_to_lower(redial)); if (!temp.compare("yes")) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(redial_check_button_p), true); } else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(redial_check_button_p), false); }
false
false
false
false
false
0
DAC960_queue_partial_rw(DAC960_Command_T *Command) { DAC960_Controller_T *Controller = Command->Controller; struct request *Request = Command->Request; struct request_queue *req_q = Controller->RequestQueue[Command->LogicalDriveNumber]; if (Command->DmaDirection == PCI_DMA_FROMDEVICE) Command->CommandType ...
false
false
false
false
false
0
gnm_simple_canvas_key_press (GtkWidget *widget, GdkEventKey *event) { GnmSimpleCanvas *gcanvas = GNM_SIMPLE_CANVAS (widget); if (gcanvas->scg->grab_stack > 0) return TRUE; return parent->key_press_event (widget, event); }
false
false
false
false
false
0
gnumeric_ipmt (GnmFuncEvalInfo *ei, GnmValue const * const *argv) { gnm_float rate = value_get_as_float (argv[0]); gnm_float per = value_get_as_float (argv[1]); gnm_float nper = value_get_as_float (argv[2]); gnm_float pv = value_get_as_float (argv[3]); gnm_float fv = argv[4] ? value_get_as_float (argv[4]) : 0...
false
false
false
false
false
0
gsb_data_transaction_find_by_payment_content ( const gchar *string, gint account_number ) { GSList *tmp_list; gint64 number_1; gchar *endptr; if (!string) return 0; errno = 0; number_1 = g_ascii_strtoll ( string, &endptr, 10); if ( errno == ERANGE ) ...
false
false
false
false
false
0
textfield_selectable(const fn_call& fn) { TextField* ptr = ensure<IsDisplayObject<TextField> >(fn); if ( fn.nargs == 0 ) // getter { return as_value(ptr->isSelectable()); } else // setter { ptr->setSelectable( toBool(fn.arg(0), getVM(fn)) ); } return as_value(); }
false
false
false
false
false
0
subFloat64Sigs(float64 a, float64 b, int zSign, float_status_t &status) { Bit16s aExp, bExp, zExp; Bit64u aSig, bSig, zSig; Bit16s expDiff; aSig = extractFloat64Frac(a); aExp = extractFloat64Exp(a); bSig = extractFloat64Frac(b); bExp = extractFloat64Exp(b); expDiff = aExp - bExp; a...
false
false
false
false
false
0
ilk_update_sprite_wm(struct drm_plane *plane, struct drm_crtc *crtc, uint32_t sprite_width, uint32_t sprite_height, int pixel_size, bool enabled, bool scaled) { struct drm_device *dev = plane->dev; struct intel_plane *intel_plane = to_intel_plane(plane); /* * IVB workaround: must disable low ...
false
false
false
false
false
0
getNextBoardStatus(int index, KBlocksField * field) { KBlocksPiece * piece = new KBlocksPiece(); if (!getNextPieceState(index, piece)) { delete field; field = 0; delete piece; return false; } field->copy(mpField); for(int i = 0; i < KBlocksPiece_Cel...
false
false
false
false
false
0
CDATASectionImpl() : TextImpl() { nodeType = CDATA_SECTION_NODE; nodeName = "#cdata-section"; }
false
false
false
false
false
0
bacon_video_widget_set_referrer (BaconVideoWidget *bvw, const char *referrer) { BaconVideoWidgetPrivate *priv; char *frag; g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw)); priv = bvw->priv; if (g_strcmp0 (referrer, priv->referrer) == 0) return; g_free (priv->referrer)...
false
false
false
false
false
0
HandlePlayerLeaveZone(Player* player, bool isMainZone) { if (m_zonePlayers.erase(player->GetObjectGuid())) { // remove the world state information from the player if (isMainZone && !player->GetSession()->PlayerLogout()) { SendRemoveWorldStates(player); } sLog.outDebug("Playe...
false
false
false
false
false
0
sqliteStrDup(const char *z){ char *zNew; if( z==0 ) return 0; zNew = sqliteMallocRaw(strlen(z)+1); if( zNew ) strcpy(zNew, z); return zNew; }
false
false
false
false
false
0
e_destination_store_remove_destination (EDestinationStore *destination_store, EDestination *destination) { GPtrArray *array; gint n; g_return_if_fail (E_IS_DESTINATION_STORE (destination_store)); n = find_destination_by_pointer (destination_store, destination); if (n < 0) ...
false
false
false
false
false
0
log(const char *prefix) const { time_t idTime = getTimestamp(); char timeBuf[500]; struct tm *idTm = NULL; if (idTime != -1) { idTm = localtime(&idTime); } if (idTm != NULL) { strftime(timeBuf, sizeof(timeBuf), "%c", idTm); } else { snprintf(timeBuf, sizeof(timeBuf), "NULL"); } ArL...
false
false
false
false
false
0
set_port_by_name(std::string& int_name, std::string& ext_name) {itested(); for (int i=0; i<max_nodes(); ++i) {itested(); if (int_name == port_name(i)) {itested(); set_port_by_index(i, ext_name); return; }else{itested(); } } untested(); throw Exception_No_Match(int_name); }
false
false
false
false
false
0
decrypt_memcpy(unsigned char *dst, unsigned char *src, int len, unsigned char *iv, ast_aes_decrypt_key *dcx) { unsigned char lastblock[16]; int x; memcpy(lastblock, iv, sizeof(lastblock)); while(len > 0) { ast_aes_decrypt(src, dst, dcx); for (x=0;x<16;x++) dst[x] ^= lastblock[x]; memcpy(lastblock, src, siz...
true
true
false
false
false
1
DetermineNumberOfTimesteps() { size_t toc=0, raster=0, hist1d=0, hist2d=0, accel=0; bool is_color = false; for(size_t block=0; block < m_pDatasetFile->GetDataBlockCount(); ++block) { switch(m_pDatasetFile->GetDataBlock(block)->GetBlockSemantic()) { case UVFTables::BS_1D_HISTOGRAM: hist1d++; break; ...
false
false
false
false
false
0
iwl_pcie_txq_build_tfd(struct iwl_trans *trans, struct iwl_txq *txq, dma_addr_t addr, u16 len, bool reset) { struct iwl_queue *q; struct iwl_tfd *tfd, *tfd_tmp; u32 num_tbs; q = &txq->q; tfd_tmp = txq->tfds; tfd = &tfd_tmp[q->write_ptr]; if (reset) memset(tfd, 0, sizeof(*tfd)); num_tbs = iwl_pcie_tfd...
false
false
false
false
false
0
setCWD(d) char *d; { if (DirStack == NULL) list_push(&DirStack, (UnivPtr)NULL); PWD_PTR = freealloc((UnivPtr) PWD, strlen(d) + 1); strcpy(PWD, d); }
false
false
false
false
false
0
fall() { for( anim_phase += anim_speed; anim_phase >= 10; anim_phase -= 10) { snow_y = snow_y + fall_speed; while( snow_y - radius - bound_y1 >= v_sep) { snow_y -= v_sep; blind_site = (blind_site + 1) % 3; if(++period > 1000) period = 1000; } snow_x += random(amplitude * 2 + 1) - amplitude + sl...
false
false
false
false
false
0
have_equal_ts(child_sa_t *child1, child_sa_t *child2, bool local) { enumerator_t *e1, *e2; traffic_selector_t *ts1, *ts2; bool equal = FALSE; e1 = child1->create_ts_enumerator(child1, local); e2 = child2->create_ts_enumerator(child2, local); if (e1->enumerate(e1, &ts1) && e2->enumerate(e2, &ts2)) { equal = ts...
false
false
false
false
false
0
resetbddhopertable( HashTable ) bddhopertable *HashTable; { bddassoc *ScanAssoc; if ( HashTable->NUMBER_OPER > 0 ) { memset( (void *)HashTable->TABLE, 0, (size_t)HashTable->TABLE_SIZE * sizeof( bddhoper ) ); HashTable->NUMBER_OPER = 0; HashTable->NUMBER_RESET++; if ( BddLocalSys...
false
false
false
false
false
0
add_menu_accel(GeanyKeyGroup *group, guint kb_id, GtkAccelGroup *accel_group, GtkWidget *menuitem) { GeanyKeyBinding *kb = keybindings_get_item(group, kb_id); if (kb->key != 0) gtk_widget_add_accelerator(menuitem, "activate", accel_group, kb->key, kb->mods, GTK_ACCEL_VISIBLE); }
false
false
false
false
false
0
gst_alpha_transform_frame (GstVideoFilter * filter, GstVideoFrame * in_frame, GstVideoFrame * out_frame) { GstAlpha *alpha = GST_ALPHA (filter); GST_ALPHA_LOCK (alpha); if (G_UNLIKELY (!alpha->process)) goto not_negotiated; alpha->process (in_frame, out_frame, alpha); GST_ALPHA_UNLOCK (alpha); ...
false
false
false
false
false
0
testMacroAssertGE_cstr_good(void ) { try { SVUT_ASSERT_GE((char*)10,(char*)20); } catch (svutExAssertFailLimit) { CPPUNIT_FAIL("Thow unexpected svutExAssertFailLimit exception."); } catch (...) { CPPUNIT_FAIL("Thow unexpected exception."); } }
false
false
false
false
false
0
ucs2cmp(const ucs2_char_t* x, const ucs2_char_t* y) { while (*x && *y && *x == *y) { x++; y++; } return COMP(*x, *y); }
false
false
false
false
false
0
mbp_check_config(GIOChannel *ch, GIOCondition condition, gpointer userdata) { int fd; int ret; fd = g_io_channel_unix_get_fd(ch); if (condition & G_IO_IN) { ret = config_load(); if (ret < 0) { fprintf(stderr, "Failed to reload config file, exiting\n"); gtk_main_quit(); } } clos...
false
false
false
false
false
0
SearchHeadersForCppFile(const std::string& absFilename, const std::list<std::string>& headerExtensions, std::set<std::string>& absHeaders) { // search for header files and private header files we may need to moc: const std::string basename = ...
false
false
false
false
false
0
clone_rsc_location(resource_t * rsc, rsc_to_node_t * constraint) { GListPtr gIter = rsc->children; pe_rsc_trace(rsc, "Processing location constraint %s for %s", constraint->id, rsc->id); native_rsc_location(rsc, constraint); for (; gIter != NULL; gIter = gIter->next) { resource_t *child_rsc =...
false
false
false
false
false
0
scbuf_opt_set (scbuf_t cb, scbuf_opt_t name, int value) { int rc = 0; assert (cb != NULL); scbuf_mutex_lock (cb); assert (scbuf_is_valid (cb)); if (name == SCBUF_OPT_OVERWRITE) { if ( (value == SCBUF_NO_DROP) || (value == SCBUF_WRAP_ONCE) || (value == SCBUF_WRAP_M...
false
false
false
false
false
0
gtkmorph_settings_callback(GtkWidget* thismenu, gpointer userdata) { #if HAVE_WAILI extern int wavelet_depth; extern double wavelet_equalization_factor; wavelet_equalization_factor =0.5 * settings_get_value("wavelet equalization"); wavelet_depth=settings_get_value("wavelet depth")+1; #endif /* if the meshe...
false
false
false
false
false
0
setPen(const QPen &pen) { if (pen.widthF() != m_pen.widthF()) { prepareGeometryChange(); } m_pen = pen; update(); }
false
false
false
false
false
0
add_listener_addr(const char* addr) { ioa_addr baddr; if(make_ioa_addr((const u08bits*)addr,0,&baddr)<0) { TURN_LOG_FUNC(TURN_LOG_LEVEL_ERROR,"Cannot add a listener address: %s\n",addr); } else { char sbaddr[129]; addr_to_string_no_port(&baddr,(u08bits*)sbaddr); size_t i = 0; for(i=0;i<turn_params.list...
false
false
false
false
false
0
sv_to_cblock(des_cblock block, SV *in_block) { U8 *in_octets; STRLEN in_len; bool must_free; sv_to_octets(&in_octets, &in_len, &must_free, in_block); if(in_len != 8) croak("data block must be eight octets long"); memcpy(block, in_octets, 8); if(must_free) Safefree(in_octets); }
false
false
false
false
false
0
regclass_for_constraint (enum constraint_num c) { switch (c) { case CONSTRAINT_f: return TARGET_ARM ? FPA_REGS : NO_REGS; case CONSTRAINT_t: return TARGET_32BIT ? VFP_LO_REGS : NO_REGS; case CONSTRAINT_v: return TARGET_ARM ? CIRRUS_REGS : NO_REGS; case CONSTRAINT_w: return TARGET_32BIT ? (TARGET_V...
false
false
false
false
false
0
windows_private_save_dirsync_cookie(const Repl_Agmt *ra) { Dirsync_Private *dp = NULL; Slapi_PBlock *pb = NULL; Slapi_DN* sdn = NULL; int rc = 0; Slapi_Mods *mods = NULL; LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_save_dirsync_cookie\n" ); PR_ASSERT(ra); dp = (Dirsync_Private *) agmt_get...
false
false
false
false
false
0
value_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) { struct gpiod_data *data = dev_get_drvdata(dev); struct gpio_desc *desc = data->desc; ssize_t status; mutex_lock(&data->mutex); if (!test_bit(FLAG_IS_OUT, &desc->flags)) { status = -EPERM; } else { long value;...
false
false
false
false
false
0
itemForIndex( const QModelIndex& index ) const { if (!index.isValid()) { return d->m_dirLister->rootItem(); } else { return static_cast<KDirModelNode*>(index.internalPointer())->item(); } }
false
false
false
false
false
0
fillTexture(const Document& doc) { const std::vector<const Connection*>& conns = doc.GetConnectionsByDestinationSequenced(ID()); for(size_t i = 0; i < conns.size();++i) { const Connection* con = conns.at(i); const Object* const ob = con->SourceObject(); if(!ob) { DOMWarning("failed to read source object fo...
false
false
false
false
false
0
rocker_dma_rx_ring_skb_map(const struct rocker_port *rocker_port, struct rocker_desc_info *desc_info, struct sk_buff *skb, size_t buf_len) { const struct rocker *rocker = rocker_port->rocker; struct pci_dev *pdev = rocker->pdev; dma_addr_t dma_handle; dma_handle = pci_map_single(pdev, skb->data...
false
false
false
false
false
0
rhash_file_update(rhash ctx, FILE* fd) { rhash_context_ext* const ectx = (rhash_context_ext*)ctx; const size_t block_size = 8192; unsigned char *buffer, *pmem; size_t length = 0, align8; int res = 0; if (ectx->state != STATE_ACTIVE) return 0; /* do nothing if canceled */ if (ctx == NULL) { errno = EINVAL; r...
false
false
false
false
false
0
welcome_screen_visibility (gboolean value) { gtk_widget_set_visible (g_alignment_welcome, value); gtk_widget_set_visible (g_drawing_area, !value); if(value == TRUE) { // set the label with value for word wrap gtk_widget_set_size_request( GTK_WIDGET (gtk_builder_get_object (gweled_xml, "lab...
false
false
false
false
false
0
do_acc_scan_Vxc(symmMatrix & D, const IntegralInfo & integralInfo, const BasisInfoStruct & basisInfo, const Molecule & molecule, const Dft::GridParams & gridParams, int noOfElectrons, triangMatrix & invCholFactor, bool doInvCholFactorTransformation, mat::SizesAndBlocks const & matrix_size_block_info, ...
false
false
false
false
false
0
main(argc,argv) int argc; char *argv[]; { int Int1; char *Tech; CurrentCell = 0; NumCells = 0; /* partial initialization */ Parameters.kpMenu = BASICMENU; #ifndef USE_OLD_MALLOC nm_set_block_size(NMALLOC_BLOCK_SIZE); #endif #ifdef WIN32 { // If started from an icon, ditch the c...
false
false
false
false
false
0
pause_menu (void) { int l = 0; a_timer pause_htimer; dmsg (D_SECTION, "pause menu"); pause_htimer = new_htimer (T_GLOBAL, 1); halve_volume (); event_sfx (58); corner[0] = render_buffer[0]; uninit_keyboard_map (); key_or_joy_reset (); std_white_fadein (&dummy_background_img.palette); do { ...
false
false
false
false
false
0
Sync(void) { if(reset) { setprg16(0x8000, latche & 7); setprg16(0xC000, 7); setmirror(MI_V); } else { uint32 bank = (latche & 0x1F) + 8; if (latche & 0x20) { setprg16(0x8000, bank); setprg16(0xC000, bank); } else setprg32(0x8000, bank >> 1); setmirror((latche >> 6) & 1); } setch...
false
false
false
false
false
0
wifi_wext_get_ssid (WifiData *data) { WifiDataWext *wext = (WifiDataWext *) data; struct iwreq wrq; char ssid[IW_ESSID_MAX_SIZE + 2]; guint32 len; GByteArray *array = NULL; memset (ssid, 0, sizeof (ssid)); wrq.u.essid.pointer = (caddr_t) &ssid; wrq.u.essid.length = sizeof (ssid); wrq.u.essid.flags = 0; strnc...
false
false
false
false
false
0
GetBlock(std::string BlockName, int64_t npart_toread, int64_t start_part, int skip_type) { std::vector<float> data; float* block=NULL; int64_t read_chunk, total_read=0, read; short partlen; if(!IsBlock(BlockName)) return data; partlen=file_...
false
false
false
false
false
0
setWindow (double xmin, double ymin, double xmax, double ymax) { if (xmin >= xmax || ymin >= ymax) { sys_error (ERR_WARNING, "Minimum > Maximum [sgp2_window]"); return; } xw_min = xmin; yw_min = ymin; xw_max = xmax; yw_max = ymax; m_bRecalcTransform = true; }
false
false
false
false
false
0
counterclockwise(struct mesh *m, struct behavior *b, vertex pa, vertex pb, vertex pc) #else /* not ANSI_DECLARATORS */ REAL counterclockwise(m, b, pa, pb, pc) struct mesh *m; struct behavior *b; vertex pa; vertex pb; vertex pc; #endif /* not ANSI_DECLARATORS */ { REAL detleft, detright, det; ...
false
false
false
false
false
0
e_calendar_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { ECalendar *cal; GtkStyle *style; GtkAllocation old_allocation; PangoFontDescription *font_desc; PangoContext *pango_context; PangoFontMetrics *font_metrics; gdouble old_x2, old_y2, new_x2, new_y2; gdouble xthickn...
false
false
false
false
false
0
saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, int num, int retries) { int i = 0, count = 0; __le32 *buffer = dev->d_i2c.cpu_addr; int err = 0; int short_delay = 0; if (mutex_lock_interruptible(&dev->i2c_lock)) return -ERESTARTSYS; for(i=0;i<num;i++) { DEB_I2C("msg:%d/%d\n", i+1, ...
false
false
false
false
false
0
pkix_pl_LdapCertStore_DestroyAVAList( LDAPNameComponent **nameComponents, void *plContext) { LDAPNameComponent **currentNC = NULL; unsigned char *component = NULL; PKIX_ENTER(CERTSTORE, "pkix_pl_LdapCertStore_DestroyAVAList"); PKIX_NULLCHECK_ONE(nameComponents); ...
false
false
false
false
false
0
bsg_create_job(struct device *dev, struct request *req) { struct request *rsp = req->next_rq; struct request_queue *q = req->q; struct bsg_job *job; int ret; BUG_ON(req->special); job = kzalloc(sizeof(struct bsg_job) + q->bsg_job_size, GFP_KERNEL); if (!job) return -ENOMEM; req->special = job; job->req = ...
false
false
false
false
false
0
main(int argc,char *argv[]) { string key; cout << "Input Keyword : "; cin >> key; for(int i=1;i<argc;i++) { string infile=argv[i]; string::size_type pos=infile.find_last_of("."); string outfile=infile.substr(0,pos)+".kaw"; ifstream ifs; ifs.open(infile.c_str()); ofstream ofs; ofs.open(outfile.c_str(...
false
false
false
false
false
0
bind_init(void) { char temp[512]; int n=1; base_uri=i_path; res=ne_concat(i_path,"resource",NULL); // Create base collection called bind-test base_uri=ne_concat(i_path,"bind-test/",NULL); ONNREQ("could not create collection", ne_mkcol(i_session, base_uri)); sprintf(temp,"bind-test/collX/resource%...
false
false
false
false
false
0
update_signed_certificate (common_info_st * cinfo) { gnutls_x509_crt_t crt; size_t size; int result; gnutls_privkey_t ca_key; gnutls_x509_crt_t ca_crt; int days; time_t tim = time (NULL); fprintf (stderr, "Generating a signed certificate...\n"); ca_key = load_ca_private_key (cinfo); ca_crt = load_...
false
false
false
false
false
0
merge_weak (newdecl, olddecl) tree newdecl; tree olddecl; { if (DECL_WEAK (newdecl) == DECL_WEAK (olddecl)) return; if (DECL_WEAK (newdecl)) { tree wd; /* NEWDECL is weak, but OLDDECL is not. */ /* If we already output the OLDDECL, we're in trouble; we can't go back and mak...
false
false
false
false
false
0
convert_snap( libspectrum_snap *snap, const settings_t *settings ) { libspectrum_tape *tape = libspectrum_tape_alloc(); int error; print_verbose( "\nCreating TZX file:\n" ); error = create_main_header( tape, settings->loader_name ); if( error ) { libspectrum_tape_free( tape ); return error; } error = cre...
false
false
false
false
false
0
looking_at (char *string, SEARCH_BINDING *binding) { long search_end; if (search (string, binding, &search_end) != search_success) return 0; /* If the string was not found, SEARCH_END is -1. If the string was found, but not right away, SEARCH_END is != binding->start. Otherwise, the string was f...
false
false
false
false
false
0
_CONF_new_data(CONF *conf) { if (conf == NULL) { return 0; } if (conf->data == NULL) if ((conf->data = lh_CONF_VALUE_new()) == NULL) { return 0; } return 1; }
false
false
false
false
false
0
insertEditObj (int i, int j, char obj) { dbk2 << i << j << obj; if ((i < 1) || (j < 1) || (i > levelData.width) || (j > levelData.height)) { return; // Do nothing: mouse pointer is out of playfield. } if (editableCell (i, j) == HERO) { // The hero is in this cell: remove him. s...
false
false
false
false
false
0
msole_metadata_write_string (WritePropState *state, const char *txt) { guint8 buf[4]; guint32 len; gchar *ctxt; gsize bytes_written; gboolean res; if (!txt) txt = ""; len = strlen (txt); ctxt = g_convert_with_iconv (txt, len, state->iconv_handle, NULL, &bytes_written, NULL); GSF_LE_SET_GUINT32 (buf,...
false
false
false
false
false
0
BufferPos(unsigned int num) const { if (!buffer_) return 0; if (num != 0) return 0; return begin_; }
false
false
false
false
false
0
operator<<=(int n) { int i; if (n < 0) // avoid negatives { *this >>= -n; return *this; } this->Expand(this->Sig + n); // first shift for (i = this->Sig; i >= n; i--) { this->Number[i] = this->Number[i - n]; } for (i = n - 1; i >= 0; i--) // then fill with 0s { this-...
false
false
false
false
false
0
slotGameAddVariation(const Analysis& analysis) { game().addVariation(analysis.variation(), QString::number(analysis.score() / 100.0, 'f', 2)); slotGameChanged(); }
false
false
false
false
false
0
sd_dqcallback(struct gspca_dev *gspca_dev) { struct sd *sd = (struct sd *) gspca_dev; if (sd->autogain == NULL || !v4l2_ctrl_g_ctrl(sd->autogain)) return; do_autogain(gspca_dev, sd->avg_lum); }
false
false
false
false
false
0
box_reset_bc (GfsBox * box, GfsLinearProblem * lp) { FttDirection d; for (d = 0; d < FTT_NEIGHBORS; d++) if (GFS_IS_BOUNDARY (box->neighbor[d]) && !GFS_IS_BOUNDARY_PERIODIC (box->neighbor[d])) { GfsBoundary * b = GFS_BOUNDARY (box->neighbor[d]); ftt_face_traverse_boundary (b->root, b->d, F...
false
false
false
false
false
0
getNthSymbolDg(void *ctx, size_t n, Dsymbol *sym) { GetNthSymbolCtx *p = (GetNthSymbolCtx *)ctx; if (n == p->nth) { p->sym = sym; return 1; } return 0; }
false
false
false
false
false
0
startups_cleanup_internal( bool age_P ) { for( QMap< KStartupInfoId, KStartupInfo::Data >::Iterator it = startups.begin(); it != startups.end(); ) { if( age_P ) ( *it ).age++; unsigned int tout = timeout; if( ( *it ).silent() == Data::Yes ) // TODO tout *= 20...
false
false
false
false
false
0
write(hsStream* S, plResManager* mgr) { plSingleModifier::write(S, mgr); S->writeInt(fMorphs.getSize()); for (size_t i=0; i<fMorphs.getSize(); i++) fMorphs[i].write(S, mgr); S->writeInt(fSharedMeshes.getSize()); for (size_t i=0; i<fSharedMeshes.getSize(); i++) mgr->writeKey(S, fSha...
false
false
false
false
false
0
__ecereInstMeth___ecereNameSpace__ecere__gui__controls__EditBox_NotifyModified__00000001(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * editBox) { struct __ecereNameSpace__ecere__gui__controls__EditableSelectorButton * __ecerePointer___ecereNameSpace__ecere__gui__c...
false
false
false
false
false
0
evSubTime(struct timespec *res, const struct timespec *minuend, const struct timespec *subtrahend) { res->tv_sec = minuend->tv_sec - subtrahend->tv_sec; if (minuend->tv_nsec >= subtrahend->tv_nsec) res->tv_nsec = minuend->tv_nsec - subtrahend->tv_nsec; else { res->tv_nsec = (BILLION - subtrahend->tv...
false
false
false
false
false
0
Verify(const DL_GroupParameters<Integer> &params, const DL_PublicKey<Integer> &publicKey, const Integer &e, const Integer &r, const Integer &s) const { Integer p = params.GetGroupOrder()-1; const Integer &q = params.GetSubgroupOrder(); Integer Vsg = params.ExponentiateBase(s); Integer Vry = publicKey.ExponentiateP...
false
false
false
false
false
0
processByValArgument(CallSite CS, unsigned ArgNo) { const DataLayout &DL = CS.getCaller()->getParent()->getDataLayout(); // Find out what feeds this byval argument. Value *ByValArg = CS.getArgument(ArgNo); Type *ByValTy = cast<PointerType>(ByValArg->getType())->getElementType(); uint64_t ByValSize = DL.getTyp...
false
false
false
false
false
0
ProcessResult(const CUInt128& answer, TagPtrList *info) { wxString type = wxT("Unknown"); switch (m_type) { case FILE: type = wxT("File"); ProcessResultFile(answer, info); break; case KEYWORD: type = wxT("Keyword"); ProcessResultKeyword(answer, info); break; case NOTES: type = wxT("Notes");...
false
false
false
false
false
0
conn_plain_write(conn_t * conn, void *data, size_t len) { if(IsDead(conn)) /* again no point in queueing to dead men */ return; rb_rawbuf_append(conn->plainbuf_out, data, len); }
false
false
false
false
false
0
ixgbe_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd) { struct ixgbe_adapter *adapter = netdev_priv(dev); int ret = -EOPNOTSUPP; switch (cmd->cmd) { case ETHTOOL_SRXCLSRLINS: ret = ixgbe_add_ethtool_fdir_entry(adapter, cmd); break; case ETHTOOL_SRXCLSRLDEL: ret = ixgbe_del_ethtool_fdir_entry(ad...
false
false
false
false
false
0
callback_send_o_transform_rot_real32(void *user, VNodeID node_id, uint32 time_s, uint32 time_f, const VNQuat32 *rot, const VNQuat32 *speed, const VNQuat32 *accelerate, const VNQuat32 *drag_normal, real32 drag) { VSNodeObject *node; unsigned int i, count; node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT...
false
false
false
false
false
0
store_amb_max(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count) { struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); struct i5k_amb_data *data = dev_get_drvdata(dev); unsigned long temp; int ret = kstrtoul(buf, 10, &temp); if (ret < 0) r...
false
false
false
false
false
0
vmw_sou_screen_object_flippable(struct vmw_private *dev_priv, struct drm_crtc *crtc) { struct vmw_screen_object_unit *sou = vmw_crtc_to_sou(crtc); if (!sou->base.is_implicit) return true; if (dev_priv->sou_priv->num_implicit != 1) return false; return true; }
false
false
false
false
false
0
linkGlobalInits() { // Loop over all of the globals in the src module, mapping them over as we go for (Module::const_global_iterator I = SrcM->global_begin(), E = SrcM->global_end(); I != E; ++I) { // Only process initialized GV's or ones not already in dest. if (!I->hasInitializer() || DoNotLin...
false
false
false
false
false
0
stack_depth(const stack& s) { if (s->trace != NULL) fprintf(s->trace, "Stack depth %d/%d\n", s->top, s->size); return s->top; }
false
false
false
false
false
0
inherits_from_p (tree type1, tree type2) { while (type1 != NULL_TREE && TREE_CODE (type1) == RECORD_TYPE) { if (type1 == type2) return 1; if (! CLASS_LOADED_P (type1)) load_class (type1, 1); type1 = maybe_layout_super_class (CLASSTYPE_SUPER (type1), type1); } return 0; }
false
false
false
false
false
0
sort_blocks(int n, int k, bam1_p *buf, const char *prefix, const bam_header_t *h, int is_stdout) { char *name, mode[3]; int i; bamFile fp; ks_mergesort(sort, k, buf, 0); name = (char*)calloc(strlen(prefix) + 20, 1); if (n >= 0) { sprintf(name, "%s.%.4d.bam", prefix, n); strcpy(mode, "w1"); } else { sprintf...
false
false
false
false
false
0
error(QWidget *parent, const QString &text, const QString &caption, Options options) { return errorListWId( parent ? parent->effectiveWinId() : 0, text, QStringList(), caption, options ); }
false
false
false
false
false
0
sn_SendDestroyer( int client ) { tASSERT( 0 <= client && client <= MAXCLIENTS+1 ); if ( destroyers[ client ] ) { destroyers[ client ]->SendImmediately( client, false ); new nWaitForAckDestroy( destroyers[ client ], client ); destroyers[ client ] = 0; } }
false
false
false
false
false
0