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
AntiAliasFilter( PicArray& out_data, const PicArray& in_data ) const{ //Special case for first row for (int i = in_data.FirstX(); i <= in_data.LastX(); ++i) { out_data[in_data.FirstY()][i] = (3*in_data[in_data.FirstY()][i] + in_data[in_data.FirstY()+1][i] +2 )>>2; ...
false
false
false
false
false
0
p54_config(struct ieee80211_hw *dev, u32 changed) { int ret = 0; struct p54_common *priv = dev->priv; struct ieee80211_conf *conf = &dev->conf; mutex_lock(&priv->conf_mutex); if (changed & IEEE80211_CONF_CHANGE_POWER) priv->output_power = conf->power_level << 2; if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { ...
false
false
false
false
false
0
acm_ctrl_irq(struct urb *urb) { struct acm *acm = urb->context; struct usb_cdc_notification *dr = urb->transfer_buffer; unsigned char *data; int newctrl; int difference; int retval; int status = urb->status; switch (status) { case 0: /* success */ break; case -ECONNRESET: case -ENOENT: case -ESHUTDOWN:...
false
false
false
false
false
0
RemoveDefaultDataSource (void) { BOOL retcode = FALSE; PCONFIG pCfg = NULL; /* removes the default dsn */ if (!RemoveDSNFromIni ("Default", 'A')) { PUSH_ERROR (ODBC_ERROR_REQUEST_FAILED); goto quit; } /* removes the default driver not regarding the current config mode */ if (_iodbcdm_c...
false
false
false
false
false
0
createNewConnectionToCoordinator (bool dieOnError) { const char * coordinatorAddr = getenv(ENV_VAR_NAME_HOST); const char * coordinatorPortStr = getenv(ENV_VAR_NAME_PORT); if ( coordinatorAddr == NULL ) coordinatorAddr = DEFAULT_HOST; int coordinatorPort = coordinatorPortStr == NULL ?...
false
false
false
false
false
0
patom(char **fmt, char *buf) { char *start=*fmt; char c; int len; while (1) { c = *(*fmt)++; if (isalnum((int) c) || (c == '_') || (c == '@')) continue; else break; } (*fmt)--; len = *fmt - start; memcpy(buf, start, len); buf[len] = 0; return buf; }
false
false
false
false
false
0
qlcnic_dev_statistics_len(struct qlcnic_adapter *adapter) { int len = -1; if (qlcnic_82xx_check(adapter)) { len = qlcnic_82xx_statistics(adapter); if (adapter->flags & QLCNIC_ESWITCH_ENABLED) len += ARRAY_SIZE(qlcnic_device_gstrings_stats); } else if (qlcnic_83xx_check(adapter)) { len = qlcnic_83xx_statist...
false
false
false
false
false
0
pixWrite(const char *filename, PIX *pix, l_int32 format) { FILE *fp; PROCNAME("pixWrite"); if (!pix) return ERROR_INT("pix not defined", procName, 1); if (!filename) return ERROR_INT("filename not defined", procName, 1); if (format == IFF_JP2) r...
false
false
false
false
false
0
mono_metadata_implmap_from_method (MonoImage *meta, guint32 method_idx) { locator_t loc; MonoTableInfo *tdef = &meta->tables [MONO_TABLE_IMPLMAP]; if (!tdef->base) return 0; /* No index translation seems to be needed */ loc.t = tdef; loc.col_idx = MONO_IMPLMAP_MEMBER; loc.idx = ((method_idx + 1) << MONO_ME...
false
false
false
false
false
0
UnwatchCommand( void *theEnv) { DATA_OBJECT theValue; char *argument; int recognized; struct watchItem *wPtr; /*==========================================*/ /* Determine which item is to be unwatched. */ /*==========================================*/ if (EnvArgTypeCheck(theEnv,"unwatch",1,...
false
false
false
false
false
0
httpClientNewError(HTTPConnectionPtr connection, int method, int persist, int code, AtomPtr message) { HTTPRequestPtr request; request = httpMakeRequest(); if(request == NULL) { do_log(L_ERROR, "Couldn't allocate error request.\n"); httpClientFinish(connection, 1); ...
false
false
false
false
false
0
getMDFString() { int i, typecnt= this->getTypes()->getSize(); const char* const *typeNames = this->getTypeStrings(); char *types = new char[64 * typecnt]; types[0] = '\0'; char *p = types; for (i=0; i<typecnt ; i++, p+=STRLEN(p)) { if (i+1 == typecnt) sprintf(p,"%s",typeNames[i]); e...
false
false
false
false
false
0
isl_union_map_sample(__isl_take isl_union_map *umap) { isl_basic_map *sample = NULL; if (!umap) return NULL; if (isl_hash_table_foreach(umap->dim->ctx, &umap->table, &sample_entry, &sample) < 0 && !sample) goto error; if (!sample) sample = isl_basic_map_empty(isl_union_map_get_space(umap)); i...
false
false
false
false
false
0
PQgetlineAsync(PGconn *conn, char *buffer, int bufsize) { if (!conn) return -1; if (PG_PROTOCOL_MAJOR(conn->pversion) >= 3) return pqGetlineAsync3(conn, buffer, bufsize); else return pqGetlineAsync2(conn, buffer, bufsize); }
false
false
false
false
false
0
drawPixmap(QScriptContext *ctx, QScriptEngine *eng) { DECLARE_SELF(QPainter, drawPixmap); if (ctx->argumentCount() == 2) { // target, pixmap QScriptValue arg0 = ctx->argument(0); QPixmap pixmap = qscriptvalue_cast<QPixmap>(ctx->argument(1)); if (arg0.property("width").isValid()) ...
false
false
false
false
false
0
js_DateSetMonth(JSContext *cx, JSObject *obj, int month) { jsdouble local; JS_ASSERT(month < 12); if (!GetAndCacheLocalTime(cx, obj, NULL, &local)) return; /* bail if date was NaN */ if (JSDOUBLE_IS_NaN(local)) return; local = date_msecFromDate(YearFromTime(local), ...
false
false
false
false
false
0
ss_loadimage(char *file, PXM *pxmout) // new v.11.01 { int cc, fww, fhh, px, py, orgx, orgy; PXM *pxmtemp1, *pxmtemp2; double wscale, hscale, scale; uint8 *pix1, *pix2; cc = ss_ww * ss_hh * 3; ...
false
false
false
false
false
0
bnxt_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) { int rc = 0; struct bnxt *bp = netdev_priv(dev); struct bnxt_link_info *link_info = &bp->link_info; u32 speed, fw_advertising = 0; bool set_pause = false; if (BNXT_VF(bp)) return rc; if (cmd->autoneg == AUTONEG_ENABLE) { if (link_info->med...
false
false
false
false
false
0
toInt(std::string str) { if(str.empty()) return 0; str=stringToUpper(str); if(str.length() > 2 && str[0]=='0' && str[1]=='X') return strtoul(&(str.c_str()[2]),NULL,16); else return strtoul(str.c_str(),NULL,10); }
false
false
false
false
false
0
cxgb_down(struct adapter *adapter, int on_wq) { t3_sge_stop(adapter); spin_lock_irq(&adapter->work_lock); /* sync with PHY intr task */ t3_intr_disable(adapter); spin_unlock_irq(&adapter->work_lock); free_irq_resources(adapter); quiesce_rx(adapter); t3_sge_stop(adapter); if (!on_wq) flush_workqueue(cxgb3_wq)...
false
false
false
false
false
0
recursive_equal(VALUE ary1, VALUE ary2, int recur) { long i; if (recur) return Qtrue; /* Subtle! */ for (i=0; i<RARRAY_LEN(ary1); i++) { if (!rb_equal(rb_ary_elt(ary1, i), rb_ary_elt(ary2, i))) return Qfalse; } return Qtrue; }
false
false
false
false
false
0
insertToDoEntry ( DlCompletionTree* node, const ConceptWDep& C, DagTag tag, const char* reason = NULL ) { // we will change current Node => save it if necessary updateLevel ( node, C.getDep() ); CGraph.addConceptToNode ( node, C, tag ); setUsed(C.bp()); if ( node->isCached() ) return correctCachedEntr...
false
false
false
false
false
0
dlz_addrdataset(const char *name, const char *rdatastr, void *dbdata, void *version) { struct dlz_example_data *state = (struct dlz_example_data *)dbdata; if (version != (void *) &state->transaction_started) return (ISC_R_FAILURE); if (state->log != NULL) state->log(ISC_LOG_INFO, "dlz_example: adding rdatase...
false
false
false
false
false
0
ovnextblock(OVBUFF *ovbuff) { int i, j, last, lastbit, left; ULONG *table; last = ovbuff->totalblk/(sizeof(long) * 8); if ((left = ovbuff->totalblk % (sizeof(long) * 8)) != 0) { last++; } table = ((ULONG *) ovbuff->bitfield + (OV_BEFOREBITF / sizeof(long))); /* For tighter placement look for unus...
false
false
false
false
false
0
hx509_revoke_ocsp_print(hx509_context context, const char *path, FILE *out) { struct revoke_ocsp ocsp; int ret; if (out == NULL) out = stdout; memset(&ocsp, 0, sizeof(ocsp)); ocsp.path = strdup(path); if (ocsp.path == NULL) return ENOMEM; ret = load_ocsp(context, &ocsp); if (ret) {...
false
false
false
false
false
0
Dialog_FieldsList(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder) : Dialog_Layout(cobject, builder, false /* means no table title */), m_treeview_fields(0), m_button_field_up(0), m_button_field_down(0), m_button_field_add(0), m_button_field_delete(0), m_button_field_edit(0), m_button_f...
false
false
false
false
false
0
return_from_sys_call( struct stack_item *stack, unsigned long code, u_64 cyc_time ) { char category; const char *name; int should_be_hex; u_64 delta; if( stack->pos > 0 && code<FKT_UNSHIFTED_LIMIT_CODE ) {/* stacked code was a trap/syscall/IRQ */ fkt_find_syscall(fxt,code, &category, &name, &should_be_...
false
false
false
false
false
0
fileline_initialize (struct backtrace_state *state, backtrace_error_callback error_callback, void *data) { int failed; fileline fileline_fn; int pass; int called_error_callback; int descriptor; if (!state->threaded) failed = state->fileline_initialization_failed; else failed = backtrace_at...
false
false
false
false
false
0
runModeless(XAP_Frame * pFrame) { constructDialog(); UT_return_if_fail(m_windowMain); abiSetupModelessDialog(GTK_DIALOG(m_windowMain), pFrame, this, GTK_RESPONSE_CLOSE); gtk_widget_show(m_windowMain); }
false
false
false
false
false
0
maze_markov_state_list_lookup( struct maze_markov_state_list *l, unsigned int x, unsigned int y ) { while ((l) && ((l->node->coord.x != x) || (l->node->coord.y != y))) l = l->next; if (l) return l->node; else return 0; }
false
false
false
false
false
0
_minefield_view_minefield___lambda2_ (MinefieldView* self, guint x, guint y) { Minefield* _tmp0_ = NULL; guint _tmp1_ = 0U; guint _tmp2_ = 0U; gboolean _tmp3_ = FALSE; _tmp0_ = self->priv->_minefield; _tmp1_ = x; _tmp2_ = y; _tmp3_ = minefield_is_cleared (_tmp0_, _tmp1_, _tmp2_); if (_tmp3_) { guint _tmp4_ =...
false
false
false
false
false
0
no_work(int pid) { if (!ready) return true; for (int i=0; i<max_wu_results; i++) { if (wu_results[i].state == WR_STATE_PRESENT) { wu_results[i].state = pid; return false; } } return true; }
false
false
false
false
false
0
configChanged() { // plot background setCanvasBackground(GColor(CPLOTBACKGROUND)); // curve QPen pen; QColor brush_color; if (source == Metric) { pen.setColor(metricColor.darker(200)); brush_color = metricColor; } else { switch (series) { case RideFile::w...
false
false
false
false
false
0
gt_match_create(const GtMatchClass *matchc, unsigned long start1, unsigned long end1, unsigned long start2, unsigned long end2, const char *seqid1, const char *seqid2, GtMatchDirection dir) { GtMatch *match; gt_asser...
false
false
false
false
false
0
expand_match(ginflate_t *I, ginflate_byte_t *p, ginflate_byte_t *pend) { ginflate_uint_t i; ginflate_uint_t n = umin(I->match_len, pend-p); ginflate_uint_t dist = I->match_dist; ginflate_uint_t pos = I->ringbuf_pos; ginflate_byte_t *rin...
false
false
false
false
false
0
general_name_parse_other (GNode *node, GcrGeneralName *general) { GNode *decode = NULL; GQuark oid; GNode *any; general->type = GCR_GENERAL_NAME_OTHER; general->description = _("Other Name"); general->display = NULL; oid = egg_asn1x_get_oid_as_quark (egg_asn1x_node (node, "type-id", NULL)); any = egg_asn1x_no...
false
false
false
false
false
0
external_client_plug_init(const sasl_utils_t *utils, int max_version, int *out_version, sasl_client_plug_t **pluglist, int *plugcount) { if (!utils || !out_version || !pluglist || !plugcount) return SASL_BADPARAM; if (max_version != SASL_CLIENT_PLUG_VERSION) { SETERROR...
false
false
false
false
false
0
dotruncate(unsigned size) { int oldsize = file_size; int ret; size -= size % truncbdy; if (size > biggest) { biggest = size; if (!quiet && testcalls > simulatedopcount) prt("truncating to largest ever: 0x%x\n", size); } log4(OP_TRUNCATE, size, (unsigned)file_size, 0); if (size > file_size) memset(goo...
false
false
false
false
false
0
afr_self_heal_parent_entrylk (call_frame_t *frame, xlator_t *this, afr_lock_cbk_t lock_cbk) { afr_local_t *local = NULL; afr_self_heal_t *sh = NULL; afr_internal_lock_t *int_lock = NULL; int ret = -1; int32_...
false
false
false
false
false
0
dumpToScreen(const Eris::Meta& meta) { for (unsigned int S=0; S < meta.getGameServerCount(); ++S) { const Eris::ServerInfo& sv = meta.getInfoForServer(S); cout << S << ": " << sv.getServername() << '/'<< sv.getHostname() << endl; switch (sv.getStatus()) { case Er...
false
false
false
false
false
0
print_pwqp_body(__isl_take isl_pw_qpolynomial *pwqp, void *user) { struct isl_union_print_data *data; data = (struct isl_union_print_data *)user; if (!data->first) data->p = isl_printer_print_str(data->p, "; "); data->first = 0; data->p = isl_pwqp_print_isl_body(data->p, pwqp); isl_pw_qpolynomial_free(pwqp); ...
false
false
false
false
false
0
jerasure_erasures_to_erased(int k, int m, int *erasures) { int td; int t_non_erased; int *erased; int i; td = k+m; erased = talloc(int, td); if (erased == NULL) return NULL; t_non_erased = td; for (i = 0; i < td; i++) erased[i] = 0; for (i = 0; erasures[i] != -1; i++) { if (erased[erasures[i]...
false
true
false
false
false
1
set_data(void *i2c_priv, int data) { struct ast_i2c_chan *i2c = i2c_priv; struct ast_private *ast = i2c->dev->dev_private; int i; u8 ujcrb7, jtemp; for (i = 0; i < 0x10000; i++) { ujcrb7 = ((data & 0x01) ? 0 : 1) << 2; ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0xfb, ujcrb7); jtemp = ast_get_index_...
false
false
false
false
false
0
SetKeyRange(uint16_t Low, uint16_t High) { KeyRange.low = Low; KeyRange.high = High; // make sure regions are already loaded Instrument* pInstrument = (Instrument*) GetParent(); if (!pInstrument->pRegions) pInstrument->LoadRegions(); if (!pInstrument->pRegions) return; ...
false
false
false
false
false
0
geoclue_geonames_freeform_address_to_position (GcIfaceGeocode *iface, const char *address, GeocluePositionFields *fields, double *latitude, ...
false
false
false
false
false
0
output_constructor_array_range (oc_local_state *local) { unsigned HOST_WIDE_INT fieldsize = int_size_in_bytes (TREE_TYPE (local->type)); HOST_WIDE_INT lo_index = tree_low_cst (TREE_OPERAND (local->index, 0), 0); HOST_WIDE_INT hi_index = tree_low_cst (TREE_OPERAND (local->index, 1), 0); HOST_WIDE_IN...
false
false
false
false
false
0
m5602_stop_transfer(struct gspca_dev *gspca_dev) { struct sd *sd = (struct sd *) gspca_dev; /* Run the sensor specific end transfer sequence */ if (sd->sensor->stop) sd->sensor->stop(sd); }
false
false
false
false
false
0
_InitDefScriptInterface(void) { AddFunc("pause",&DefScriptPackage::SCpause); AddFunc("emote",&DefScriptPackage::SCemote); AddFunc("follow",&DefScriptPackage::SCfollow); AddFunc("savecache",&DefScriptPackage::SCsavecache); AddFunc("sendchatmessage",&DefScriptPackage::SCSendChatMessage); AddFunc("...
false
false
false
false
false
0
vchan_find_desc(struct virt_dma_chan *vc, dma_cookie_t cookie) { struct virt_dma_desc *vd; list_for_each_entry(vd, &vc->desc_issued, node) if (vd->tx.cookie == cookie) return vd; return NULL; }
false
false
false
false
false
0
free_group(struct grplist *ge) { if (ge) { memset(ge->name, 0, NAMELEN); free_group(ge->next); free(ge->next); ge->next = NULL; } }
false
false
false
false
false
0
phantom_refill_rx_ring ( struct net_device *netdev ) { struct phantom_nic *phantom = netdev_priv ( netdev ); struct io_buffer *iobuf; struct phantom_rds rds; unsigned int handle; int index; for ( handle = 0 ; handle < PHN_RDS_MAX_FILL ; handle++ ) { /* Skip this index if the descriptor has not yet been * c...
false
false
false
false
false
0
transpose(void) { if (data()==0) return *this; unsigned aSize=size(); MSTypeData<unsigned char,MSAllocator<unsigned char> > *d=MSTypeData<unsigned char,MSAllocator<unsigned char> >::allocateWithSize(aSize); unsigned char *dp=d->elements(); unsigned char *mp=data(); unsigned i,j; for (i=0;i<columns();i++) ...
false
false
false
false
false
0
_lookupProperties(void) { const gchar * pszFootnoteType = NULL; const PP_AttrProp* pDocAP = getDocument()->getAttrProp(); UT_return_if_fail(pDocAP); pDocAP->getProperty("document-footnote-type", (const gchar *&)pszFootnoteType); m_FootnoteType = FootnoteTypeFromString(pszFootnoteType); const gchar * pszEndnoteTy...
false
false
false
false
false
0
Threshold(const R2Grid& threshold, RNScalar low, RNScalar high) { // Set grid value to low (high) if less/equal (greater) than threshold for (int i = 0; i < grid_size; i++) { if ((grid_values[i] != R2_GRID_UNKNOWN_VALUE) && (threshold.grid_values[i] != R2_GRID_UNKNOWN_VALUE)) { if (grid_values[i] <=...
false
false
false
false
false
0
get_filename_ext(const char *filename) { const char *dot = strrchr(filename, '.'); if(!dot || dot == filename) return ""; return dot + 1; }
false
false
false
false
false
0
processInput() { TABLE_TYPE currentType = ApplicationEntity; char line[1024]; char *c; while (fgets(line, sizeof(line), stdin) != NULL) { fprintf(stdout, "%s", line); c = line; while (*c == ' ' || *c == '\t') c++; if (c[0] == '#') continue; else if (c[0] == '\n') continue; else if...
true
true
false
false
false
1
crc_itu32_check(const uint8_t *buf, int len) { uint32_t crc; int i; crc = 0xFFFFFFFF; for (i = 0; i < len; i++) crc = ((crc >> 8) & 0x00FFFFFF) ^ crc_itu32_table[(crc ^ buf[i]) & 0xFF]; return (crc == 0xDEBB20E3); }
false
false
false
false
false
0
InsertToplevel( Interactor* i, Interactor* leader, IntCoord left, IntCoord bottom, Alignment a ) { delete i->insert_window; TopLevelWindow* w = new TopLevelWindow(i); i->insert_window = w; i->managed_window = w; w->display(display_); w->pplace(left, bottom); AlignPosition(w, a); ...
false
false
false
false
false
0
do_zfile (const char *method, const char *path) { size_t len; const char *zcat; CLEANUP_FREE char *cmd = NULL; FILE *fp; char line[256]; if (STREQ (method, "gzip") || STREQ (method, "compress")) zcat = str_zcat; else if (STREQ (method, "bzip2")) zcat = str_bzcat; else { reply_with_error ("u...
true
true
true
false
true
1
clear_memalloc(int memalloc) { if (memalloc) current->flags &= ~PF_MEMALLOC; }
false
false
false
false
false
0
test_not_undoable_action (void) { GtkSourceBuffer *buffer = gtk_source_buffer_new (NULL); gtk_source_buffer_set_max_undo_levels (buffer, -1); /* On empty buffer */ gtk_source_buffer_begin_not_undoable_action (buffer); gtk_text_buffer_set_text (GTK_TEXT_BUFFER (buffer), "foo\n", -1); gtk_source_buffer_end_not_und...
false
false
false
false
false
0
macb_poll_controller(struct net_device *dev) { struct macb *bp = netdev_priv(dev); struct macb_queue *queue; unsigned long flags; unsigned int q; local_irq_save(flags); for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) macb_interrupt(dev->irq, queue); local_irq_restore(flags); }
false
false
false
false
false
0
ebt_parse_ip6_address(char *address, struct in6_addr *addr, struct in6_addr *msk) { struct in6_addr *tmp_addr; char buf[256]; char *p; int i; int err; strncpy(buf, address, sizeof(buf) - 1); /* first the mask */ buf[sizeof(buf) - 1] = '\0'; if ((p = strrchr(buf, '/')) != NULL) { *...
true
true
false
false
false
1
iter_rb_tree(uint64_t *nextents, uint64_t *nchunks) { struct rb_node *n; *nchunks = *nextents = 0; n = rb_first(&rb_root); if (!n) return; do { struct chunk *c; c = rb_entry(n, struct chunk, rb_node); (*nchunks)++; *nextents += c->count; if (dump_output) show_chunk(c); } while ((n = rb_next(n...
false
false
false
false
false
0
HttpProxyOptions_set_proxyport(HttpProxyOptions* hpo, char* proxyport) { assert(hpo != NULL); if (hpo == NULL) { return; } string_cp(&(hpo->proxyport), proxyport); }
false
false
false
false
false
0
vfs_fseek(VFSFile * file, int64_t offset, int whence) { g_return_val_if_fail (file && file->sig == VFS_SIG, -1); if (verbose) logger ("VFS: <%p> seek to %"PRId64" from %s\n", file, offset, whence == SEEK_CUR ? "current" : whence == SEEK_SET ? "beginning" : whence == ...
false
false
false
false
false
0
TRANS_pipe(void) { int mode = TS_MODE_READ; /* Nom du fichier */ TRANS_expression(FALSE); /* mode d'ouverture */ if (TRANS_is(RS_FOR)) { if (TRANS_is(RS_READ)) mode |= TS_MODE_READ | TS_MODE_DIRECT; //else if (TRANS_is(RS_INPUT)) // mode |= TS_MODE_READ; if (TRANS_is(RS_WRITE)) mode |= TS_MODE...
false
false
false
false
false
0
cp_parser_type_id_list (cp_parser* parser) { tree types = NULL_TREE; while (true) { cp_token *token; tree type; /* Get the next type-id. */ type = cp_parser_type_id (parser); /* Add it to the list. */ types = add_exception_specifier (types, type, /*complain=*/1); /*...
false
false
false
false
false
0
vmx_segment_cache_test_set(struct vcpu_vmx *vmx, unsigned seg, unsigned field) { bool ret; u32 mask = 1 << (seg * SEG_FIELD_NR + field); if (!(vmx->vcpu.arch.regs_avail & (1 << VCPU_EXREG_SEGMENTS))) { vmx->vcpu.arch.regs_avail |= (1 << VCPU_EXREG_SEGMENTS); vmx->segment_cache.bitmask = 0; } ret = ...
false
false
false
false
false
0
compute_dfdv(Variable* const v, Variable* const u) { double dfdv = v->dfdv(); for(Cit it = v->out.begin(); it != v->out.end(); ++it) { Constraint *c = *it; if(canFollowRight(c,u)) { c->lm = compute_dfdv(c->right,v); dfdv += c->lm * c->left->scale; } } fo...
false
false
false
false
false
0
date_s_ordinal(int argc, VALUE *argv, VALUE klass) { VALUE vy, vd, vsg, y, fr, fr2, ret; int d; double sg; rb_scan_args(argc, argv, "03", &vy, &vd, &vsg); y = INT2FIX(-4712); d = 1; fr2 = INT2FIX(0); sg = DEFAULT_SG; switch (argc) { case 3: val2sg(vsg, sg); case 2: n...
false
false
false
false
false
0
L22__MULTIPLE_VALUE_BIND__evalmacros() {register object *base=vs_base; register object *sup=base+VM22; VC22 vs_reserve(VM22); check_arg(2);vs_top=sup; {object V124=base[0]->c.c_cdr; if(endp(V124))invalid_macro_call(); base[2]= (V124->c.c_car); V124=V124->c.c_cdr; if(endp(V124))invalid_macro_call(); base[3]= (V...
false
false
false
false
false
0
main(int argc, char **argv) { int i, list = 0; const char *cfg = "/etc/ssl/https-proxy.conf";; for (i = 1; i < argc; ++i) { if (!strcmp(argv[i], "-c") && ++i < argc) cfg = argv[i]; else if (!strcmp(argv[i], "-s3")) tls_only = 0; else if (!strcmp(argv[i], "-h")) return help(); else if (!strcmp(argv[...
false
false
false
false
false
0
PH_create_save_matrix_window(AW_root *aw_root, char *base_name) { AW_window_simple *aws = new AW_window_simple; aws->init( aw_root, "SAVE_MATRIX", "SAVE MATRIX TO FILE"); aws->load_xfig("sel_box.fig"); aws->at("close");aws->callback((AW_CB0)AW_POPDOWN); aws->create_button("CLOSE","CLOSE","C"); ...
false
false
false
false
false
0
vtag_create(int *error) { struct vtag *s; if (!(s = calloc(1, sizeof (struct vtag)))) { *error = VE_ALLOCATION; return NULL; } if (!(s->hash_table = g_hash_table_new_full(g_str_hash, g_str_equal, free, (GDestroyNotify)free_sli...
false
false
false
false
false
0
setUseTips( bool on ) { d->useTips = on; if ( on ) setToolTip( d->tipText ); else setToolTip( QString() ); }
false
false
false
false
false
0
drawBlipsSorted(int distort) { current_target_x = 0; current_target_y = 0; // draw dim blips first, then bright blips for (int is_bright = 0; is_bright < 2; is_bright++) { drawBlips(BLIP_TYPE_JUMP_NODE, is_bright, distort); drawBlips(BLIP_TYPE_WARPING_SHIP, is_bright, distort); drawBlips(BLIP_TYPE_NAVBUOY_CA...
false
false
false
false
false
0
change_bool(char *name, int state, policydb_t * p, FILE * fp) { cond_bool_datum_t *bool; bool = hashtab_search(p->p_bools.table, name); if (bool == NULL) { fprintf(fp, "Could not find bool %s\n", name); return -1; } bool->state = state; evaluate_conds(p); return 0; }
false
false
false
false
false
0
cvs_find_version (cvs_file *cvs, cvs_number *number) /* find the file version associated with the specified CVS release number */ { cvs_version *cv; cvs_version *nv = NULL; for (cv = cvs->versions; cv; cv = cv->next) { if (cvs_same_branch (number, &cv->number) && cvs_number_compare (&cv->number, numb...
false
false
false
false
false
0
process_getfm(int fd, short args, void *cbdata) { orte_dfs_request_t *dfs = (orte_dfs_request_t*)cbdata; opal_buffer_t *buffer; int rc; /* we will get confirmation in our receive function, so * add this request to our list */ dfs->id = req_id++; opal_list_append(&requests, &dfs->super); ...
false
false
false
false
false
0
Lsharp_B_reader() { int i; if(vs_base[2] != Cnil && !READsuppress) extra_argument('B'); vs_popp; vs_popp; read_constituent(vs_base[0]); if (READsuppress) { vs_base[0] = Cnil; return; } vs_base[0] = parse_number(token_buffer, token->st.st_fillp, &i, 2); if (vs_base[0] == OBJNULL || i != token->st.st_fil...
false
false
false
false
false
0
_scale_tail_taps(struct audio_plugin_t *p) { delay_t *d = (delay_t *)p->user; unsigned i, t, scale; /* samples per ms */ float s_ms = (float)p->ctl[FXC_SAMPLERATE] * 0.001; s_ms *= (float)p->ctl[DC_TAIL_TIME]; /* scale */ s_ms *= 1.0/1024.0; /* Throw away 10 of the 16 fraction bits */ scale = (unsigned)s_ms; fo...
false
false
false
false
false
0
fsck_commit(struct commit *commit, fsck_error error_func) { char *buffer = commit->buffer; unsigned char tree_sha1[20], sha1[20]; struct commit_graft *graft; int parents = 0; if (!commit->date) return error_func(&commit->object, FSCK_ERROR, "invalid author/committer line"); if (memcmp(buffer, "tree ", 5)) r...
false
false
false
false
false
0
interfaces_routing_enabled(struct lldpd *cfg) { (void)cfg; int f; char status; int rc; if ((f = priv_open("/proc/sys/net/ipv4/ip_forward")) >= 0) { if (read(f, &status, 1) == 1) { rc = (status == '1'); } else rc = -1; close(f); return rc; } return -1; }
false
true
false
false
true
1
gconf_sources_clear_cache (GConfSources *sources) { GList* tmp; tmp = sources->sources; while (tmp != NULL) { GConfSource* source = tmp->data; if (source->backend->vtable.clear_cache) (*source->backend->vtable.clear_cache)(source); tmp = g_list_next(tmp); } }
false
false
false
false
false
0
cmd640_qc_issue(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; struct ata_device *adev = qc->dev; struct pci_dev *pdev = to_pci_dev(ap->host->dev); struct cmd640_reg *timing = ap->private_data; if (ap->port_no != 0 && adev->devno != timing->last) { pci_write_config_byte(pdev, DRWTIM23, timing->reg58...
false
false
false
false
false
0
init(void) { DEBUG_MSG("DjVuDocEditor::init() called\n"); DEBUG_MAKE_INDENT(3); // If you remove this check be sure to delete thumb_map if (initialized) G_THROW( ERR_MSG("DjVuDocEditor.init") ); doc_url=GURL::Filename::UTF8("noname.djvu"); const GP<DjVmDoc> doc(DjVmDoc::create()); const GP<By...
false
false
false
false
false
0
create_list_adf_orbitals() { GtkWidget *Win; GtkWidget *frame; GtkWidget *hbox; GtkWidget *vboxall; GtkWidget *vboxframe; GtkWidget *button; GtkWidget *gtklist; GtkWidget *scr; if(numberOfSymmetries<1) { Message(_("Sorry, Please load a file before\n"),_("Error"),TRUE); return; } /* Princ...
false
false
false
false
false
0
OnBnClickedBrowse(wxCommandEvent& WXUNUSED(evt)) { wxString dir = CastChild(IDC_INCOMING, wxTextCtrl)->GetValue(); dir = wxDirSelector( _("Choose a folder for incoming files"), dir, wxDD_DEFAULT_STYLE, wxDefaultPosition, this); if (!dir.IsEmpty()) { CastChild(IDC_INCOMING, wxTextCtrl)->SetValue(dir); } }
false
false
false
false
false
0
sdp_match_uuid(sdp_list_t *search, sdp_list_t *pattern) { /* * The target is a sorted list, so we need not look * at all elements to confirm existence of an element * from the search pattern */ int patlen = sdp_list_len(pattern); if (patlen < sdp_list_len(search)) return -1; for (; search; search = searc...
false
false
false
false
false
0
nvicDisableInterrupts() { NVIC_TypeDef *rNVIC = (NVIC_TypeDef *) NVIC_BASE; rNVIC->ICER[0] = 0xFFFFFFFF; rNVIC->ICER[1] = 0xFFFFFFFF; rNVIC->ICPR[0] = 0xFFFFFFFF; rNVIC->ICPR[1] = 0xFFFFFFFF; SET_REG(STK_CTRL, 0x04); /* disable the systick, which operates separately from nvic */ }
false
false
false
false
false
0
set_bit(uint8_t input, uint8_t bitmask, bool bitvalue) { return bitvalue ? input | bitmask : input & ~bitmask; }
false
false
false
false
false
0
checkEncoding(const StringList &fields, String::Type encoding) // static { if(encoding != String::Latin1) return encoding; for(StringList::ConstIterator it = fields.begin(); it != fields.end(); ++it) { if(!(*it).isLatin1()) { debug("Frame::checkEncoding() -- Rendering using UTF8."); return Stri...
false
false
false
false
false
0
FT_New_Memory( void ) { FT_Memory memory; memory = (FT_Memory)malloc( sizeof ( *memory ) ); if ( memory ) { memory->user = 0; memory->alloc = ft_alloc; memory->realloc = ft_realloc; memory->free = ft_free; #ifdef FT_DEBUG_MEMORY ft_mem_debug_init( memory ); #en...
false
false
false
false
false
0
isClassMember() // are we a member of a class? { AggregateDeclaration *ad = isAggregateMember(); return ad ? ad->isClassDeclaration() : NULL; }
false
false
false
false
false
0
streamer(apr_thread_t * thread, void *selfv) { apr_status_t status; char buf[BLOCK_MAX]; apr_size_t len; tunnel_t *tunnel = selfv; do { /* read polled from and send to */ len = BLOCK_MAX - 1; status = sockreader_read_block(tunnel->sockreader, buf, &len); if (APR_STATUS_IS_EOF(status) && len ...
false
false
false
false
false
0
changePermissionsBtnCbk(GtkMenuItem *menuitem, gpointer data) { GtkTreeSelection* selection; /* do nothing if no image open */ if(!GBLisoPaneActive) return; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(GBLisoTreeView)); int numSelectedRows = gtk_tree_selection_count_s...
false
true
false
false
false
1
getVisionManagementName( VISION_MANAGEMENT type ) { QString ret; switch( type ) { case VISION_ONCE: ret = "Vision once"; break; case VISION_REAL: ret = "Vision real"; break; } return ret; }
false
false
false
false
false
0
gnm_cell_set_array_formula (Sheet *sheet, int col_a, int row_a, int col_b, int row_b, GnmExprTop const *texpr) { int const num_rows = 1 + row_b - row_a; int const num_cols = 1 + col_b - col_a; int x, y; GnmCell *corner; GnmExprTop const *wrapper; g_return_if_fail (sheet != NULL); g_return_if_fail ...
false
false
false
false
false
0
connect_and_open(GFS_File gf, const char *hostname, int port) { gfarm_error_t e; struct gfs_connection *gfs_server; int retry = 0; gfarm_timerval_t t1, t2, t3, t4; GFARM_TIMEVAL_FIX_INITIALIZE_WARNING(t1); GFARM_TIMEVAL_FIX_INITIALIZE_WARNING(t2); GFARM_TIMEVAL_FIX_INITIALIZE_WARNING(t3); gfs_profile(gfarm_ge...
false
false
false
false
false
0