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
goo_canvas_get_gdk_rgba_value_from_pattern (cairo_pattern_t *pattern, GValue *value) { GdkRGBA rgba = {0, 0, 0, 0}; if (pattern && cairo_pattern_get_type (pattern) == CAIRO_PATTERN_TYPE_SOLID) { cairo_pattern_get_rgba (pattern, &rgba.red, &rgba.green, ...
false
false
false
false
false
0
multi_sync_do() { if(!(Game_mode & GM_STANDALONE_SERVER)){ multi_sync_common_do(); } // if the netgame is ending, don't do any sync processing if(multi_endgame_ending()){ return; } // process appropriateliy switch(Multi_sync_mode){ case MULTI_SYNC_PRE_BRIEFING: multi_sync_pre_do(); break; case MU...
false
false
false
false
false
0
onenand_otp_write_oob_nolock(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops) { struct onenand_chip *this = mtd->priv; int column, ret = 0, oobsize; int written = 0; u_char *oobbuf; size_t len = ops->ooblen; const u_char *buf = ops->oobbuf; int block, value, status; to += ops->ooboffs; /* In...
false
false
false
false
false
0
onCharacter(KeyEventArgs& e) { // NB: We are not calling the base class handler here because it propogates // inputs back up the window hierarchy, whereas, as a consumer of key // events, we want such propogation to cease with us regardless of whether // we actually handle the event. // fire event....
false
false
false
false
false
0
DRXD_status(struct drxd_state *state, u32 *pLockStatus) { DRX_GetLockStatus(state, pLockStatus); /*if (*pLockStatus&DRX_LOCK_MPEG) */ if (*pLockStatus & DRX_LOCK_FEC) { ConfigureMPEGOutput(state, 1); /* Get status again, in case we have MPEG lock now */ /*DRX_GetLockStatus(state, pLockStatus); */ } return ...
false
false
false
false
false
0
gst_audio_resample_check_discont (GstAudioResample * resample, GstBuffer * buf) { guint64 offset; guint64 delta; /* is the incoming buffer a discontinuity? */ if (G_UNLIKELY (GST_BUFFER_IS_DISCONT (buf))) return TRUE; /* no valid timestamps or offsets to compare --> no discontinuity */ if (G_UNLIKELY ...
false
false
false
false
false
0
dialog_formula_guru_adjust_children (GtkTreeIter *parent, GnmFunc const *fd, FormulaGuruState *state) { gboolean is_non_fun; GtkTreeIter iter; gint min_arg, max_arg, args = 0, i; char *arg_name; if (fd == NULL) { gtk_tree_model_get (GTK_TREE_MODEL(state->model), parent, IS_NON_FUN, &is_non_fun...
false
false
false
false
false
0
on_diff_update (GitgShell *shell, gchar **buffer, GitgRevisionChangesPanel *self) { gchar *line; GtkTextBuffer *buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW(self->priv->diff)); GtkTextIter iter; gtk_text_buffer_get_end_iter (buf, &iter); while ...
false
false
false
false
false
0
gst_rtsp_message_get_header (const GstRTSPMessage * msg, GstRTSPHeaderField field, gchar ** value, gint indx) { guint i; gint cnt = 0; g_return_val_if_fail (msg != NULL, GST_RTSP_EINVAL); /* no header initialized, there are no headers */ if (msg->hdr_fields == NULL) return GST_RTSP_ENOTIMPL; for ...
false
false
false
false
false
0
save_hooks(GString *str, World *world) { g_string_append_printf(str, " <hooksv2>\n"); if (world->hooks.OnConnect) { g_string_append_printf(str, " <hooklistv2 for=\"OnConnect\">\n"); save_hook_list(str, world->hooks.OnConnect); } if (world->hooks.OnDisconnect) { g_string_append_printf(str, " ...
false
false
false
false
false
0
open_rio(struct inode *inode, struct file *file) { struct rio_usb_data *rio = &rio_instance; /* against disconnect() */ mutex_lock(&rio500_mutex); mutex_lock(&(rio->lock)); if (rio->isopen || !rio->present) { mutex_unlock(&(rio->lock)); mutex_unlock(&rio500_mutex); return -EBUSY; } rio->isopen = 1; ini...
false
false
false
false
false
0
BitStream_newFromNum(int bits, unsigned int num) { unsigned int mask; int i; unsigned char *p; BitStream *bstream; bstream = BitStream_new(); if(bstream == NULL) return NULL; if(BitStream_allocate(bstream, bits)) { BitStream_free(bstream); return NULL; } p = bstream->data; mask = 1 << (bits - 1); for(...
false
false
false
false
false
0
wreaddir_resolving(DIR *dir, const std::wstring &dir_path, std::wstring &out_name, bool *out_is_dir) { struct dirent *d = readdir(dir); if (!d) return false; out_name = str2wcstring(d->d_name); if (out_is_dir) { /* The caller cares if this is a directory, so check */ bool is_dir; ...
false
false
false
false
false
0
dump_slab(struct meminfo *si) { si->s_mem = ULONG(si->slab_buf + OFFSET(kmem_slab_s_s_mem)); si->s_mem = PTOB(BTOP(si->s_mem)); if (si->flags & ADDRESS_SPECIFIED) { if (INSLAB(si->slab, si) && (si->spec_addr >= si->slab) && (si->spec_addr < (si->slab+SIZE(kmem_slab_s)))) ...
false
false
false
false
false
0
mos7720_interrupt_callback(struct urb *urb) { int result; int length; int status = urb->status; struct device *dev = &urb->dev->dev; __u8 *data; __u8 sp1; __u8 sp2; switch (status) { case 0: /* success */ break; case -ECONNRESET: case -ENOENT: case -ESHUTDOWN: /* this urb is terminated, clean up */ ...
false
false
false
false
false
0
deleteAxesData() { for ( int axisId = 0; axisId < axisCnt; axisId++ ) { delete d_axisData[axisId]->scaleEngine; delete d_axisData[axisId]; d_axisData[axisId] = NULL; } }
false
false
false
false
false
0
network_auth(void *a) { struct network *n = a; if (_state.s_state != STATE_ATTACK || _state.s_curnet != n || n->n_wstate != WSTATE_NONE) return; if (!have_mac(n)) return; time_printf(V_VERBOSE, "Authenticating...\n"); send_auth(n); timer_in(_conf.cf_to * 1000, network_auth, n); }
false
false
false
false
false
0
ParseAnchor(Scanner *pScanner, const ParserState& /*state*/) { Token& token = pScanner->peek(); if(m_anchor != "") throw ParserException(token.mark, ErrorMsg::MULTIPLE_ANCHORS); m_anchor = token.value; m_alias = false; pScanner->pop(); }
false
false
false
false
false
0
glade_widget_adaptor_object_write_child (GladeWidgetAdaptor *adaptor, GladeWidget *widget, GladeXmlContext *context, GladeXmlNode *node) { GladeXmlNode *child_node, *packing_node; GList *props; child_node = glade_xml_node_new (context, GLADE_XML_TAG_CHILD); glade_xml_node_a...
false
false
false
false
false
0
mtrr_save(void) { int i; for (i = 0; i < num_var_ranges; i++) { mtrr_if->get(i, &mtrr_value[i].lbase, &mtrr_value[i].lsize, &mtrr_value[i].ltype); } return 0; }
false
false
false
false
false
0
coda_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) { int err = coda_revalidate_inode(d_inode(dentry)); if (!err) generic_fillattr(d_inode(dentry), stat); return err; }
false
false
false
false
false
0
drawgracenote(struct note* n, double x, struct feature* ft, struct chord* thischord) /* draw an entire grace note */ { handlegracebeam(n, ft); drawgracehead(n, x, ft, n->beaming); if (n->beaming == endbeam) { drawbeam(gracebeamset, gracebeamctr, 1); }; fprintf(f, "\n"); }
false
false
false
false
false
0
filter(int *nfilter) { if (!_filter) { *nfilter = 0; return NULL; } *nfilter = _filter->len; return (char **)(_filter->pdata); }
false
false
false
false
false
0
aat_dumpprop(struct alltabs *at, SplineFont *sf) { uint16 *props = props_array(sf,&at->gi); uint32 bin_srch_header; int i, j, cnt; if ( props==NULL ) return; at->prop = tmpfile(); putlong(at->prop,0x00020000); putshort(at->prop,1); /* Lookup data */ putshort(at->prop,0); /* default p...
false
false
false
false
true
1
setmmwt(des,lf,a,gam) design *des; lfit *lf; double *a, gam; { double ip, w0, w1, sw, wt; INT i, p; sw = 0.0; p = lf->mi[MP]; for (i=0; i<lf->mi[MN]; i++) { ip = innerprod(a,d_xi(des,i),p); wt = prwt(lf,i); w0 = ip - gam*des->wd[i]; w1 = ip + gam*des->wd[i]; des->w[i] = 0.0; if (w0>0) { de...
false
false
false
false
false
0
MGD77_Ignore_Format (int format) { /* Allow user to turn on/off acceptance of certain formats. * Use MGD77_FORMAT_ANY to reset back to defaults (all OK) */ if (format == MGD77_FORMAT_ANY) { MGD77_format_allowed[MGD77_FORMAT_M77] = TRUE; MGD77_format_allowed[MGD77_FORMAT_CDF] = TRUE; MGD77_format_allowed[...
false
false
false
false
false
0
normalize(MprTestGroup *gp, char *uri, char *expectedUri) { char *validated; validated = httpNormalizeUriPath(uri); if (strcmp(expectedUri, validated) == 0) { return 1; } else { mprLog(0, "Uri \"%s\" validated to \"%s\" instead of \"%s\"\n", uri, validated, expectedUri); retu...
false
false
false
false
false
0
wasp_string_prepend( wasp_string string, const void* src, wasp_integer srclen ){ if( srclen < string->origin ){ string->origin -= srclen; string->length += srclen; memmove( string->pool + string->origin, src, srclen ); }else{ wasp_string_alter( string, 0, 0, src, srclen ); ...
false
false
false
false
false
0
check_gru_resources(struct gru_state *gru, int cbr_au_count, int dsr_au_count, int max_active_contexts) { return hweight64(gru->gs_cbr_map) >= cbr_au_count && hweight64(gru->gs_dsr_map) >= dsr_au_count && gru->gs_active_contexts < max_active_contexts; }
false
false
false
false
false
0
get_fg_tile_info_raiga(int tile_index) { UINT16 *videoram1 = &gaiden_videoram2[0x0800]; UINT16 *videoram2 = gaiden_videoram2; /* bit 3 controls blending */ tile_info.priority = (videoram2[tile_index] & 0x08) >> 3; SET_TILE_INFO( 2, videoram1[tile_index] & 0x0fff, ((videoram2[tile_index] & 0xf...
false
false
false
false
false
0
astnode_insert_child(astnode *p, astnode *c, int i) { astnode *n; astnode *x; if (p && c) { x = astnode_get_child(p, i); /* Current child at that position */ if (x == NULL) { /* There isn't a node here. Just add to end. */ astnode_add_child(p, c); } ...
false
false
false
false
false
0
xml_error(XML_Parser parser, const char *format, ...) { va_list val; va_start(val, format); xml_errh->xmessage(xml_landmark(parser), ErrorHandler::e_error, format, val); va_end(val); return -EINVAL; }
false
false
false
false
false
0
EnumDevices ( FAMILY_HANDLE& theFamilyHandle ) const { TRACE("PF::EnumDevices()\n"); if (nextFamily(theFamilyHandle)) { return getPrinterProxy(theFamilyHandle)->GetPrinterType(); } else { return UNSUPPORTED; } }
false
false
false
false
false
0
read_allNodes(int *tags,double* coord) { int i = 0; int pt = 0; cache_nodes(); for(i = 0; i < nodeCount; ++i) { tags[i] = clist[i].tag; coord[pt] = clist[i].x; coord[pt+1] = clist[i].y; coord[pt+2] = clist[i].z; pt += 3; } return 0; }
false
false
false
false
false
0
position_strand_distro_anomaly_lrt(const double alpha, const snp_pos_info& pi) { double null_loghood(0); double alt_loghood(0); unsigned df(0); position_strand_distro_anomaly_lrt_expert(pi,null_loghood,alt_loghood,df); if (df == 0) return false; return is_lrt...
false
false
false
false
false
0
dvb_fe_retrieve_v5_BER(struct dvb_v5_fe_parms *parms, unsigned layer) { float ber; uint64_t ber64; ber = calculate_postBER(parms, layer); if (ber < 0) return NULL; /* * Put BER into some DVBv3 compat scale. The thing is that DVBv3 has no * defined scale for BER. So, let's use 10^-7. */ ber...
false
false
false
false
false
0
socketFightMove() { uchar cla = readChar(); uchar num = readChar(); int row = readInt(); int col = readInt(); //logDD("cla %d, num %d , row %d ,col %d ,", cla, num, row, col); if(row > 9 || col > 15) logEE("bug! cla %d, num %d , row %d ,col %d ,", cla, num, row, col); handleMove( giveUnit( (CLASS_FIGHTER...
false
false
false
false
false
0
SendMessage(sftp_message* message) { bool sendEvent; m_criticalSection.Enter(); sendEvent = m_sftpMessages.empty(); m_sftpMessages.push_back(message); m_criticalSection.Leave(); wxCommandEvent evt(fzEVT_SFTP, wxID_ANY); if (sendEvent) wxPostEvent(m_pOwner, evt); }
false
false
false
false
false
0
c_plstar(PLINT nx, PLINT ny) { pllib_init(); if (plsc->level != 0) plend1(); plssub(nx, ny); c_plinit(); }
false
false
false
false
false
0
radeon_print_state_atom(radeonContextPtr radeon, struct radeon_state_atom *state) { int i, j, reg, count; int dwords; uint32_t packet0; if (!radeon_is_debug_enabled(RADEON_STATE, RADEON_VERBOSE) ) return; dwords = (*state->check) (&radeon->glCtx, state); fprintf(stderr, " emit %s %d/%d\n", state->name, dword...
false
false
false
false
false
0
vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], const char *names[]) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); unsigned int irq = platform_get_irq(vm_dev->pdev, 0); int i, err; err = request_irq(irq, vm_...
false
false
false
false
false
0
cl_engine_settings_apply(struct cl_engine *engine, const struct cl_settings *settings) { engine->ac_only = settings->ac_only; engine->ac_mindepth = settings->ac_mindepth; engine->ac_maxdepth = settings->ac_maxdepth; engine->keeptmp = settings->keeptmp; engine->maxscansize = settings->maxscansize; ...
false
false
false
false
false
0
kde3Factory(KLibrary *lib, const QByteArray &factoryname) { QByteArray symname = "init_"; if(!factoryname.isEmpty()) { symname += factoryname; } else { symname += QFileInfo(lib->fileName()).fileName().split(QLatin1Char('.')).first().toLatin1(); } const QString hashKey = lib->fileNam...
false
false
false
false
false
0
__strtoul_internal (const char *nptr, char **endptr, int base, int group) { unsigned long int result = 0; long int sign = 1; unsigned max_digit; while (*nptr == ' ' || *nptr == '\t') ++nptr; if (*nptr == '-') { sign = -1; ++nptr; } else if (*nptr == '+') ++nptr; if (*nptr < ...
false
false
false
false
false
0
gst_rtp_jitter_buffer_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GstRtpJitterBuffer *jitterbuffer; GstRtpJitterBufferPrivate *priv; jitterbuffer = GST_RTP_JITTER_BUFFER (object); priv = jitterbuffer->priv; switch (prop_id) { case PROP_LATENCY: { ...
false
false
false
false
false
0
save_registered_pragmas (struct pragma_entry *pe, char **sd) { for (; pe != NULL; pe = pe->next) { if (pe->is_nspace) sd = save_registered_pragmas (pe->u.space, sd); *sd++ = xmemdup (HT_STR (&pe->pragma->ident), HT_LEN (&pe->pragma->ident), HT_LEN (&pe->pragma->ident) + 1); } ...
false
false
false
false
false
0
reallocate (void* p, const size_t oldsize, const size_t newsize ) { if (p ==0) return &(GivMMFreeList::_allocate(newsize+sizeof(int64_t))->data[1]) ; BlocFreeList* tmp = reinterpret_cast<BlocFreeList*>(((char*)p)-sizeof(BlocFreeList)); #ifdef GIVARO_DEBUG if ((tmp->u.index <0) || (tmp->u.index >= BlocFreeList::...
false
false
false
false
true
1
clutter_canvas_set_property (GObject *gobject, guint prop_id, const GValue *value, GParamSpec *pspec) { ClutterCanvasPrivate *priv = CLUTTER_CANVAS (gobject)->priv; switch (prop_id) { case PROP_WIDTH: ...
false
false
false
false
false
0
qla2x00_gfpn_id(scsi_qla_host_t *vha, sw_info_t *list) { int rval = QLA_SUCCESS; uint16_t i; struct qla_hw_data *ha = vha->hw; ms_iocb_entry_t *ms_pkt; struct ct_sns_req *ct_req; struct ct_sns_rsp *ct_rsp; if (!IS_IIDMA_CAPABLE(ha)) return QLA_FUNCTION_FAILED; for (i = 0; i < ha->max_fibre_devices; i++) { ...
false
true
false
false
false
1
relate_sets (struct gf_set_descriptor *sd, dict_t *argdict, char **complist) { void *dataa[] = {NULL, NULL}; gf_boolean_t boo = _gf_false; memset (sd, 0, sizeof (*sd)); dataa[0] = sd; dataa[1] = complist; seq_dict_foreach (argdict, _gf_set_dict_iter1, dataa); w...
false
false
false
false
false
0
gegl_tile_backend_file_flush (GeglTileSource *source, GeglTile *tile, gint x, gint y, gint z) { GeglTileBackend *backend; GeglTileBackendFile *self; GL...
false
false
false
false
false
0
Strcasestr(char *haystack, const char *needle) { char *lowhay, *lowneedle, *ret; int hlen, nlen, i, ofs; if (unlikely(!haystack || !needle)) return NULL; hlen = strlen(haystack); nlen = strlen(needle); if (!hlen || !nlen) return NULL; lowhay = alloca(hlen); lowneedle = alloca(nlen); for (i = 0; i < hlen; ...
false
false
false
false
false
0
toStr(const std::vector<int> &arr) { DOMString buf; std::vector<int>::const_iterator iter; for (iter=arr.begin() ; iter!=arr.end() ; iter++) { int ch = *iter; if (isprint(ch)) buf.push_back((XMLCh)ch); else { buf.push_back('%'); ...
false
false
false
false
false
0
user_set_city_func(piece_info_t *obj) { void e_city_fill(), e_city_explore(), e_city_stasis(); void e_city_wake(), e_city_random(), e_city_repair(); void e_city_attack(); int type; char e; city_info_t *cityp; cityp = find_city (obj->loc); if (!cityp || cityp->owner != USER) { complai...
false
false
false
false
false
0
get_unique_file_id(void) { int new_fuid; /* read environment variable "VT_FILE_UNIQUE" */ new_fuid = vt_env_funique(); if( new_fuid == -1 ) /* no file-uniqueness desired ... */ { new_fuid = 0; } else if( new_fuid == 0 ) /* generate unique file id ... */ { int fd; int8_t tmp_len; s...
false
false
false
false
false
0
domlst(const char * const file) { char line[MAXPATHLEN + 256U] = MLST_BEGIN; if (modernformat(file, line + (sizeof MLST_BEGIN - 1U), sizeof line - (sizeof MLST_BEGIN - 1U), " ") >= 0) { addreply_noformat(0, line); addreply_noformat(250, "End."); } else { add...
false
false
false
false
false
0
sd_s_ctrl(struct v4l2_ctrl *ctrl) { struct gspca_dev *gspca_dev = container_of(ctrl->handler, struct gspca_dev, ctrl_handler); struct sd *sd = (struct sd *) gspca_dev; gspca_dev->usb_err = 0; if (!gspca_dev->streaming) return 0; switch (ctrl->id) { case V4L2_CID_EXPOSURE: dtcs033_setexposure(gspca_dev, ...
false
false
false
false
false
0
RetrieveRenderTime( vtkRenderer *ren ) { int i; for ( i = 0; i < this->RenderTableEntries; i++ ) { if ( this->RenderRendererTable[i] == ren ) { return this->RenderTimeTable[i]; } } return 0.0; }
false
false
false
false
false
0
bnxt_hwrm_set_pause_common(struct bnxt *bp, struct hwrm_port_phy_cfg_input *req) { if (bp->link_info.autoneg & BNXT_AUTONEG_FLOW_CTRL) { if (bp->link_info.req_flow_ctrl & BNXT_LINK_PAUSE_RX) req->auto_pause |= PORT_PHY_CFG_REQ_AUTO_PAUSE_RX; if (bp->link_info.req_flow_ctrl & BNXT_LINK_PAUSE_TX) req->auto_pau...
false
false
false
false
false
0
crmf_decode_process_controls(CRMFCertReqMsg *inCertReqMsg) { int i, numControls; SECStatus rv; PLArenaPool *poolp; CRMFControl **controls; numControls = CRMF_CertRequestGetNumControls(inCertReqMsg->certReq); controls = inCertReqMsg->certReq->controls; poolp = inCertReq...
false
false
false
false
false
0
avi_write_data(avi_t *AVI, char *data, unsigned long length, int audio, int keyframe) { int n = 0; unsigned char astr[5]; // transcode core itself checks for the size -- unneeded and // does harm to xvid 2pass encodes where the first pass can get // _very_ large -- tibit. #if 0 /* Check for maximum...
false
false
false
false
false
0
netio_mcast_set_ttl(netio_desc_t *nio,int ttl) { if (nio->type == NETIO_TYPE_MCAST) return(-1); return(udp_mcast_set_ttl(netio_get_fd(nio),ttl)); }
false
false
false
false
false
0
tracker_sparql_backend_real_update_blank_async (TrackerSparqlConnection* base, const gchar* sparql, gint priority, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) { TrackerSparqlBackend * self; TrackerSparqlBackendUpdateBlankAsyncData* _data_; TrackerSparqlBackend* _tmp0_; const gch...
false
false
false
false
false
0
nextNonBlank ( char *image ) { while ( 1 ) { if ( *image != ' ' && *image != '\t' ) break; else image++; } if ( *image == '\0' ) image=NULL; return image; }
false
false
false
false
false
0
setCachedValue(int value) const { DebugAssert(!isNull(), "CVC3::Theorem::setCachedValue: we are Null"); if (isRefl()) exprValue()->d_em->getTM()->setCachedValue((long)d_expr, value); else thm()->setCachedValue(value); }
false
false
false
false
false
0
connman_provider_set_index(struct connman_provider *provider, int index) { struct connman_service *service = provider->vpn_service; struct connman_ipconfig *ipconfig; DBG(""); if (service == NULL) return; ipconfig = __connman_service_get_ip4config(service); if (ipconfig == NULL) { connman_service_create_i...
false
false
false
false
false
0
addrbook_parse_attr_list(AddressBookFile *book, XMLFile *file, ItemPerson *person) { guint prev_level; for (;;) { prev_level = file->level; if (xml_parse_next_tag(file)) { longjmp( book->jumper, 1 ); } if (file->level < prev_level) return; if (xml_compare_tag(file, AB_ELTAG_ATTRIBUTE)) { ad...
false
false
false
false
false
0
gcov_iter_write(struct gcov_iterator *iter, struct seq_file *seq) { size_t len; if (iter->pos >= iter->size) return -EINVAL; len = ITER_STRIDE; if (iter->pos + len > iter->size) len = iter->size - iter->pos; seq_write(seq, iter->buffer + iter->pos, len); return 0; }
false
false
false
false
false
0
box_stats_leader (PLOTGROUP *grp, int i, int offset, PRN *prn) { BOXPLOT *plt = &grp->plots[i]; if (factorized(grp)) { char numstr[32]; sprintf(numstr, "%g", gretl_vector_get(grp->dvals, i)); pprintf(prn, "%-*s", offset, numstr); } else if (plt->bool != NULL) { pprintf(prn, "%s\n %-*s", plt-...
false
false
false
false
false
0
debug_start_source (void *handle, const char *name) { struct debug_handle *info = (struct debug_handle *) handle; struct debug_file *f, **pf; if (name == NULL) name = ""; if (info->current_unit == NULL) { debug_error (_("debug_start_source: no debug_set_filename call")); return FALSE; ...
false
false
false
false
false
0
settings(int narg, char **arg) { if (narg != 0) error->all(FLERR,"Illegal pair_style command"); // reset cutoffs that have been explicitly set if (allocated) { int i,j; for (i = 1; i <= atom->ntypes; i++) for (j = i+1; j <= atom->ntypes; j++) if (setflag[i][j]) cut[i][j] = 0.0; } }
false
false
false
false
false
0
as_pg_flush_jobs_on_cluster(pgsql_conn_t *pg_conn, time_t event_time) { DEF_VARS; int rc = SLURM_SUCCESS; /* put end times for a clean start */ char *id_char = NULL; char *suspended_char = NULL; if(check_db_connection(pg_conn) != SLURM_SUCCESS) return ESLURM_DB_CONNECTION; if (! cluster_in_db(pg_conn...
false
false
false
false
true
1
release_function (function_t *fn) { unsigned ix; block_t *block; for (ix = fn->num_blocks, block = fn->blocks; ix--; block++) { arc_t *arc, *arc_n; for (arc = block->succ; arc; arc = arc_n) { arc_n = arc->succ_next; free (arc); } } free (fn->blocks); free (fn->counts); }
false
false
false
false
false
0
nodeListRest(EvalContext &context, Interpreter &interp) { for (;;) { NodePtr nd = nodeList_->nodeListFirst(context, interp); if (!nd) break; bool matched = 0; for (size_t i = 0; i < patterns_->size(); i++) { if ((*patterns_)[i].matches(nd, interp)) { matched = 1; break; ...
false
false
false
false
false
0
getFileBasename(const io::path& filename, bool keepExtension) const { // find last forward or backslash s32 lastSlash = filename.findLast('/'); const s32 lastBackSlash = filename.findLast('\\'); lastSlash = core::max_(lastSlash, lastBackSlash); // get number of chars after last dot s32 end = 0; if (!ke...
false
false
false
false
false
0
db_quota_set_common(struct quota *q, const char *name, int is_group) { struct db_quota_arg *arg = db_quota_arg_alloc(q, name, is_group); if (arg == NULL) { gflog_debug(GFARM_MSG_1002048, "db_quota_arg_alloc() failed"); return (GFARM_ERR_NO_MEMORY); } if (q->on_db) return (dbq_enter(&dbq, (dbq_entry_func_...
false
false
false
false
false
0
set_pin(PROGRAMMER * pgm, int pinname, int val) { unsigned char buf[1]; if (pgm->pin[pinname].mask[0] == 0) { // ignore not defined pins (might be the led or vcc or buff if not needed) return 0; } ft245r_out = SET_BITS_0(ft245r_out,pgm,pinname,val); buf[0] = ft245r_out; ft245r...
true
true
false
false
false
1
mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq) { struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_cq_table *cq_table = &priv->cq_table; int err; err = mlx4_HW2SW_CQ(dev, NULL, cq->cqn); if (err) mlx4_warn(dev, "HW2SW_CQ failed (%d) for CQN %06x\n", err, cq->cqn); spin_lock(&cq_table->lock); radix...
false
false
false
false
false
0
fluid_synth_set_chorus_full(fluid_synth_t* synth, int set, int nr, double level, double speed, double depth_ms, int type) { fluid_return_val_if_fail (synth != NULL, FLUID_FAILED); if (!(set & FLUID_CHORUS_SET_ALL)) set = FLUID_CHORUS_SET_ALL; /* Synth shadow values are set here so tha...
false
false
false
false
false
0
getElementFromNodeContent(const DSRXMLCursor &cursor, DcmElement &delem, const char *name, const OFBool encoding) const { OFCondition result = SR_EC_Inval...
false
false
false
false
false
0
git_mwindow_file_deregister(git_mwindow_file *mwf) { git_mwindow_ctl *ctl = &mem_ctl; git_mwindow_file *cur; size_t i; if (git_mutex_lock(&git__mwindow_mutex)) return; git_vector_foreach(&ctl->windowfiles, i, cur) { if (cur == mwf) { git_vector_remove(&ctl->windowfiles, i); git_mutex_unlock(&git__mwind...
false
false
false
false
false
0
locate(const Vertex &v) { if (!lastEdge || !lastEdge->isLive()) { init(); } QuadEdge *e = subdiv->locateFromEdge(v, *lastEdge); lastEdge = e; return e; } }
false
false
false
false
false
0
chewing_handle_ShiftRight( ChewingContext *ctx ) { ChewingData *pgdata = ctx->data; ChewingOutput *pgo = ctx->output; int keystrokeRtn = KEYSTROKE_ABSORB; if ( ! ChewingIsEntering( pgdata ) ) { keystrokeRtn = KEYSTROKE_IGNORE; } if ( ! pgdata->bSelect ) { /* PointEnd locates (-9, +9) */ if ( ! ZuinIsEn...
false
false
false
false
false
0
btrfs_test_free_space_cache(void) { struct btrfs_block_group_cache *cache; struct btrfs_root *root = NULL; int ret = -ENOMEM; test_msg("Running btrfs free space cache tests\n"); cache = init_test_block_group(); if (!cache) { test_msg("Couldn't run the tests\n"); return 0; } root = btrfs_alloc_dummy_root(...
false
false
false
false
false
0
attach_label (GtkGrid *grid, GtkWidget *sibling, const char *initial_text, gboolean right_aligned, gboolean bold, gboolean ellipsize_text, gboolean selectable, gboolean mnemonic) { GtkWidget *label_field; if (ellipsize_text) { label_field = gtk_label_new (initial_te...
false
false
false
false
false
0
Reorder(vtkIdType in[4], vtkIdType order[4]) { // Input: in[4] contains pointId of a tetra in right hand rule. // Output: this function reorders so that: // out[0] < out[1] // out[0] < out[2] // out[0] < out[3] // out[1] < out[2] // out[1] < out[3] // and still respect the right hand rule for tetra: ...
false
false
false
false
false
0
ParseXRLELine(char *line, int *xoff, int *yoff, bool *sawpos, bigint &gen) { char *key = line; while (key) { // set key to start of next key word while (*key && *key != ' ') key++; while (*key == ' ') key++; if (*key == 0) return; // set value to pos of char after next '=' cha...
false
false
false
false
false
0
cpp_java_plugin_update_user_packages (CppJavaPlugin* plugin, AnjutaPkgConfigChooser* chooser) { GList* pkg; GList* packages = anjuta_pkg_config_chooser_get_active_packages (chooser); GString* pkg_string = g_string_new (NULL); for (pkg = packages; pkg != NULL; pkg =...
false
false
false
false
false
0
__dbreg_assign_id(dbp, id, deleted) DB *dbp; int32_t id; int deleted; { DB *close_dbp; DB_LOG *dblp; ENV *env; FNAME *close_fnp, *fnp; LOG *lp; int ret; env = dbp->env; dblp = env->lg_handle; lp = dblp->reginfo.primary; fnp = dbp->log_filename; close_dbp = NULL; close_fnp = NULL; /* The mtx_filelist ...
false
false
false
false
false
0
isWindowOpenAllowed() const { if ( m_evt ) { int id = m_evt->handle()->id(); bool eventOk = ( // mouse events id == DOM::EventImpl::CLICK_EVENT || id == DOM::EventImpl::MOUSEUP_EVENT || id == DOM::EventImpl::MOUSEDOWN_EVENT || id == DOM::EventImpl::KHTML_ECMA_CLICK_EVENT || id == DOM::Even...
false
false
false
false
false
0
OnStateChange(CState* pState, enum t_statechange_notifications notification, const wxString& data, const void* data2) { wxASSERT(notification == STATECHANGE_LOCAL_DIR); #ifdef __WXGTK__ m_autoCompletionText = _T(""); #endif wxString dir = pState->GetLocalDir().GetPath(); AddRecentDirectory(dir); }
false
false
false
false
false
0
rad_recvfrom(int sockfd, uint8_t **pbuf, int flags, fr_ipaddr_t *src_ipaddr, uint16_t *src_port, fr_ipaddr_t *dst_ipaddr, uint16_t *dst_port) { struct sockaddr_storage src; struct sockaddr_storage dst; socklen_t sizeof_src = sizeof(src); socklen_t sizeof_dst = sizeof(dst); ssize_t data_len...
false
false
false
false
false
0
bfd_coff_get_syment (bfd *abfd, asymbol *symbol, struct internal_syment *psyment) { coff_symbol_type *csym; csym = coff_symbol_from (abfd, symbol); if (csym == NULL || csym->native == NULL) { bfd_set_error (bfd_error_invalid_operation); return FALSE; } *psyment = csym->native...
false
false
false
false
false
0
_e_smart_event_wheel(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) { Evas_Event_Mouse_Wheel *ev; E_Smart_Data *sd; Evas_Coord x = 0, y = 0; sd = data; ev = event_info; e_scrollframe_child_pos_get(sd->smart_obj, &x, &y); if ((sd->vbar_visible) && ((ev->direction % ...
false
false
false
false
false
0
prep_io(int fd, int fmode, VALUE klass, const char *path) { rb_io_t *fp; VALUE io = io_alloc(klass); MakeOpenFile(io, fp); fp->fd = fd; #ifdef __CYGWIN__ if (!isatty(fd)) { fmode |= FMODE_BINMODE; setmode(fd, O_BINARY); } #endif fp->mode = fmode; io_check_tty(fp); if (path)...
false
false
false
false
false
0
CHISE_DS_open (CHISE_DS_Type type, const unsigned char *location, int subtype, int modemask) { CHISE_DS *ds = (CHISE_DS*)malloc (sizeof (CHISE_DS)); size_t len = strlen (location); if (ds == NULL) return NULL; ds->type = type; ds->subtype = ( (subtype != 0) ? subtype : DB_HASH ); ds->modemask ...
false
false
false
false
true
1
my_bt_hold_toggle(void *data, Evas_Object *obj, void *event_info __UNUSED__) { if (elm_check_state_get(obj)) elm_object_scroll_hold_push((Evas_Object *)data); else elm_object_scroll_hold_pop((Evas_Object *)data); }
false
false
false
false
false
0
multi_term_notebook_on_terminal_right_click_event (MultiTermNotebook* self, GdkEventButton* event) { gboolean result = FALSE; MultiTermContextMenu* _tmp0_; MultiTermContextMenu* _tmp10_; GdkEventButton _tmp11_; guint _tmp12_; GdkEventButton _tmp13_; guint32 _tmp14_; g_return_val_if_fail (self != NULL, FALSE); ...
false
false
false
false
false
0
gfm_create_fd_success(struct gfm_connection *gfm_server, void *closure) { struct gfm_create_fd_closure *c = closure; *c->gfm_serverp = gfm_server; *c->fdp = c->fd; if (c->typep != NULL) *c->typep = gfs_mode_to_type(c->mode_created);; return (GFARM_ERR_NO_ERROR); }
false
false
false
false
false
0
make8To1DitherTables(l_int32 **ptabval, l_int32 **ptab38, l_int32 **ptab14, l_int32 lowerclip, l_int32 upperclip) { l_int32 i; l_int32 *tabval, *tab38, *tab14; PROCNAME("make8To1DitherTables"); if (!ptabval || !ptab38 |...
false
false
false
false
false
0