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
soup_socket_read_until (SoupSocket *sock, gpointer buffer, gsize len, gconstpointer boundary, gsize boundary_len, gsize *nread, gboolean *got_boundary, GCancellable *cancellable, GError **error) { SoupSocketPrivate *priv; SoupSocketIOStatus status; gssize my_nread; GError *my_err = NULL; g_return_val_if_...
false
false
false
false
false
0
m68k_op_movem_16_re_al(void) { uint i = 0; uint register_list = OPER_I_16(); uint ea = EA_AL_16(); uint count = 0; for(; i < 16; i++) if(register_list & (1 << i)) { m68ki_write_16(ea, MASK_OUT_ABOVE_16(REG_DA[i])); ea += 2; count++; } USE_CYCLES(count<<CYC_MOVEM_W); }
false
false
false
false
false
0
map_create_hash(hash_fn_t hash_func, eq_fn_t key_eq_func) { map_t *m; WALLOC(m); m->magic = MAP_MAGIC; m->type = MAP_HASH; m->u.ht = htable_create_any(hash_func, NULL, key_eq_func); return m; }
false
false
false
false
false
0
Get_Next_HR_Print(void) { /* * The initial implementation system * has no printers attached, and I've * no real idea how to detect them, * so don't bother. */ if (HRP_index < HRP_nbrnames) /* No printer */ return (HRDEV_PRINTER << HRDEV_TYPE_SHIFT) + HRP_index++; else...
false
false
false
false
false
0
st_widget_paint_background (StWidget *widget) { StThemeNode *theme_node; ClutterActorBox allocation; guint8 opacity; theme_node = st_widget_get_theme_node (widget); clutter_actor_get_allocation_box (CLUTTER_ACTOR (widget), &allocation); opacity = clutter_actor_get_paint_opacity (CLUTTER_ACTOR (widget)); ...
false
false
false
false
false
0
test_describe_describe__can_describe_against_a_bare_repo(void) { git_repository *repo; git_describe_options opts = GIT_DESCRIBE_OPTIONS_INIT; git_describe_format_options fmt_opts = GIT_DESCRIBE_FORMAT_OPTIONS_INIT; cl_git_pass(git_repository_open(&repo, cl_fixture("testrepo.git"))); assert_describe("hard_tag", "...
false
false
false
false
false
0
sata_pmp_eh_recover_pmp(struct ata_port *ap, ata_prereset_fn_t prereset, ata_reset_fn_t softreset, ata_reset_fn_t hardreset, ata_postreset_fn_t postreset) { struct ata_link *link = &ap->link; struct ata_eh_context *ehc = &link->eh_context; struct ata_device *dev = link->device; int tries = ATA_EH_PMP_TRIES; in...
false
false
false
false
false
0
gda_capi_blob_op_finalize (GObject * object) { GdaCapiBlobOp *bop = (GdaCapiBlobOp *) object; g_return_if_fail (GDA_IS_CAPI_BLOB_OP (bop)); /* free specific information */ TO_IMPLEMENT; g_free (bop->priv); bop->priv = NULL; parent_class->finalize (object); }
false
false
false
false
false
0
operator=(const Locale &other) { if (this == &other) { return *this; } if (&other == NULL) { this->setToBogus(); return *this; } /* Free our current storage */ if(fullName != fullNameBuffer) { uprv_free(fullName); fullName = fullNameBuffer; } /*...
false
false
false
false
false
0
gen_cooked_ax25(unsigned char **frame, int *len, struct ax_calls *calls) { int minsize = AXLEN+3+1+AXLEN+3+1+(calls->ax_n_digis*(AXLEN+3+1))+2; int i,l; if (*len < minsize) return -1; strncpy(*frame,ax25_ntoa_pretty(&calls->ax_from_call),AXLEN+3); l = strlen(*frame); *frame += l; *(*frame)++ = '>'...
false
false
false
false
false
0
ReadMaterial( Collada::Material& pMaterial) { while( mReader->read()) { if( mReader->getNodeType() == irr::io::EXN_ELEMENT) { if (IsElement("material")) { SkipElement(); } else if( IsElement( "instance_effect")) { // referred effect by URL int attrUrl = GetAttribute( "ur...
false
false
false
false
false
0
parse_month (const gchar *month) { gint i; for (i = 0; i < 12; i++) { if (!strncmp (month, months[i], 3)) { return i; } } return -1; }
false
false
false
false
false
0
_ZmodF_mul_fft_reduce_modB(unsigned long* out, ZmodF_t* in, unsigned long len) { for (unsigned long i = 0; i < len; i++) out[i] = in[i][0]; }
false
false
false
false
false
0
tidy_after_forward_propagate_addr (gimple stmt) { /* We may have turned a trapping insn into a non-trapping insn. */ if (maybe_clean_or_replace_eh_stmt (stmt, stmt) && gimple_purge_dead_eh_edges (gimple_bb (stmt))) cfg_changed = true; if (TREE_CODE (gimple_assign_rhs1 (stmt)) == ADDR_EXPR) recomp...
false
false
false
false
false
0
addService(const Regex& url, Service& service) { log_debug("add service for regex"); WriteLock serviceLock(_serviceMutex); _services.push_back(ServicesType::value_type(url, &service)); }
false
false
false
false
false
0
permmap_class_free(void *elem) { if (elem != NULL) { apol_permmap_class_t *c = (apol_permmap_class_t *) elem; apol_vector_destroy(&c->perms); free(c); } }
false
false
false
false
false
0
Read (Document *doc, GsfInput *in, G_GNUC_UNUSED char const *mime_type, G_GNUC_UNUSED GOIOContext *io) { CMLReadState state; bool success = false; state.doc = doc; state.app = doc->GetApplication (); state.context = io; state.cur.push (doc); state.type = ContentTypeMisc; doc->SetScale (100.); if (NULL != ...
false
false
false
false
false
0
attr_value_lowest(struct berval **values, value_compare_fn_type compare_fn) { /* We iterate through the values, storing our last best guess as to the lowest */ struct berval *lowest_so_far = values[0]; struct berval *this_one = NULL; for (this_one = *values; this_one; this_one = *values++) { if (compare_fn(lowe...
false
false
false
false
false
0
CorrectViewport(int i, int MAX_PLAYERS){ if (vpb_dir[i]!=1 && vpb_dir[i]!=-1) vpb_dir[i]=1; int starta=rViewportConfiguration::s_viewportConfigurations[rViewportConfiguration::next_conf_num]->num_viewports-1; int startb=rViewportConfiguration::s_viewportConfigurations[ conf_num]->num_viewports-...
false
false
false
false
false
0
addRangeTableEntryForJoin(ParseState *pstate, List *colnames, JoinType jointype, List *aliasvars, Alias *alias, bool inFromCl) { RangeTblEntry *rte = makeNode(RangeTblEntry); Alias *eref; int numaliases; /* * Fail if join has too many columns --- we must be able to re...
false
false
false
false
false
0
radioBoxDisarm(void) { AplusRadioBox *rbox=(AplusRadioBox *)owner(); if (rbox!=0) rbox->disarm(); }
false
false
false
false
false
0
pkix_pl_OID_Equals( PKIX_PL_Object *first, PKIX_PL_Object *second, PKIX_Boolean *pResult, void *plContext) { PKIX_Int32 cmpResult; PKIX_ENTER(OID, "pkix_pl_OID_Equals"); PKIX_NULLCHECK_THREE(first, second, pResult); PKIX_CHECK(pkix_pl_OID_Comparator ...
false
false
false
false
false
0
prev_char_clipped(int pos) const { if (pos<=0) return 0; IS_UTF8_ALIGNED2(this, (pos)) char c; do { pos--; if (pos==0) return 0; c = byte_at(pos); } while ( (c&0xc0) == 0x80); IS_UTF8_ALIGNED2(this, (pos)) return pos; }
false
false
false
false
false
0
pform_make_udp_input_ports(list<perm_string>*names) { svector<PWire*>*out = new svector<PWire*>(names->size()); unsigned idx = 0; for (list<perm_string>::iterator cur = names->begin() ; cur != names->end() ; cur ++ ) { perm_string txt = *cur; PWire*pp = new PWire(txt, NetNet::IMP...
false
false
false
false
false
0
cookies() const { CookieJar *that = const_cast<CookieJar*>(this); if (!m_loaded) that->load(); return allCookies(); }
false
false
false
false
false
0
img_ir_nec_scancode(int len, u64 raw, u64 enabled_protocols, struct img_ir_scancode_req *request) { unsigned int addr, addr_inv, data, data_inv; /* a repeat code has no data */ if (!len) return IMG_IR_REPEATCODE; if (len != 32) return -EINVAL; /* raw encoding: ddDDaaAA */ addr = (raw >> 0) & 0x...
false
false
false
false
false
0
clear_local_APIC(void) { int maxlvt; u32 v; /* APIC hasn't been mapped yet */ if (!x2apic_mode && !apic_phys) return; maxlvt = lapic_get_maxlvt(); /* * Masking an LVT entry can trigger a local APIC error * if the vector is zero. Mask LVTERR first to prevent this. */ if (maxlvt >= 3) { v = ERROR_APIC_...
false
false
false
false
false
0
gl847_update_hardware_sensors (Genesys_Scanner * s) { /* do what is needed to get a new set of events, but try to not lose any of them. */ SANE_Status status = SANE_STATUS_GOOD; uint8_t val; uint8_t scan, file, email, copy; switch(s->dev->model->gpo_type) { case GPO_CANONLIDE700: sca...
false
false
false
false
false
0
ast_set_qos(int sockfd, int tos, int cos, const char *desc) { int res = 0; int set_tos; int set_tclass; struct ast_sockaddr addr; /* If the sock address is IPv6, the TCLASS field must be set. */ set_tclass = !ast_getsockname(sockfd, &addr) && ast_sockaddr_is_ipv6(&addr) ? 1 : 0; /* If the the sock address is I...
false
false
false
false
false
0
singleEscape(unsigned short c) { switch(c) { case 'b': return 0x08; case 't': return 0x09; case 'n': return 0x0A; case 'v': return 0x0B; case 'f': return 0x0C; case 'r': return 0x0D; case '"': return 0x22; case '\'': return 0x27; case '\\': return 0x5C; default:...
false
false
false
false
false
0
gaussfunc(int m, int n, double *p, double *dy, double **dvec, void *vars) { int i; struct vars_struct *v = (struct vars_struct *) vars; double *x, *y, *ey; double xc, sig2; x = v->x; y = v->y; ey = v->ey; sig2 = p[3]*p[3]; for (i=0; i<m; i++) { xc = x[i]-p[2]; dy[i] = (y[i] - p[1]*exp(-0.5*...
false
false
false
false
false
0
do_pselect(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, struct timespec __user *tsp, const sigset_t __user *sigmask, size_t sigsetsize) { sigset_t ksigmask, sigsaved; struct timespec ts, end_time, *to = NULL; int ret; if (tsp) { if (copy_from_user(&ts, tsp, sizeof(ts))) ...
false
false
false
false
false
0
process_loop(Node node, RfmBlock block) { Rfm_loop_info_table loop_info_t; RfmLoopInfo loop_info; loop_info = (RfmLoopInfo)memset(&loop_info_t, 0x00, sizeof(Rfm_loop_info_table)); if (has_control_variable_loop(node, loop_info)) { block = process_do_lo...
false
false
false
false
false
0
ipmi_poweroff_atca(ipmi_user_t user) { struct ipmi_system_interface_addr smi_addr; struct kernel_ipmi_msg send_msg; int rv; unsigned char data[4]; /* * Configure IPMI address for local access */ smi_addr.addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE;...
true
true
false
false
false
1
fillBallsOutside(int placed) { int i = m_columns*m_rows; while ((m_ballsOutside->count()+placed)<m_ballToPlace) { if (!(m_ballsOutside->containsVisible(i))) { KBBGraphicsItemOnBox* b = new KBBGraphicsItemOnBox(KBBScalableGraphicWidget::playerBall, m_parent, m_themeManager, i, m_columns, m_rows); m_ballsOutsid...
false
false
false
false
false
0
vp56_init(AVCodecContext *avctx, int flip, int has_alpha) { VP56Context *s = avctx->priv_data; int i; s->avctx = avctx; avctx->pix_fmt = has_alpha ? PIX_FMT_YUVA420P : PIX_FMT_YUV420P; if (avctx->idct_algo == FF_IDCT_AUTO) avctx->idct_algo = FF_IDCT_VP3; dsputil_init(&s->dsp, avctx); ...
false
false
false
false
false
0
opcode_mod(void) { TRACE_LOG("Opcode: MOD.\n"); if (op[1] == 0) i18n_translate_and_exit( libfizmo_module_name, i18n_libfizmo_CANNOT_DIVIDE_BY_ZERO, -1); read_z_result_variable(); TRACE_LOG("MODing %d and %d to %d.\n", (int16_t)op[0], (int16_t)op[1], (uint16_t)((i...
false
false
false
false
false
0
pci_vpd_init ( struct pci_vpd *vpd, struct pci_device *pci ) { /* Initialise structure */ vpd->pci = pci; pci_vpd_invalidate_cache ( vpd ); /* Locate VPD capability */ vpd->cap = pci_find_capability ( pci, PCI_CAP_ID_VPD ); if ( ! vpd->cap ) { DBGC ( vpd, PCI_FMT " does not support VPD\n", PCI_ARGS (...
false
false
false
false
false
0
namesGetBucket(plotstring searchname) { long i; long sum = 0; for (i = 0; (i < MAXNCH) && (searchname[i] != '\0'); i++) { sum += searchname[i]; } return (sum % NUM_BUCKETS); }
false
false
false
false
false
0
_change_angle(BLURAY *bd) { if (bd->seamless_angle_change) { bd->st0.clip = nav_set_angle(bd->title, bd->st0.clip, bd->request_angle); bd->seamless_angle_change = 0; bd_psr_write(bd->regs, PSR_ANGLE_NUMBER, bd->title->angle + 1); /* force re-opening .m2ts file in _seek_internal() */...
false
false
false
false
false
0
activecpu_adjust_icount(int delta) { VERIFY_ACTIVECPU_VOID(activecpu_adjust_icount); *cpu[activecpu].intf.icount += delta; }
false
false
false
false
false
0
ReturnProcessString(const PROC * proc) { COLUMN ** columnPtr; COLUMN * column; BOOL overflow; int len; int padding; int tmp; int col; int goalCol; const char * value; char * bufCp; static char buf[MAX_WIDTH + 1]; bufCp = buf; col = 0; goalCol = 0; columnPtr = showList; column = *columnPtr++; w...
false
false
false
false
false
0
pref_end_search(GtkWidget *widget,gpointer *data){ LOG(LOG_DEBUG, "IN : pref_end_search()"); max_search = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin_max_search)); bword_search_automatic = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_word_search)); update_tree_view(); LOG(LOG_DEBUG, "OUT : ...
false
false
false
false
false
0
realpath_cache_find(const char *path, int path_len, time_t t TSRMLS_DC) /* {{{ */ { #ifdef PHP_WIN32 unsigned long key = realpath_cache_key(path, path_len TSRMLS_CC); #else unsigned long key = realpath_cache_key(path, path_len); #endif unsigned long n = key % (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cac...
false
false
false
false
false
0
check () { uint64_t val; ssize_t sz = read (fd, &val, sizeof (uint64_t)); if (sz == -1 && (errno == EAGAIN || errno == EINTR)) return 0; errno_assert (sz != -1); return val; }
false
false
false
false
false
0
child_kill_helper(mainloop_child_t *child) { if (kill(child->pid, SIGKILL) < 0) { crm_perror(LOG_ERR, "kill(%d, KILL) failed", child->pid); return -errno; } return 0; }
false
false
false
false
false
0
rxring_mem_alloc(struct sxgbe_priv_data *priv) { int queue_num; SXGBE_FOR_EACH_QUEUE(SXGBE_RX_QUEUES, queue_num) { priv->rxq[queue_num] = devm_kmalloc(priv->device, sizeof(struct sxgbe_rx_queue), GFP_KERNEL); if (!priv->rxq[queue_num]) return -ENOMEM; } return 0; }
false
false
false
false
false
0
request_units_wait(struct unit_list *punits) { unit_list_iterate(punits, punit) { punit->client.focus_status = FOCUS_WAIT; } unit_list_iterate_end; if (punits == get_units_in_focus()) { unit_focus_advance(); } }
false
false
false
false
false
0
load_catval_array_size(struct Map_info *map, int vec, dbCatValArray * cvarr_size) { int i, nrec, ctype; struct field_info *Fi; dbDriver *driver; G_debug(2, "Loading dynamic symbol sizes ..."); db_CatValArray_init(cvarr_size); Fi = Vect_get_field(map, vector.layer[vec].field); if (Fi ...
false
false
false
false
false
0
gdbm_nextkey (dbf, key) gdbm_file_info *dbf; datum key; { datum return_val; /* The return value. */ int elem_loc; /* The location in the bucket. */ char *find_data; /* Data pointer returned by _gdbm_findkey. */ int hash_val; /* Returned by _gdbm_findkey. */ /* Initialize the gdbm_errno ...
false
false
false
false
false
0
movetofailed(const char *name) { char s[SIZE_s + 1]; xsnprintf(s, SIZE_s, "%s/failed.postings/%s", spooldir, name); ln_log(LNLOG_SERR, LNLOG_CARTICLE, "moving file %s to failed.postings", name); if (rename(name, s)) { ln_log(LNLOG_SERR, LNLOG_CARTICLE, "unable to move failed posting to %s: %m",...
false
false
false
false
false
0
x86_pmu_del(struct perf_event *event, int flags) { struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); int i; /* * event is descheduled */ event->hw.flags &= ~PERF_X86_EVENT_COMMITTED; /* * If we're called during a txn, we don't need to do anything. * The events never got scheduled and ->cancel_tx...
false
false
false
false
false
0
il3945_hdl_tx(struct il_priv *il, struct il_rx_buf *rxb) { struct il_rx_pkt *pkt = rxb_addr(rxb); u16 sequence = le16_to_cpu(pkt->hdr.sequence); int txq_id = SEQ_TO_QUEUE(sequence); int idx = SEQ_TO_IDX(sequence); struct il_tx_queue *txq = &il->txq[txq_id]; struct ieee80211_tx_info *info; struct il3945_tx_resp *...
false
false
false
false
false
0
gst_ximagesink_xwindow_update_geometry (GstXImageSink * ximagesink) { XWindowAttributes attr; gboolean reconfigure; g_return_if_fail (GST_IS_XIMAGESINK (ximagesink)); /* Update the window geometry */ g_mutex_lock (&ximagesink->x_lock); if (G_UNLIKELY (ximagesink->xwindow == NULL)) { g_mutex_unlock (&x...
false
false
false
false
false
0
flmRegisterHttpCallback( FLM_MODULE_HANDLE hModule, const char * pszUrlString) { RCODE rc = FERR_OK; char * pszTemp; FLMUINT uiRegFlags; if (gv_FlmSysData.HttpConfigParms.bRegistered) { rc = RC_SET( FERR_HTTP_REGISTER_FAILURE); goto Exit; } // Need to save the Url string for later use... if( RC_B...
false
false
false
false
true
1
StripTrailingSpaces() { cbStyledTextCtrl* control = m_pOwner->GetControl(); // The following code was adapted from the SciTE sourcecode int maxLines = control->GetLineCount(); for (int line = 0; line < maxLines; line++) { int lineStart = control->PositionFromLine...
false
false
false
false
false
0
altera_gpio_irq_edge_handler(struct irq_desc *desc) { struct altera_gpio_chip *altera_gc; struct irq_chip *chip; struct of_mm_gpio_chip *mm_gc; struct irq_domain *irqdomain; unsigned long status; int i; altera_gc = to_altera(irq_desc_get_handler_data(desc)); chip = irq_desc_get_chip(desc); mm_gc = &altera_gc-...
false
false
false
false
false
0
Equals(Handle<Value> that) const { i::Isolate* isolate = i::Isolate::Current(); if (IsDeadCheck(isolate, "v8::Value::Equals()") || EmptyCheck("v8::Value::Equals()", this) || EmptyCheck("v8::Value::Equals()", that)) { return false; } LOG_API(isolate, "Equals"); ENTER_V8(isolate); i::Handle<i:...
false
false
false
false
false
0
need_compute( const SPPack& req_params) { auto req_signature = _using_F().dirty_signature( _using_sig_no); if ( have_data() and req_signature == _signature_when_mirrored and same_as(req_params) ) return false; auto old_mirror = mirror_fname(); m...
false
false
false
false
false
0
addto_action_char_list(List char_list, char *names) { int i=0, start=0; char *name = NULL, *tmp_char = NULL; ListIterator itr = NULL; char quote_c = '\0'; int quote = 0; uint32_t id=0; int count = 0; if (!char_list) { error("No list was given to fill in"); return 0; } itr = list_iterator_create(char_lis...
false
true
false
false
false
1
check_tube_open (TpDBusTubeChannel *self) { if (self->priv->result == NULL) return; if (self->priv->address == NULL) return; if (self->priv->state != TP_TUBE_CHANNEL_STATE_OPEN) return; DEBUG ("Tube %s opened: %s", tp_proxy_get_object_path (self), self->priv->address); g_dbus_connection_...
false
false
false
false
false
0
send_endorser(struct fujitsu *s) { SANE_Status ret = SANE_STATUS_GOOD; unsigned char cmd[SEND_len]; size_t cmdLen = SEND_len; size_t strLen = strlen(s->u_endorser_string); unsigned char out[S_e_data_max_len]; /*we probably send less below*/ size_t outLen = S_e_data_min_len + strLen; /*fi-5900 might wan...
true
true
false
false
false
1
clutter_gst_video_sink_start (GstBaseSink * base_sink) { ClutterGstVideoSink *sink = CLUTTER_GST_VIDEO_SINK (base_sink); ClutterGstVideoSinkPrivate *priv = sink->priv; priv->source = clutter_gst_source_new (sink); GST_DEBUG_OBJECT (base_sink, "Attaching our GSource to the main context"); g_source_attach ((G...
false
false
false
false
false
0
seahorse_util_chooser_show_archive_files (GtkDialog *dialog) { GtkFileFilter* filter; int i; static const char *archive_mime_type[] = { "application/x-ar", "application/x-arj", "application/x-bzip", "application/x-bzip-compressed-tar", "application/x-cd-image", ...
false
false
false
false
false
0
update() { histogram h; // create histogramm for (const unsigned int* i=in; i != in + (width*height);++i) h(*i); // calc th int th1 = 1; int th2 = 255; unsigned num = 0; unsigned int num1div3 = 4*size/10; // number of pixels in the lower level unsigned int num2div3 = 8*size/10; // number of ...
false
false
false
false
false
0
AH_ImExporterQ43_ReadInt(const char *p, int len) { int res=0; int i; for (i=0; i<len; i++) { char c; c=*(p++); if (!isdigit(c)) return res; res*=10; res+=c-'0'; } return res; }
false
false
false
false
false
0
led_pwm_create_of(struct device *dev, struct led_pwm_priv *priv) { struct device_node *child; struct led_pwm led; int ret = 0; memset(&led, 0, sizeof(led)); for_each_child_of_node(dev->of_node, child) { led.name = of_get_property(child, "label", NULL) ? : child->name; led.default_trigger = of_get_prop...
false
false
false
false
false
0
one_in(int chance) { if (chance <= 1 || rng(0, chance - 1) == 0) return true; return false; }
false
false
false
false
false
0
efx_ef10_vport_del_vf_mac(struct efx_nic *efx, unsigned int port_id, u8 *mac) { MCDI_DECLARE_BUF(inbuf, MC_CMD_VPORT_DEL_MAC_ADDRESS_IN_LEN); MCDI_DECLARE_BUF_ERR(outbuf); size_t outlen; int rc; MCDI_SET_DWORD(inbuf, VPORT_DEL_MAC_ADDRESS_IN_VPORT_ID, port_id); ether_addr_copy(MCDI_PTR(inbuf, VPORT_DEL_...
false
false
false
false
false
0
generatePtZ(double& jac, const double * r) const { double kappaMin = ptCut() != ZERO ? sqr(ptCut()/ptMax()) : sqr(0.1*GeV/GeV); double kappa; using namespace RandomHelpers; if ( ptCut() > ZERO ) { pair<double,double> kw = generate(inverse(0.,kappaMin,1.),r[0]); kappa = kw.first; ...
false
false
false
false
false
0
load(FILE *fp) { char tmpname[256]; char linebuf[1024]; ssize_t ret; PSParser *p2 = new PSParser_2(this); int tmp_fd; strncpy(tmpname, "/tmp/PSEditorXXXXXX", sizeof(tmpname)); tmp_fd = mkstemp(tmpname); if (tmp_fd < 0) { fprintf(stderr, "Could not create temporary file (errno %d).\n", errno); return -1; }...
false
false
false
false
false
0
valid_yank_reg(regname, writing) int regname; int writing; /* if TRUE check for writable registers */ { if ( (regname > 0 && ASCII_ISALNUM(regname)) || (!writing && vim_strchr((char_u *) #ifdef FEAT_EVAL "/.%#:=" #else "/.%#:" #endif , regname) != NULL) || re...
false
false
false
false
false
0
fix_cmp(VALUE x, VALUE y) { if (x == y) return INT2FIX(0); if (FIXNUM_P(y)) { if (FIX2LONG(x) > FIX2LONG(y)) return INT2FIX(1); return INT2FIX(-1); } switch (TYPE(y)) { case T_BIGNUM: return rb_big_cmp(rb_int2big(FIX2LONG(x)), y); case T_FLOAT: return rb_dbl_cmp((double)FIX2LONG(x), RFLO...
false
false
false
false
false
0
prepare_async_result (DeepCountState *state) { ShellMimeSniffer *self = state->self; GArray *results; GPtrArray *sniffed_mime; SniffedResult result; sniffed_mime = g_ptr_array_new (); results = g_array_new (TRUE, TRUE, sizeof (SniffedResult)); if (state->total_items == 0) goto out; result.type = ...
false
false
false
false
false
0
HostToMask (char *username, char *hostname) { char *realhost, /* user@host (without nick!) */ *temp, *final, /* final product */ *user, /* stores the username */ *host, /* stores the hostname */ /* * first segment of hostname (ie: if host == "a.b.c", * topsegment == "c" (top-level domain) */ *topsegment =...
true
true
false
false
true
1
pack_bang(t_pack *x) { int i, reentered = 0, size = x->x_n * sizeof (t_atom); t_gpointer *gp; t_atom *outvec; for (i = x->x_nptr, gp = x->x_gpointer; i--; gp++) if (!gpointer_check(gp, 1)) { pd_error(x, "pack: stale pointer"); return; } /* reentrancy protection. ...
false
true
false
false
false
1
git_repository_head_tree(git_tree **tree, git_repository *repo) { git_oid head_oid; git_object *obj = NULL; if (git_reference_name_to_oid(&head_oid, repo, GIT_HEAD_FILE) < 0) { /* cannot resolve HEAD - probably brand new repo */ giterr_clear(); *tree = NULL; return 0; } if (git_object_lookup(&obj, repo, ...
false
false
false
false
false
0
ShiftInt(const char cop, const Token* left, const Token* right) { if (cop == '&' || cop == '|' || cop == '^') return MathLib::calculate(left->str(), right->str(), cop); const MathLib::bigint leftInt = MathLib::toLongNumber(left->str()); const MathLib::bigint rightInt = MathLib::toLongNumber(right->...
false
false
false
false
false
0
on_profile_changed (GMAudioProfile *profile, const GMAudioSettingMask *mask, GMAudioProfileEdit *dialog) { if (mask->name) gm_audio_profile_edit_update_name (dialog, profile); if (mask->description) gm_audio_profile_edit_update_description (dialog, p...
false
false
false
false
false
0
sge_c_gdi_copy(sge_gdi_ctx_class_t *ctx, gdi_object_t *ao, sge_gdi_packet_class_t *packet, sge_gdi_task_class_t *task, int sub_command, monitoring_t *monitor) { lListElem *ep = NULL; object_description *object_base = object_type_get_object_description(); D...
false
false
false
false
false
0
saveMargins() { // open the stream ofstream outStream("margins.txt"); // for each example for (int i = 0; i < _margins.size(); ++i) { //outStream << _weights[i+1]-_weights[i] << " "; for (int j = 0; j < _margins[i].size(); ++j ) { outStream << _margins[i][j] << " "; } outStream << endl...
false
false
false
false
false
0
click_hook_get_all_packages_for_user (ClickHook* self, const gchar* user_name, ClickUser* user_db, GError** error) { GeeArrayList* result = NULL; GeeArrayList* ret = NULL; GeeArrayList* _tmp0_ = NULL; GList* _tmp1_ = NULL; ClickUser* _tmp2_ = NULL; GList* _tmp3_ = NULL; GError * _inner_error_ = NULL; g_return_v...
false
false
false
false
false
0
virtual_server_free(virtual_server_t *server) { if (!server) return; if (server->components) rbtree_free(server->components); server->components = NULL; free(server); }
false
false
false
false
false
0
ttp_open_port(ttp_session_t *session) { struct sockaddr *address; int status; u_int16_t port; u_char ipv6_yn = session->parameter->ipv6_yn; /* create the address structure */ session->transfer.udp_length = ipv6_yn ? sizeof(struct sockaddr_in6) : sizeof(...
false
false
false
true
true
1
ssl_init_defaults(Ssl_conf *c) { Ssl_conf *conf; if (c == NULL) conf = ALLOC(Ssl_conf); else conf = c; conf->ssl = NULL; conf->verbose_flag = 0; conf->verify_type = SSL_VERIFY_NONE; conf->verify_depth = 0; conf->verify_allow_self_signed = 0; conf->verify_error = X509_V_OK; conf->use_default_veri...
false
false
false
false
false
0
ccp_test(int unit, u_char *opt_ptr, int opt_len, int for_transmit) { struct ppp_option_data data; memset (&data, '\0', sizeof (data)); data.ptr = opt_ptr; data.length = opt_len; data.transmit = for_transmit; if (ioctl(ppp_dev_fd, PPPIOCSCOMPRESS, (caddr_t) &data) >= 0) return 1; r...
false
false
false
false
false
0
g2_gd_Save(int pid, void *pdp) { if (PDP->gd_type == g2_gd_png) gdImagePng(PDP->im,PDP->f); else if (PDP->gd_type == g2_gd_jpeg) gdImageJpeg(PDP->im,PDP->f,-1); #ifdef DO_GIF else if (PDP->gd_type == g2_gd_gif) gdImageGif(PDP->im,PDP->f); #endif fflush(PDP->f); rewind(PDP->f); return 0; }
false
false
false
false
false
0
ReplyLogPriority(int code) const { // Greeting messages if(code==220 || code==230) return 3; if(code==250 && mode==CHANGE_DIR) return 3; if(code==451 && mode==CLOSED) return 4; /* Most 5XXs go to level 4, as it's the job's responsibility to * print fatal errors. Some 5XXs are treate...
false
false
false
false
false
0
spellKey() { KGlobal::config()->reparseConfiguration(); KConfigGroup cg( KGlobal::config(), "K3Spell" ); QString key; key += QString::number( cg.readEntry( "K3Spell_NoRootAffix", QVariant(0 )).toInt()); key += '/'; key += QString::number( cg.readEntry( "K3Spell_RunTogether", QVariant(0 )).toInt(...
false
false
false
false
false
0
iwl_alive_start(struct iwl_priv *priv) { int ret = 0; struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; IWL_DEBUG_INFO(priv, "Runtime Alive received.\n"); /* After the ALIVE response, we can send host commands to the uCode */ set_bit(STATUS_ALIVE, &priv->status); if (iwl_is_rfkill(priv)) retu...
false
false
false
false
false
0
esl_hmm_Emit(ESL_RANDOMNESS *r, const ESL_HMM *hmm, ESL_DSQ **opt_dsq, int **opt_path, int *opt_L) { int k, L, allocL; int *path = NULL; ESL_DSQ *dsq = NULL; void *tmp = NULL; int status; ESL_ALLOC(dsq, sizeof(ESL_DSQ) * 256); ESL_ALLOC(path, sizeof(int) * 256); allocL = 256; ...
false
true
false
false
false
1
caml_sha1_final(value ctx) { CAMLparam1(ctx); CAMLlocal1(res); res = alloc_string(20); SHA1_finish(Context_val(ctx), &Byte_u(res, 0)); CAMLreturn(res); }
false
false
false
false
false
0
leaf_interpret(string_list_ty *result, const string_list_ty *args, const expr_position_ty *pp, const opcode_context_ty *ocp) { trace(("leaf_files\n")); assert(result); assert(args); assert(args->nstrings); if (args->nstrings != 1) { sub_context_ty *scp; scp = sub_context_ne...
false
false
false
false
false
0
s2mps14_regulator_set_suspend_disable(struct regulator_dev *rdev) { int ret; unsigned int val, state; struct s2mps11_info *s2mps11 = rdev_get_drvdata(rdev); int rdev_id = rdev_get_id(rdev); /* Below LDO should be always on or does not support suspend mode. */ switch (s2mps11->dev_type) { case S2MPS13X: case S2...
false
false
false
false
false
0
bnx2x_sfp_module_detection(struct bnx2x_phy *phy, struct link_params *params) { struct bnx2x *bp = params->bp; u16 edc_mode; int rc = 0; u32 val = REG_RD(bp, params->shmem_base + offsetof(struct shmem_region, dev_info. port_feature_config[params->port].config)); /* Enabled transmitter b...
false
false
false
false
false
0
GetCursorData(double xyzv[4]) { if ( this->State != vtkImagePlaneWidget::Cursoring || \ this->CurrentImageValue == VTK_DOUBLE_MAX ) { return 0; } xyzv[0] = this->CurrentCursorPosition[0]; xyzv[1] = this->CurrentCursorPosition[1]; xyzv[2] = this->CurrentCursorPosition[2]; xyzv[3] = this->Curr...
false
false
false
false
false
0
_test_unicode_properties_nil (hb_unicode_funcs_t *uf) { unsigned int i, j; for (i = 0; i < G_N_ELEMENTS (properties); i++) { const property_t *p = &properties[i]; const test_pair_t *tests; g_test_message ("Testing property %s", p->name); tests = p->tests; for (j = 0; j < p->num_tests; j++) { ...
false
false
false
false
false
0
SearchDebugFile(DebugFileList &list) { DIR *path; struct dirent *entry; path = opendir("."); while( (entry = readdir(path)) ) { int offset; if (strlen(entry->d_name) < strlen(DEBUG_FILE_EXT)) continue; offset = strlen(entry->d_name) - strlen(DEBUG_FILE_EXT); if (!strcmp(entry->d_name + offset, DEBUG...
false
false
false
false
false
0
s2io_rldram_test(struct s2io_nic *sp, uint64_t *data) { struct XENA_dev_config __iomem *bar0 = sp->bar0; u64 val64; int cnt, iteration = 0, test_fail = 0; val64 = readq(&bar0->adapter_control); val64 &= ~ADAPTER_ECC_EN; writeq(val64, &bar0->adapter_control); val64 = readq(&bar0->mc_rldram_test_ctrl); val64 |=...
false
false
false
false
false
0
get_loop_level (const struct loop *loop) { const struct loop *ploop; unsigned mx = 0, l; for (ploop = loop->inner; ploop; ploop = ploop->next) { l = get_loop_level (ploop); if (l >= mx) mx = l + 1; } return mx; }
false
false
false
false
false
0