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
keyToTXXX(const String &s) { static Map<String, String> m; if(m.isEmpty()) for(size_t i = 0; i < txxxFrameTranslationSize; ++i) m[txxxFrameTranslation[i][1]] = txxxFrameTranslation[i][0]; if(m.contains(s.upper())) return m[s]; return s; }
false
false
false
false
false
0
end_with_slash( char* str ) { if ( str[strlen( str ) - 1] != '/' ) (void) strcat( str, "/" ); }
false
false
false
false
false
0
file_is_writeable(struct ArchivePage* page) { int fd; if (g_file_test(page->name, G_FILE_TEST_EXISTS) && ! page->force_overwrite) return A_FILE_EXISTS; if (g_file_test(page->name, G_FILE_TEST_IS_SYMLINK)) return A_FILE_IS_LINK; if (g_file_test(page->name, G_FILE_TEST_IS_DIR)) ...
false
false
false
false
false
0
ProcessRawProfile(const char* profile, size_t profile_len, MetadataPayload* const payload) { const char* src = profile; char* end; int expected_length; if (profile == NULL || profile_len == 0) return 0; // ImageMagick formats 'raw profiles' as // '\n<name>\n<length>(%8lu)\n<he...
false
false
false
false
false
0
DSDPSchurMatRowScaling(DSDPSchurMat M, DSDPVec D){ int info; DSDPFunctionBegin; info=DSDPSchurMatDiagonalScaling(M,D);DSDPCHKERR(info); info=DSDPZeroFixedVariables(M,D);DSDPCHKERR(info); DSDPFunctionReturn(0); }
false
false
false
false
false
0
make_set_void_cookie_header(char *cookie_name, int for_acs, char **set_cookie_buf) { char *path, *ps; Ds ds; /* * A time in the past. We use the earliest possible Unix clock time * (time(NULL) == 0). * XXX The Netscape cookie spec isn't specific about what the earliest * possible date is. Th...
false
false
false
false
false
0
__db_join_close(dbc) DBC *dbc; { DB *dbp; ENV *env; JOIN_CURSOR *jc; int ret, t_ret; u_int32_t i; jc = (JOIN_CURSOR *)dbc->internal; dbp = dbc->dbp; env = dbp->env; ret = t_ret = 0; /* * Remove from active list of join cursors. Note that this * must happen before any action that can fail and return, o...
false
false
false
false
false
0
hpfs_add_pos(struct inode *inode, loff_t *pos) { struct hpfs_inode_info *hpfs_inode = hpfs_i(inode); int i = 0; loff_t **ppos; if (hpfs_inode->i_rddir_off) for (; hpfs_inode->i_rddir_off[i]; i++) if (hpfs_inode->i_rddir_off[i] == pos) return; if (!(i&0x0f)) { if (!(ppos = kmalloc((i+0x11) * sizeof(loff_t*)...
false
false
false
false
false
0
bufferedrwpair_dealloc(rwpair *self) { _PyObject_GC_UNTRACK(self); if (self->weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *)self); Py_CLEAR(self->reader); Py_CLEAR(self->writer); Py_CLEAR(self->dict); Py_TYPE(self)->tp_free((PyObject *) self); }
false
false
false
false
false
0
set_var_mtrr(unsigned int reg, unsigned long basek, unsigned long sizek, unsigned char type, unsigned int address_bits) { u32 base_lo, base_hi, mask_lo, mask_hi; u64 base, mask; if (!sizek) { fill_mtrr_var_range(reg, 0, 0, 0, 0); return; } mask = (1ULL << address_bits) - 1; mask &= ~((((u64)sizek) << ...
false
false
false
false
false
0
setPath(const char* path) { if(path==NULL) return E_UNSPECIFIED; // ((sockaddr_un*)m_pAddr)->sun_len=strlen(path); if(strlen(path)>=sizeof(sun_path)) return E_SPACE; strcpy(sun_path,path); return E_SUCCESS; }
false
false
false
false
false
0
evas_common_scale_rgba_in_to_out_clip_prepare(Cutout_Rects *reuse, const RGBA_Image *src __UNUSED__, const RGBA_Image *dst, RGBA_Draw_Context *dc, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h) { /* handle cutouts here! */ if ((dst_region_w <= 0...
false
false
false
false
false
0
mips64_mts32_translate(cpu_mips_t *cpu,m_uint64_t vaddr, m_uint32_t *phys_page) { mts32_entry_t *entry,alt_entry; m_uint32_t hash_bucket; m_uint64_t data = 0; hash_bucket = MTS32_HASH(vaddr); entry = &cpu->mts_u.mts32_cache[hash_bucket]; /* Slow loo...
false
false
false
false
false
0
pushNegation(const Expr& e) { if(e.isTerm()) return d_commonRules->reflexivityRule(e); Theorem res(pushNegationRec(e, false)); d_pushNegCache.clear(); return res; }
false
false
false
false
false
0
de_tx (struct de_private *de) { unsigned tx_head = de->tx_head; unsigned tx_tail = de->tx_tail; while (tx_tail != tx_head) { struct sk_buff *skb; u32 status; rmb(); status = le32_to_cpu(de->tx_ring[tx_tail].opts1); if (status & DescOwn) break; skb = de->tx_skb[tx_tail].skb; BUG_ON(!skb); if (un...
false
false
false
false
false
0
main(int argc, char **argv) { l_int32 i; BOXA *boxa; NUMA *nas, *nab; PIX *pixs; PIXA *pixa, *pixas; static char mainName[] = "pixalloc_reg"; /* ----------------- Custom with a few large pix -----------------*/ /* Set up pms */ nas = numaCreate(4); /* small ...
false
false
false
false
false
0
mlx4_ib_destroy_srq(struct ib_srq *srq) { struct mlx4_ib_dev *dev = to_mdev(srq->device); struct mlx4_ib_srq *msrq = to_msrq(srq); mlx4_srq_free(dev->dev, &msrq->msrq); mlx4_mtt_cleanup(dev->dev, &msrq->mtt); if (srq->uobject) { mlx4_ib_db_unmap_user(to_mucontext(srq->uobject->context), &msrq->db); ib_umem_r...
false
false
false
false
false
0
fftsad(fitsfile *mfptr, /* pointer to an member HDU */ HDUtracker *HDU, /* pointer to an HDU tracker struct */ int *newPosition, /* new HDU position of the member HDU */ char *newFileName) /* file containing member HDU */ /* add an HDU to the HDUtr...
false
false
false
false
false
0
mpt3sas_transport_port_remove(struct MPT3SAS_ADAPTER *ioc, u64 sas_address, u64 sas_address_parent) { int i; unsigned long flags; struct _sas_port *mpt3sas_port, *next; struct _sas_node *sas_node; u8 found = 0; struct _sas_phy *mpt3sas_phy, *next_phy; spin_lock_irqsave(&ioc->sas_node_lock, flags); sas_node = ...
false
false
false
false
false
0
kvm_io_bus_get_first_dev(struct kvm_io_bus *bus, gpa_t addr, int len) { struct kvm_io_range *range, key; int off; key = (struct kvm_io_range) { .addr = addr, .len = len, }; range = bsearch(&key, bus->range, bus->dev_count, sizeof(struct kvm_io_range), kvm_io_bus_sort_cmp); if (range == NULL) re...
false
false
false
false
false
0
pcb_error_callback(void *arg) { ParseCallbackState *pcbstate = (ParseCallbackState *) arg; if (geterrcode() != ERRCODE_QUERY_CANCELED) (void) parser_errposition(pcbstate->pstate, pcbstate->location); }
false
false
false
false
false
0
push(int, Packet *p) { const unsigned char *data = p->data(); int o = _offset, l = _length; if ((int)p->length() < o + l) output(0).push(p); else { int d = 0; for (int i = o; i < o + l; i++) d += data[i]; int n = noutputs(); if (n == 2 || n == 4 || n == 8) output((d ^ (d>>4)) & (...
false
false
false
false
false
0
isEhDataRegFI(int FI) const { return CallsEhReturn && (FI == EhDataRegFI[0] || FI == EhDataRegFI[1] || FI == EhDataRegFI[2] || FI == EhDataRegFI[3]); }
false
false
false
false
false
0
PrepareAddress() { // We will keep pinging the stun server to make sure our NAT pin-hole stays // open during the call. if (server_addr_.IsUnresolved()) { ResolveStunAddress(); } else { requests_.Send(new StunPortBindingRequest(this, true, server_addr_)); } }
false
false
false
false
false
0
tas5086_set_dai_sysclk(struct snd_soc_dai *codec_dai, int clk_id, unsigned int freq, int dir) { struct snd_soc_codec *codec = codec_dai->codec; struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); switch (clk_id) { case TAS5086_CLK_IDX_MCLK: priv->mclk = freq; break; case TAS5086_CLK_IDX_SCL...
false
false
false
false
false
0
adm8211_add_interface(struct ieee80211_hw *dev, struct ieee80211_vif *vif) { struct adm8211_priv *priv = dev->priv; if (priv->mode != NL80211_IFTYPE_MONITOR) return -EOPNOTSUPP; switch (vif->type) { case NL80211_IFTYPE_STATION: priv->mode = vif->type; break; default: return -EOPNOTSUPP; } ADM8211_...
false
false
false
false
false
0
bnxt_fw_to_ethtool_advertised_spds(struct bnxt_link_info *link_info) { u16 fw_speeds = link_info->auto_link_speeds; u32 speed_mask = 0; /* TODO: support 25GB, 40GB, 50GB with different cable type */ /* set the advertised speeds */ if (fw_speeds & BNXT_LINK_SPEED_MSK_100MB) speed_mask |= ADVERTISED_100baseT_Full...
false
false
false
false
false
0
antigetopt(int argc, char **argv, struct ago_optlist *list) { static char **save_argv = NULL; static char *chain = NULL; static int endoptions = 0; struct ago_optlist *opt; int islong; argc = argc; /* avoid a warning */ /* Reset */ if (argv == NULL) { save_argv = NULL; chain = NULL; endoptions = 0; re...
false
false
false
false
false
0
eti_ref_accessible_at_point (AtkComponent *component, gint x, gint y, AtkCoordType coord_type) { gint row = -1; gint col = -1; gint x_origin, y_origin; ETableItem *item; GtkWidget *tableOrTree; item = E_TABLE_ITEM (eti_a11y_ge...
false
false
false
false
false
0
resetLayerKin() { foreach (ItemBase * lkpi, layerKin()) { if (lkpi->viewLayerID() == ViewLayer::SchematicText) { QString svg = makeSvg(lkpi->viewLayerID()); lkpi->resetRenderer(svg); lkpi->setProperty("textSvg", svg); qobject_cast<SchematicTextLayerKinPaletteItem *...
false
false
false
false
false
0
transferEnd() { DcmObject::transferEnd(); privateCreatorCache.clear(); if (!elementList->empty()) { elementList->seek(ELP_first); do { elementList->get()->transferEnd(); } while (elementList->seek(ELP_next)); } }
false
false
false
false
false
0
goo_canvas_table_init_data (GooCanvasTableData *table_data) { gint d; table_data->width = -1.0; table_data->height = -1.0; for (d = 0; d < 2; d++) { table_data->dimensions[d].size = 0; table_data->dimensions[d].default_spacing = 0.0; table_data->dimensions[d].spacings = NULL; table...
false
false
false
false
false
0
pdf_is_real(pdf_obj *obj) { RESOLVE(obj); return obj ? obj->kind == PDF_REAL : 0; }
false
false
false
false
false
0
make_pyramid(LIKELIHOOD **** ll_pym, /* log likelihood pyramid, ll_pym[scale][i][j][class] */ struct Region *region, /* specifies image subregion */ int M, /* number of classes */ double *alpha, /* decimation parameters */ int vlevel /* verbose operation */ ) { int D; int wd, ht; struct ...
false
false
false
false
false
0
gst_format_register (const gchar * nick, const gchar * description) { GstFormatDefinition *format; GstFormat query; g_return_val_if_fail (nick != NULL, GST_FORMAT_UNDEFINED); g_return_val_if_fail (description != NULL, GST_FORMAT_UNDEFINED); query = gst_format_get_by_nick (nick); if (query != GST_FORMAT_UN...
false
false
false
false
false
0
embBtreeParseEmblSv(const AjPStr readline, EmbPBtreeField field) { AjPStr str = NULL; ajStrAssignSubS(&embindexLine, readline, 5, -1); ajStrTokenAssignC(&embindexHandle,embindexLine," \t\n\r;"); if(!ajStrTokenNextParse(embindexHandle,&embindexToken)) return; if(field->freecount) str...
false
false
false
false
false
0
GetDocProjectName(wxInt32 item, wxString& strBuffer) const { PROJECT* project = NULL; CMainDocument* pDoc = wxGetApp().GetDocument(); std::string project_name; if (pDoc) { project = pDoc->project(item); } if (project) { project->get_name(project_name); strBuffer = s...
false
false
false
false
false
0
read_file(File* filePtr) { int curTutorId = filePtr->file_get_short(); if( curTutorId > 0 ) tutor.load(curTutorId); // load() will reset cur_text_block_id cur_text_block_id = filePtr->file_get_short(); last_text_block_id = 0; return 1; }
false
false
false
false
false
0
fwdStartComplete(FwdServer * servers, void *data) { FwdState *fwdState = data; debug(17, 3) ("fwdStartComplete: %s\n", storeUrl(fwdState->entry)); if (servers != NULL) { fwdState->servers = servers; fwdConnectStart(fwdState); } else { fwdStartFail(fwdState); } }
false
false
false
false
false
0
get_new_info_part(partition_info_msg_t **part_ptr, int force) { static partition_info_msg_t *new_part_ptr = NULL; uint16_t show_flags = 0; int error_code = SLURM_NO_CHANGE_IN_DATA; time_t now = time(NULL); static time_t last; static bool changed = 0; static uint16_t last_flags = 0; if (g_part_info_ptr && !forc...
false
false
false
false
false
0
kill_vines(game *g, monster *z) { std::vector<int> vines; std::vector<int> hubs; for (int i = 0; i < g->z.size(); i++) { if (g->z[i].type->id == mon_creeper_hub && (g->z[i].posx != z->posx || g->z[i].posy != z->posy)) hubs.push_back(i); if (g->z[i].type->id == mon_creeper_vine) vines.push_back(i); }...
false
false
false
false
false
0
freeocmemdata(OCmemdata* md) { char** sp; OCmemdata** mdp; unsigned int i; if(md == NULL) return; switch ((OCtype)md->octype) { case OC_Primitive: switch ((OCtype)md->etype) { case OC_Char: case OC_Byte: case OC_UByte: case OC_Int16: case OC_UInt16: case OC_Int32: case OC_UInt32:...
false
false
false
false
true
1
event_triggers_call(struct trace_event_file *file, void *rec) { struct event_trigger_data *data; enum event_trigger_type tt = ETT_NONE; struct event_filter *filter; if (list_empty(&file->triggers)) return tt; list_for_each_entry_rcu(data, &file->triggers, list) { if (!rec) { data->ops->func(data); cont...
false
false
false
false
false
0
swq_select_finish_summarize( swq_select *select_info ) { int (FORCE_CDECL *compare_func)(const void *, const void*); int count = 0; char **distinct_list = NULL; if( select_info->query_mode != SWQM_DISTINCT_LIST || select_info->order_specs == 0 ) return NULL; if( select_info->orde...
false
false
false
false
false
0
loadmem(ESL_SQFILE *sqfp) { void *tmp; int n; int status; ESL_SQASCII_DATA *ascii = &sqfp->data.ascii; if (ascii->do_buffer) { ascii->mpos = 0; ascii->mn = 0; } else if (ascii->is_recording == TRUE) { if (ascii->mem == NULL) ascii->moff = ftello(ascii->fp); /* first ti...
false
false
false
false
false
0
gmenu_scroll(GGadget *g, GEvent *event) { enum sb sbt = event->u.control.u.sb.type; GMenu *m = (GMenu *) (g->data); int newpos = m->offtop; if ( sbt==et_sb_top ) newpos = 0; else if ( sbt==et_sb_bottom ) newpos = m->mcnt-m->lcnt; else if ( sbt==et_sb_up ) { --newpos; } else if ( sbt==et_...
false
false
false
false
false
0
nemo_bookmark_uri_known_not_to_exist (NemoBookmark *bookmark) { char *path_name; gboolean exists; /* Convert to a path, returning FALSE if not local. */ if (!g_file_is_native (bookmark->details->location)) { return FALSE; } path_name = g_file_get_path (bookmark->details->location); /* Now check if the file e...
false
false
false
false
false
0
eval_expr_multdiv (char **expr, long int *result) { long int arg; /* Read a Value */ if (eval_expr_val (expr, result) != 0) return WRDE_SYNTAX; while (**expr) { /* Skip white space */ for (; *expr && **expr && isspace (**expr); ++(*expr)); if (**expr == '*') { ++(*expr); if (...
false
false
false
false
false
0
tg3_set_rxfh(struct net_device *dev, const u32 *indir, const u8 *key, const u8 hfunc) { struct tg3 *tp = netdev_priv(dev); size_t i; /* We require at least one supported parameter to be changed and no * change in any of the unsupported parameters */ if (key || (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc ...
false
false
false
false
false
0
snd_emu10k1x_free(struct emu10k1x *chip) { snd_emu10k1x_ptr_write(chip, TRIGGER_CHANNEL, 0, 0); // disable interrupts outl(0, chip->port + INTE); // disable audio outl(HCFG_LOCKSOUNDCACHE, chip->port + HCFG); /* release the irq */ if (chip->irq >= 0) free_irq(chip->irq, chip); // release the i/o port relea...
false
false
false
false
false
0
gtk_video_reshow (GtkVideo *gtv) { if (gtv && GTK_IS_VIDEO (gtv)) { gtv->priv->block_next_scale_change = TRUE; gtk_widget_show (&gtv->widget); gtk_widget_set_size_request (&gtv->widget, gtv->priv->size.width, gtv->priv->size.height); gdk_flush (); gtv_unblock_timeout (gtv); gtk_video_al...
false
false
false
false
false
0
mt9m111_probe(struct sd *sd) { u8 data[2] = {0x00, 0x00}; int i; struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; if (force_sensor) { if (force_sensor == MT9M111_SENSOR) { pr_info("Forcing a %s sensor\n", mt9m111.name); goto sensor_found; } /* If we want to force another sensor, don't try to probe...
false
false
false
false
false
0
xdr_ndmp3_u_quad(xdrs, objp) register XDR *xdrs; ndmp3_u_quad *objp; { u_long hi, lo; switch (xdrs->x_op) { case XDR_DECODE: if (XDR_GETLONG(xdrs, (long*)&hi) && XDR_GETLONG(xdrs, (long*)&lo)) { *objp = ((unsigned long long)hi << 32) | (lo & 0xffffffff); return TRUE; } break; case XDR_ENCODE: ...
false
false
false
false
false
0
addRecord(const char* seqname, uint seqlen, off_t foffs, int llen, int llen_full) { GFastaRec* farec=records.Find(seqname); if (farec!=NULL) { GMessage("Warning: duplicate sequence ID (%s) added to the fasta index! Only last entry data will be kept.\n"); farec->seqlen=seqlen; far...
false
false
false
false
false
0
fswc_strduptime(char *src, time_t timestamp, int gmt) { struct tm tm_timestamp; char *dst; size_t l; if(!src) return(NULL); /* Set the time structure. */ if(gmt) gmtime_r(&timestamp, &tm_timestamp); else localtime_r(&timestamp, &tm_timestamp); dst = NULL; l = strlen(src) * 2; while(1) { size_t r; ...
false
false
false
false
false
0
remove(position s) { c(s) = 0; if(potential_articulation(s)) { recalc(); } else { cedges[c(s)] -= 2*degree(s); if(color(s)) red[c(s)] --; else black[c(s)] --; } }
false
false
false
false
false
0
sqrt(long x) { err_when( x < 0 ); long OddInt, OldArg, FirstSqrt; OddInt=1; OldArg=x; while(x>=0) { x-=OddInt; OddInt+=2; } FirstSqrt=OddInt >> 1; if( FirstSqrt*FirstSqrt - FirstSqrt + 1 > OldArg) return(FirstSqrt-1); else return(FirstSqrt); }
false
false
false
false
false
0
bet_data_hist_add_div ( gint account_number, gint div_number, gint sub_div_nb ) { gchar *key; gchar *sub_key; struct_hist_div *shd; key = bet_data_get_key ( account_number, div_number ); if ( ( shd = g_hash_table_lookup ( bet_hist_div_list, key ) ) )...
false
false
false
false
false
0
gnc_table_set_size (Table * table, int virt_rows, int virt_cols) { /* Invalidate the current cursor position, if the array is * shrinking. This must be done since the table is probably * shrinking because some rows were deleted, and the cursor * could be on the deleted rows. */ if ((virt_rows < t...
false
false
false
false
false
0
ext4_ext_zeroout(struct inode *inode, struct ext4_extent *ex) { ext4_fsblk_t ee_pblock; unsigned int ee_len; int ret; ee_len = ext4_ext_get_actual_len(ex); ee_pblock = ext4_ext_pblock(ex); if (ext4_encrypted_inode(inode)) return ext4_encrypted_zeroout(inode, ex); ret = sb_issue_zeroout(inode->i_sb, ee_pb...
false
false
false
false
false
0
cb_col_check_clicked (GtkToggleButton *togglebutton, gpointer _i) { int i = GPOINTER_TO_INT (_i); StfDialogData *pagedata = g_object_get_data (G_OBJECT (togglebutton), "pagedata"); gboolean active = gtk_toggle_button_get_active (togglebutton); GtkCellRenderer *renderer; GtkTreeViewColumn* column; GtkWidget *che...
false
false
false
false
false
0
op_print(void) { int length; abort_output = FALSE; length = decodezscii(PC, output_char); if(!abort_output) PC += length; }
false
false
false
false
false
0
delete_callback(Widget w, XEvent* event, String *params, int *num_params) { if (event->type != ClientMessage || event->xclient.data.l[0] != wm_delete_window) return; winaction=changeparms; close_x(); }
false
false
false
false
false
0
get_po(ppdcFile *fp) // I - File to read { char locale[32], // Locale name poname[1024], // Message catalog filename basedir[1024], // Base directory *baseptr, // Pointer into directory pofilename[1024]; // Full filename of message catalog ppdcCatalog *cat; // Message catalog // Read the #po para...
false
false
false
false
false
0
tomoyo_read_token(struct tomoyo_acl_param *param) { char *pos = param->data; char *del = strchr(pos, ' '); if (del) *del++ = '\0'; else del = pos + strlen(pos); param->data = del; return pos; }
false
false
false
false
false
0
getHelixPositions(const char *helixNr) const { sec_assert(helixNr); const BI_helix *helix = get_helixDef(); long start1 = helix->first_position(helixNr); if (start1 == -1) return 0; size_t start2 = helix->last_position(helixNr); static size_t pos[4]; if (size_t(start1)<...
false
false
false
false
false
0
clight_init() { Appearance *ap = drawerstate.ap; LmLighting *lgt; IOBFILE *f; f = iobfileopen(fmemopen(raytxt, strlen(raytxt), "rb")); if (f) { ray = GeomFLoad(f, "built-in light ray"); if (! ray) printf("can't construct built-in light ray\n"); } else printf("can't fstropen\n"); iobfc...
false
false
false
false
false
0
wiimod_keys_probe(const struct wiimod_ops *ops, struct wiimote_data *wdata) { unsigned int i; set_bit(EV_KEY, wdata->input->evbit); for (i = 0; i < WIIPROTO_KEY_COUNT; ++i) set_bit(wiimod_keys_map[i], wdata->input->keybit); return 0; }
false
false
false
false
false
0
ListFiles() { std::vector<FileInfo> list; for (size_t i = 0;i<m_vHeaderData.size();i++) { list.push_back(FileInfo(m_vHeaderData[i].m_strName, m_vHeaderData[i].m_iSize)); } return list; }
false
false
false
false
false
0
git_buf_shorten(git_buf *buf, size_t amount) { if (buf->size > amount) git_buf_truncate(buf, buf->size - amount); else git_buf_clear(buf); }
false
false
false
false
false
0
output_music(void) { struct VOICE_S *p_voice; float lwidth, indent; /* set the staff system if any STAVES at start of the next line */ gen_init(); if (tsfirst == 0) return; check_buffer(); /* dump buffer if not enough space for a music line */ set_global(); /* initialize the generator */ if (first_voice->n...
false
false
false
false
false
0
pass_blame_to_parent(struct scoreboard *sb, struct origin *target, struct origin *parent) { int i, last_in_target, plno, tlno; struct patch *patch; last_in_target = find_last_in_target(sb, target); if (last_in_target < 0) return 1; /* nothing remains for this target */ patch = get_patch(parent, target)...
false
false
false
false
false
0
gel_encode_string (const char *s) { if (ve_string_empty (s)) return g_strdup ("E"); if (is_ok_ascii (s)) { return g_strconcat ("A", s, NULL); } else { char *p = g_base64_encode ((const unsigned char *)s, strlen (s)); char *ret = g_strconcat ("B", p, NULL); g_free (p); return ret; } }
false
false
false
false
false
0
gnc_bi_import_gui_open_mode_cb (GtkWidget *widget, gpointer data) { BillImportGui *gui = data; const gchar *name; name = gtk_buildable_get_name(GTK_BUILDABLE(widget)); if (!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(widget) )) return; if (g_ascii_strcasecmp(name, "radiobuttonOpenAll") ...
false
false
false
false
false
0
gwy_graph_model_remove_curve_by_description(GwyGraphModel *gmodel, const gchar *description) { GPtrArray *newcurves; GArray *newaux; GwyGraphCurveModel *cmodel; guint i; g_return_val_if_fail(GWY_IS_GRAPH_MODEL(gmodel), 0); g_return_val_if_fail(descrip...
false
false
false
false
false
0
reassemble (adobe, font, body, adobefname, fontfname, bodyfname) FILE* adobe; FILE* font; FILE* body; char *adobefname; char *fontfname; char *bodyfname; { int xx; /* put everything in right order ... */ if( adobe != NULL ){ rewind(adobe); while( (xx = getc( adobe )) != EOF ){ putc(xx,y...
false
false
false
false
false
0
cpl_matrix_set_size_(cpl_matrix * self, cpl_size nr, cpl_size nc) { cpl_ensure_code(self != NULL, CPL_ERROR_NULL_INPUT); if (self->nr != nr || self->nc != nc) { cpl_ensure_code(nr > 0, CPL_ERROR_ILLEGAL_INPUT); cpl_ensure_code(nc > 0, CPL_ERROR_ILLEGAL_INPUT); /* Need to resize the m...
false
false
false
false
false
0
r600_dma_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib) { struct radeon_ring *ring = &rdev->ring[ib->ring]; if (rdev->wb.enabled) { u32 next_rptr = ring->wptr + 4; while ((next_rptr & 7) != 5) next_rptr++; next_rptr += 3; radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_WRITE, 0, 0, 1)); ...
false
false
false
false
false
0
gfs2_rgrp_out_bh(const struct gfs2_rgrp *rg, struct gfs2_buffer_head *bh) { gfs2_rgrp_out(rg, bh->iov.iov_base); bmodified(bh); }
false
false
false
false
false
0
my_l10tostr_mb2_or_mb4(CHARSET_INFO *cs, char *dst, size_t len, int radix, long int val) { char buffer[66]; register char *p, *db, *de; long int new_val; int sl= 0; unsigned long int uval = (unsigned long int) val; p= &buffer[sizeof(buffer) - 1]; *p= '\0'; if (radix < 0) ...
true
true
false
false
false
1
handle_finished_jobs(qstat_env_t *qstat_env, qstat_handler_t *handler, lList **alpp) { lListElem *jep, *jatep; int ret = 0; int count = 0; dstring dyn_task_str = DSTRING_INIT; DENTER(TOP_LAYER, "handle_finished_jobs"); for_each (jep, qstat_env->job_list) { for_each (jatep, lGetList(jep, JB_ja_...
false
false
false
false
false
0
giggle_dispatcher_cancel (GiggleDispatcher *dispatcher, guint id) { g_return_if_fail (GIGGLE_IS_DISPATCHER (dispatcher)); g_return_if_fail (id > 0); if (dispatcher_is_current_job (dispatcher, id)) { dispatcher_stop_current_job (dispatcher); dispatcher_start_next_job (dispatcher); } else { dispatcher_unqueue_...
false
false
false
false
false
0
get_var_int(uint8_t* nRead) { uint32_t nBytes; uint64_t varInt = BtcUtils::readVarInt( bdStr_.getPtr() + pos_, &nBytes); if(nRead != NULL) *nRead = nBytes; pos_ += nBytes; return varInt; }
false
false
false
false
false
0
fjes_hw_exit(struct fjes_hw *hw) { int ret; if (hw->base) { ret = fjes_hw_reset(hw); if (ret) pr_err("%s: reset error", __func__); fjes_hw_iounmap(hw); hw->base = NULL; } fjes_hw_cleanup(hw); cancel_work_sync(&hw->update_zone_task); cancel_work_sync(&hw->epstop_task); }
false
false
false
false
false
0
TransformFilter (unsigned int wf_idx) { if (wf_idx >= filterNK) DIRAC_THROW_EXCEPTION( ERR_UNSUPPORTED_STREAM_DATA, "Wavelet filter idx out of range [0-7]", SEVERITY_PICTURE_ERROR); if (wf_idx==FIDELITY) { std::ostringstream errstr; errstr << "Wav...
false
false
false
false
false
0
local_url_index_lookup_url (UnityWebappsUrlIndex *url_index, const gchar *url) { UnityWebappsLocalUrlIndex *self; GList *available_applications, *results, *w; self = UNITY_WEBAPPS_LOCAL_URL_INDEX (url_index); results = NULL; available_applications = g_hash_table_get_values (self->priv->availabl...
false
false
false
false
false
0
getInstance(NetworkType type,const UINT8* hostnameOrIP,UINT16 port) { if( (type!=RAW_TCP&&type!=SSL_TCP)) return NULL; CAListenerInterface* pListener=new CAListenerInterface(); pListener->m_Type=type; pListener->m_pAddr=new CASocketAddrINet(); if(((CASocketAddrINet*)pListener->m_pAddr)->setAddr(hostnameOr...
false
false
false
false
false
0
rfcomm_connect_cb(GIOChannel *chan, GError *err, gpointer user_data) { struct input_conn *iconn = user_data; struct input_device *idev = iconn->idev; struct fake_input *fake = iconn->fake; DBusMessage *reply; if (err) { reply = btd_error_failed(iconn->pending_connect, err->message); goto failed; } fake->rf...
false
false
false
false
false
0
default_accept_client (GstRTSPServer * server, GstRTSPClient * client, GIOChannel * channel) { /* accept connections for that client, this function returns after accepting * the connection and will run the remainder of the communication with the * client asyncronously. */ if (!gst_rtsp_client_accept (clie...
false
false
false
false
false
0
bcread_kgc(LexState *ls, GCproto *pt, MSize sizekgc) { MSize i; GCRef *kr = mref(pt->k, GCRef) - (ptrdiff_t)sizekgc; for (i = 0; i < sizekgc; i++, kr++) { MSize tp = bcread_uleb128(ls); if (tp >= BCDUMP_KGC_STR) { MSize len = tp - BCDUMP_KGC_STR; const char *p = (const char *)bcread_mem(ls, le...
false
false
false
false
false
0
ga_entry_group_add_record_full(GaEntryGroup * group, AvahiIfIndex interface, AvahiProtocol protocol, AvahiPublishFlags flags, const gchar * name, guint16 clazz, ...
false
false
false
false
false
0
add_strides(__isl_take isl_basic_set *bset, __isl_keep isl_morph *morph) { int i, div, k; isl_int gcd; if (isl_int_is_one(morph->inv->row[0][0])) return bset; isl_int_init(gcd); for (i = 0; 1 + i < morph->inv->n_row; ++i) { isl_seq_gcd(morph->inv->row[1 + i], morph->inv->n_col, &gcd); if (isl_int_is_divi...
false
false
false
false
false
0
mock_backend_new_for_save (void) { QofBackend *be = NULL; be = g_new0 (QofBackend, 1); g_assert (be); be->session_begin = mock_session_begin_for_save; be->sync = mock_sync; session_save_struct.be = be; session_save_struct.backend_new_called = TRUE; return be; }
false
false
false
false
false
0
rwm_op_search( Operation *op, SlapReply *rs ) { slap_overinst *on = (slap_overinst *) op->o_bd->bd_info; struct ldaprwmap *rwmap = (struct ldaprwmap *)on->on_bi.bi_private; int rc; dncookie dc; struct berval fstr = BER_BVNULL; Filter *f = NULL; AttributeName *an = NULL; char *text = NULL; rw...
false
false
false
false
false
0
isIn(const Vec3& P) const { bool res; int icount=1; // get intersection with 0-1edge double dy0=P.Y()-m_p0.Y(); double dy1=P.Y()-m_p1.Y(); double dy2=P.Y()-m_p2.Y(); // std::cout << "dy0,dy1,dy2 : " << dy0 << " , " << dy1 << " , " << dy2 << std::endl; if(dy0*dy1<0){ // get x-coord. of intersection...
false
false
false
false
false
0
trace_irq_vector_unregfunc(void) { mutex_lock(&irq_vector_mutex); trace_irq_vector_refcount--; if (!trace_irq_vector_refcount) { set_trace_idt_ctr(0); smp_call_function(switch_idt, NULL, 0); switch_idt(NULL); } mutex_unlock(&irq_vector_mutex); }
false
false
false
false
false
0
ThreadedRequestData( vtkInformation * vtkNotUsed( request ), vtkInformationVector** inputVector, vtkInformationVector * vtkNotUsed( outputVector ), vtkImageData ***inData, vtkImageData **outData, int outExt[6], int id) { void *outPtr = outData[0]->GetScalarPointerForExtent(outExt); // this filter e...
false
false
false
false
false
0
fop_writev_stub (call_frame_t *frame, fop_writev_t fn, fd_t *fd, struct iovec *vector, int32_t count, off_t off, uint32_t flags, struct iobref *iobref, dict_t *xdata) { call_stub_t *stub = NULL; GF_VALIDATE_OR_GOTO ("call-stub", frame, out); GF_VALIDATE_OR_GOTO ("call-stub",...
false
false
false
false
false
0
csitemlst_do_inpsel_set(register struct csitem_t *csip) { register struct exprlst_t *xplp; for (; csip != NULL; csip = csip->csinxt) { for (xplp = csip->csixlst; xplp != NULL; xplp = xplp->xpnxt) inpsel_xpr_markparam(xplp->xp); lstofsts_do_inpsel_set(csip->csist); } }
false
false
false
false
false
0
Channel_onallchannels() { chanrec *c; /* If not on channel and we haven't been asked to leave */ for(c=Channel->channels; c!=NULL; c=c->next) if(!(c->flags & CHAN_ONCHAN) && !(c->flags & CHAN_LEAVE)) return 0; return 1; }
false
false
false
false
false
0