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
efx_begin_loopback(struct efx_tx_queue *tx_queue) { struct efx_nic *efx = tx_queue->efx; struct efx_loopback_state *state = efx->loopback_selftest; struct efx_loopback_payload *payload; struct sk_buff *skb; int i; netdev_tx_t rc; /* Transmit N copies of buffer */ for (i = 0; i < state->packet_count; i++) { /...
false
false
false
false
false
0
Vect_read_area_geos(struct Map_info * Map, int area) { int i, nholes, isle; GEOSGeometry *boundary, **holes; G_debug(3, "Vect_read_area_geos(): area = %d", area); boundary = GEOSGeom_createLinearRing(Vect_get_area_points_geos(Map, area)); if (!boundary) { G_fatal_error(_("Vect_read_area_geos(...
false
false
false
false
false
0
hanja_key_list_has_modifier(HanjaKeyList* list, guint keyval) { if (list->all_modifiers & IBUS_CONTROL_MASK) { if (keyval == IBUS_Control_L || keyval == IBUS_Control_R) return TRUE; } if (list->all_modifiers & IBUS_MOD1_MASK) { if (keyval == IBUS_Alt_L || keyval == IBUS_Alt_R) return TRUE; ...
false
false
false
false
false
0
NsTclDriverObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj **objv) { Tcl_DString ds; Driver *drvPtr; char *fullname; static CONST char *opts[] = { "list", "query", NULL }; enum { DListIdx, DQueryIdx } opt; if (objc < 2) { Tcl_WrongNumArgs(interp, 1...
false
false
false
false
false
0
addInitialAliasAnalysisPasses( legacy::PassManagerBase &PM) const { // Add TypeBasedAliasAnalysis before BasicAliasAnalysis so that // BasicAliasAnalysis wins if they disagree. This is intended to help // support "obvious" type-punning idioms. if (UseCFLAA) PM.add(createCFLAAWrapperPass()); PM.add(cre...
false
false
false
false
false
0
parse_content_transfer_encoding(Mime *mime, Mime_part *part, char *token, Mime_parameter *param_list) { if (strcaseeq(token, "7bit")) part->encoding = MIME_ENCODING_7BIT; else if (strcaseeq(token, "8bit")) part->encoding = MIME_ENCODING_8BIT; else if (strcaseeq(token, "binary")) part->encoding = MIME_...
false
false
false
false
false
0
set_rs_status(struct lib_context *lc, struct raid_set *rs) { unsigned int i = 0, operational = 0, subsets_raid1001 = 0, inconsist = 0, nosync = 0; struct raid_set *r; struct raid_dev *rd; /* Set status of subsets. */ list_for_each_entry(r, &rs->sets, list) { /* Check subsets to set status of superset. */...
false
false
false
false
false
0
ext4_begin_ordered_truncate(struct inode *inode, loff_t new_size) { trace_ext4_begin_ordered_truncate(inode, new_size); /* * If jinode is zero, then we never opened the file for * writing, so there's no need to call * jbd2_journal_begin_ordered_truncate() since there's no * outstanding writes we ne...
false
false
false
false
false
0
window_fs_toolbar_move (GdkEventConfigure *event) { int h = fs_toolbar_at_top ? 1 : (event ? event->height : app->allocation.height) - cw_height - 1; int x, y; gtk_window_get_position (GTK_WINDOW(app), &x, &y); gtk_window_move (GTK_WINDOW(fs_toolbar), event ? event->x : x, (event ? event->y : y) + h)...
false
false
false
false
false
0
sci_remote_node_table_allocate_single_remote_node( struct sci_remote_node_table *remote_node_table, u32 group_table_index) { u8 index; u8 group_value; u32 group_index; u16 remote_node_index = SCIC_SDS_REMOTE_NODE_CONTEXT_INVALID_INDEX; group_index = sci_remote_node_table_get_group_index( remote_node_table, gr...
false
false
false
false
false
0
mca_pml_cm_add_procs(struct ompi_proc_t** procs, size_t nprocs) { int ret; #if OPAL_ENABLE_HETEROGENEOUS_SUPPORT for (size_t i = 0 ; i < nprocs ; ++i) { if (procs[i]->proc_arch != ompi_proc_local()->proc_arch) { return OMPI_ERR_NOT_SUPPORTED; } } #endif /* make sure remote ...
false
false
false
false
false
0
miniscope_formula(Formula f, unsigned mega_fid_call_limit) { int return_code; if (mega_fid_call_limit <= 0) Fid_call_limit = 0; /* no limit */ else { Fid_call_limit = mega_fid_call_limit * 1000000; Fid_calls = 0; } return_code = setjmp(Jump_env); if (return_code != 0) { /* We just landed f...
false
false
false
false
false
0
ooManualProgress(const char *callToken) { OOStackCommand cmd; OOH323CallData *call; if(!callToken) { return OO_STKCMD_INVALIDPARAM; } if(!(call = ooFindCallByToken(callToken))) { return OO_STKCMD_INVALIDPARAM; } if(call->CmdChan == 0) { if(ooCreateCallCmdConnection(call) ...
false
true
false
false
false
1
has_rate (CodecAssociation *ca, gpointer user_data) { guint clock_rate = GPOINTER_TO_UINT (user_data); if (ca->codec->clock_rate == clock_rate && !ca->recv_only && g_ascii_strcasecmp (ca->codec->encoding_name, "telephone-event")) return TRUE; else return FALSE; }
false
false
false
false
false
0
moddn_rename_children( back_txn *ptxn, Slapi_PBlock *pb, backend *be, IDList *children, Slapi_DN *dn_parentdn, Slapi_DN *dn_newsuperiordn, struct backentry *child_entries[]) { /* Iterate over the children list renaming every child */ struct ldbminfo *li = (struct ldbminfo *) be...
true
true
false
false
false
1
getVertexAnimationIncludesNormals() const { if (mAnimationType == VAT_NONE) return false; if (mAnimationType == VAT_MORPH) { bool normals = false; for (KeyFrameList::const_iterator i = mKeyFrames.begin(); i != mKeyFrames.end(); ++i) { ...
false
false
false
false
false
0
contoursplot_dashed_negative_contours (GabeditContoursPlot *contoursplot, gboolean dashed) { g_return_if_fail (contoursplot != NULL); g_return_if_fail (GABEDIT_IS_ContoursPLOT (contoursplot)); if(contoursplot->dashed_negative_contours == dashed) return; contoursplot->dashed_negative_contours = dashed; re...
false
false
false
false
false
0
parse_ports(const char *arg, struct nf_nat_range *range) { char *end = ""; unsigned int port, maxport; range->flags |= NF_NAT_RANGE_PROTO_SPECIFIED; if (!xtables_strtoui(arg, &end, &port, 0, UINT16_MAX) && (port = xtables_service_to_port(arg, NULL)) == (unsigned)-1) xtables_param_act(XTF_BAD_VALUE, "REDIRE...
false
false
false
false
false
0
on_editor_command_paste_activate (GtkAction *action, gpointer user_data) { GtkWidget *widget; widget = get_current_focus_widget (user_data); if (widget && GTK_IS_EDITABLE (widget)) { gtk_editable_paste_clipboard (GTK_EDITABLE (widget)); } else { if (widget /* editor text is focused */ || get_current_pop...
false
false
false
false
false
0
load_extension(char *lib) { struct extension_table *ext, *curext; char buf[BUFSIZE]; size_t size; char *env; int env_len; if ((env = getenv("CRASH_EXTENSIONS"))) env_len = strlen(env)+1; else env_len = 0; size = sizeof(struct extension_table) + strlen(lib) + MAX(env_len, strlen("/usr/lib64/crash/exten...
true
true
false
false
true
1
base_bcol_basesmuma_exchange_offsets( mca_bcol_basesmuma_module_t *sm_bcol_module, void **result_array, uint64_t mem_offset, int loop_limit, int leading_dim) { int ret=OMPI_SUCCESS,i; int count; int index_in_group; char *send_buff; char *recv_buff; uint64_t rem_mem_offset; /* ...
false
false
false
false
false
0
startGroup() { if (m_collecting) { assert(m_layerOpened); assert(!m_objectsStack.empty()); m_objectsStack.push(KEYObjectList_t()); ++m_groupLevel; } }
false
false
false
false
false
0
drawItems(void) { int i,n; n=itemVector().length(); for(i=0;i<n;i++) { itemVector()(i)->redraw(); } }
false
false
false
false
false
0
buffer_filled(char *data, int len, struct urb *urb, struct cx231xx_dmaqueue *dma_q) { void *vbuf; struct cx231xx_buffer *buf; if (list_empty(&dma_q->active)) return; buf = list_entry(dma_q->active.next, struct cx231xx_buffer, vb.queue); /* Fill buffer */ vbuf = videobuf_to_vmalloc(&buf->vb); memcpy(vbu...
false
true
false
false
false
1
cmatrix(long nrl, long nrh, long ncl, long nch) { long i, nrow, ncol; char **m; nrow = nrh - nrl + 1; ncol = nch - ncl + 1; m = (char **)malloc((size_t)((nrow+1)*sizeof(char*))); if(!m) nrerror("allocation failure 1 in cmatrix"); m += 1; m -= nrl; m[nrl]=(char *)malloc((size_t)((nrow*ncol+1)*sizeo...
false
false
false
false
false
0
set_subquery_pathlist(PlannerInfo *root, RelOptInfo *rel, Index rti, RangeTblEntry *rte) { Query *parse = root->parse; Query *subquery = rte->subquery; bool *differentTypes; double tuple_fraction; PlannerInfo *subroot; List *pathkeys; /* * Must copy the Query so that planning doesn't mess ...
false
false
false
false
false
0
vmware_validate_DESTINATION( VMWareDeviceData *vdev, CardState *state ) { /* Remember destination parameters for usage in rendering functions. */ vdev->dst_addr = state->dst.addr; vdev->dst_pitch = state->dst.pitch; vdev->dst_format = state->dst.buffer->format;...
false
false
false
false
false
0
Event_orderbynick(evntrec *event) { attnrec *a, *a_save = NULL; int counter = 0, done = 0; char h[NICKLEN], highest[NICKLEN]; /* Put the highest ascii character in 'highest'. */ sprintf(highest,"%c",HIGHESTASCII); /* We need to clear all ordering before we start */ Event_clearorder(event); /* Continue until ...
true
true
false
false
false
1
emit(raw_ostream &o) const { uint32_t i1 = 0; uint32_t i2 = 0; std::string s1; std::string s2; raw_string_ostream o1(s1); raw_string_ostream o2(s2); emitInstructionInfo(o, i2); o << "\n"; emitContextTable(o, i2); o << "\n"; emitEmptyTable(o1, i1); emitContextDecisions(o1, o2, i1, i2...
false
false
false
false
false
0
operator<<(std::ostream &os, const CategoryList &cl) { string buf; cl.CategoryList2Str(buf); os << buf; return os; }
false
false
false
false
false
0
gt_array_rem(GtArray *a, unsigned long idx) { unsigned long i; gt_assert(a && idx < a->next_free); /* move elements */ for (i = idx + 1; i < a->next_free; i++) { memcpy((char*) a->space + (i-1) * a->size_of_elem, (char*) a->space + i * a->size_of_elem, a->size_of_elem); } /* remove...
false
false
false
false
false
0
FVAutoHint(FontViewBase *fv) { int i, cnt=0, gid; BlueData *bd = NULL, _bd; SplineChar *sc; if ( fv->sf->mm==NULL ) { QuickBlues(fv->sf,fv->active_layer,&_bd); bd = &_bd; } /* Tick the ones we don't want to AH, untick the ones that need AH */ for ( gid = 0; gid<fv->sf->glyphcnt; ++gid ) ...
false
false
false
false
false
0
enc_unknown(Encoder* e, ERL_NIF_TERM value) { ErlNifBinary* bin = e->curr; ERL_NIF_TERM curr; if(e->i > 0) { if(!enc_result(e, &curr)) { return 0; } e->iolist = enif_make_list_cell(e->env, curr, e->iolist); e->iolen++; } e->iolist = enif_make_list_cell(...
false
false
false
false
false
0
slen(const sELEMENT *ary) { if (ary) { const sELEMENT *beg = ary; while (scmp(*ary, sterm)) ++ary; return ary - beg; } else return 0; }
false
false
false
false
false
0
ConversionOpenRequestProc(w, event, args, num_args) Widget w; XEvent *event; String *args; Cardinal *num_args; { KinputProtocolWidget kpw = (KinputProtocolWidget)w; XClientMessageEvent *ev = &event->xclient; int version; Window reqwin; Atom convatom; Atom initproperty; Atom initpropertytype;...
false
false
false
false
false
0
xc_core_mfn_to_page_index(ulong mfn) { int i, b; ulong tmp[MAX_BATCH_SIZE]; uint nr_pages; size_t size; if (xd->flags & XC_CORE_ELF) return xc_core_elf_mfn_to_page_index(mfn); if (lseek(xd->xfd, (off_t)xd->xc_core.header.xch_index_offset, SEEK_SET) == -1) { err...
false
true
false
false
true
1
collapse( LodData* data, LodCollapseCost* cost, LodOutputProvider* output, int vertexCountLimit, Real collapseCostLimit ) { size_t vertexCount = data->mCollapseCostHeap.size(); for (; static_cast<size_t>(vertexCountLimit) < vertexCount; vertexCount--) { LodData::CollapseCostHeap:...
false
false
false
false
false
0
srp_stop_rport_timers(struct srp_rport *rport) { mutex_lock(&rport->mutex); if (rport->state == SRP_RPORT_BLOCKED) __rport_fail_io_fast(rport); srp_rport_set_state(rport, SRP_RPORT_LOST); mutex_unlock(&rport->mutex); cancel_delayed_work_sync(&rport->reconnect_work); cancel_delayed_work_sync(&rport->fast_io_fai...
false
false
false
false
false
0
drm_legacy_lock_free(struct drm_lock_data *lock_data, unsigned int context) { unsigned int old, new, prev; volatile unsigned int *lock = &lock_data->hw_lock->lock; spin_lock_bh(&lock_data->spinlock); if (lock_data->kernel_waiters != 0) { drm_lock_transfer(lock_data, 0); lock_data->idle_has_lock = 1; spin_unl...
false
false
false
false
false
0
v4l2_radio_get_signal(RadioDev *radio_dev) { V4L2RadioDev *dev = (V4L2RadioDev*)radio_dev; struct v4l2_tuner tuner; if (dev->fd<0) return -1; memset(&tuner, 0, sizeof(tuner)); tuner.index = 0; if (ioctl(dev->fd, VIDIOC_G_TUNER, &tuner) < 0) { perror("VIDIOC_G_TUNER"); return -1; } return tuner.signal >...
false
false
false
false
false
0
SDsetchunkcache(int32 sdsid, /* IN: access aid to mess with */ int32 maxcache, /* IN: max number of chunks to cache */ int32 flags /* IN: flags = 0, HDF_CACHEALL */) { NC *handle = NULL; /* file handle */ NC_var *var = NULL; /* SDS variable */ ...
false
false
false
false
false
0
box_permute_dimensions(ap_manager_t* man, bool destructive, box_t* a, ap_dimperm_t* perm) { box_t* res; size_t size; size_t i; man->result.flag_best = true; man->result.flag_exact = true; if (a->p==NULL){ return destructive ? a : box_copy(man,a); } res = box_copy(ma...
false
false
false
false
false
0
avdtp_discover_cmd(struct avdtp *session, uint8_t transaction, void *buf, int size) { GSList *l; unsigned int rsp_size, sep_count, i; struct seid_info *seps; gboolean ret; sep_count = g_slist_length(session->server->seps); if (sep_count == 0) { uint8_t err = AVDTP_NOT_SUPPORTED_COMMAND; return avdtp_...
false
false
false
false
false
0
VerifyOccurrenceGroup(char *file,struct Promise *pp) { struct Attributes a = {0}; enum representations rep_type; struct stat sb; char *sp,url[CF_BUFSIZE]; struct Rval retval; a = GetOccurrenceAttributes(pp); if (a.rep_type) { rep_type = String2Representation(a.rep_type); } else { rep_type ...
true
true
false
false
false
1
disassemble_cb( libspectrum_word address, char *buffer, size_t buflen, size_t *length ) { char buffer2[40]; libspectrum_byte b = readbyte_internal( address ); source_reg( address, USE_HL, buffer2, 40 ); if( b < 0x40 ) { snprintf( buffer, buflen, "%s %s", rotate_op( b ), buffer2 ); *length = 1; } e...
false
false
false
false
false
0
xread (int sock, void *v_buf, size_t len) { int r; char *buf = v_buf; while (len > 0) { r = read (sock, buf, len); if (r == -1) { perror ("read"); return -1; } if (r == 0) { fprintf (stderr, "read: unexpected end of file on fd %d\n", sock); return -1; } buf += r; ...
false
true
false
false
true
1
gst_mxf_demux_reset_metadata (GstMXFDemux * demux) { GST_DEBUG_OBJECT (demux, "Resetting metadata"); g_static_rw_lock_writer_lock (&demux->metadata_lock); demux->update_metadata = TRUE; demux->metadata_resolved = FALSE; gst_mxf_demux_reset_linked_metadata (demux); demux->preface = NULL; if (demux->me...
false
false
false
false
false
0
Seek( vsi_l_offset nOffset, int nWhence ) { // seeks that do nothing are still surprisingly expensive with MSVCRT. // try and short circuit if possible. if( nWhence == SEEK_SET && nOffset == this->nOffset ) return 0; int nResult = VSI_FSEEK64( fp, nOffset, nWhence ); int nError = e...
false
false
false
false
false
0
check_guard_bytes(struct usbtest_dev *tdev, struct urb *urb) { u8 *buf = urb->transfer_buffer; u8 *guard = buf - buffer_offset(buf); unsigned i; for (i = 0; guard < buf; i++, guard++) { if (*guard != GUARD_BYTE) { ERROR(tdev, "guard byte[%d] %d (not %d)\n", i, *guard, GUARD_BYTE); return -EINVAL; } ...
false
false
false
false
false
0
OutputVariable(Variable var) { int i,done=0; printf("In file: %s\n",var->comment); printf("Variable: %s [",var->name); if(var->scope&LOCAL) done=printf("Local"); if(var->scope&GLOBAL) done=printf("%sGlobal definition",done?" and ":""); if(var->scope&EXTERNAL) done=printf("%sExternal",done?" and ":""); if(...
false
false
false
false
false
0
hwloc_xml__handle_distances(struct hwloc_topology *topology, struct hwloc_xml_backend_data_s *data) { struct hwloc_xml_imported_distances_s *xmldist, *next = data->first_distances; if (!next) return 0; /* connect things now because we need levels to check/build, they'll be reconnected properly later ...
false
false
false
false
false
0
IRC_JoinChannel(const char *channel_name) { if (IRC.connected) { irc_cmd_join(IRC.session, channel_name, IRC_KEY); } else { // we are not connected so the channel name will be remembered // by the configuration module // and we will join this channel on connection in the future } }
false
false
false
false
false
0
trace_listener_accept_input (trace_type_t *ttype, unsigned length, char *buf) { struct in_addr *addr; u_int16_t *remote_port; u_int16_t *local_port; omapi_connection_object_t *obj; isc_result_t status; struct sockaddr_in remote_addr; addr = (struct in_addr *)buf; remote_port = (u_int16_t *)(addr + 1); l...
false
false
false
false
false
0
goc_rectangle_update_bounds (GocItem *item) { cairo_surface_t *surface; cairo_t *cr; surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 1 , 1); cr = cairo_create (surface); cairo_save (cr); if (goc_rectangle_prepare_draw (item, cr, 0)) { cairo_restore (cr); if (go_styled_object_set_cairo_line (GO_ST...
false
false
false
false
false
0
tracker_indexing_tree_file_is_indexable (TrackerIndexingTree *tree, GFile *file, GFileType file_type) { TrackerFilterType filter; TrackerDirectoryFlags config_flags; GFile *config_file; g_return_val_if_fail (...
false
false
false
false
false
0
AddRoute(HttpRequest::RequestMethod method, QString path, QSharedPointer<WebService> service) { QPair<HttpRequest::RequestMethod, QString> pair; pair.first = method; pair.second = path; _routing_table.insert(pair, service); /* Only connect each WebService instance once */ if(...
false
false
false
false
false
0
btrfs_removexattr(struct dentry *dentry, const char *name) { struct btrfs_root *root = BTRFS_I(d_inode(dentry))->root; int ret; /* * The permission on security.* and system.* is not checked * in permission(). */ if (btrfs_root_readonly(root)) return -EROFS; /* * If this is a request for a synthetic att...
false
false
false
false
false
0
slotNationalitySelected(QListWidgetItem* item) { kDebug(); Nationality* nationality = m_onu->nationalityNamed(item->text()); if (nationality != 0) { initNationalityWidgetWith(nationality); } }
false
false
false
false
false
0
gst_video_filter_class_init (gpointer g_class, gpointer class_data) { GstBaseTransformClass *trans_class; GstVideoFilterClass *klass; klass = (GstVideoFilterClass *) g_class; trans_class = (GstBaseTransformClass *) klass; trans_class->get_unit_size = GST_DEBUG_FUNCPTR (gst_video_filter_get_unit_size);...
false
false
false
false
false
0
GetFileSize() const { if (FileExists()) { wxFile f(m_filesystem); if (f.IsOpened()) { return f.Length(); } } return wxInvalidOffset; }
false
false
false
false
false
0
popup_notify_goto_dialog(const char *headline, const char *lines, const struct text_tag_list *tags, struct tile *ptile) { Widget notify_dialog_shell, notify_form, notify_command, notify_goto_command; Widget notify_headline, notify_label; Dimension width,...
false
false
false
false
false
0
wait_for_available_abort_cmd(struct ctlr_info *h) { #define ABORT_CMD_WAIT_MSECS 5000 return !wait_event_timeout(h->abort_cmd_wait_queue, atomic_dec_if_positive(&h->abort_cmds_available) >= 0, msecs_to_jiffies(ABORT_CMD_WAIT_MSECS)); }
false
false
false
false
false
0
mix32toS (sample_t * samples, sample_t bias) { int i; sample_t common, surround; for (i = 0; i < 256; i++) { common = BIAS (samples[i]); surround = samples[i + 768] + samples[i + 1024]; samples[i] = samples[i + 256] + common - surround; samples[i + 256] = samples[i + 512] + common + surround; } }
false
false
false
false
false
0
flip_pixels ( PCX_INST *g, /* our instance variables */ BYTE *byte_buf_p) /* ptr to buffer to be flipped */ { ULONG *buf_p; ULONG *buf_aft_p; buf_p = (ULONG*)byte_buf_p; buf_aft_p = buf_p + ((g->uBytesPerRawRow+3) >> 2); for ( ; buf_p<buf_aft_p; buf_p++) *buf_p...
false
false
false
false
false
0
func_arp_packet(struct packet *p, void *arg) { struct host_up_info *hui = (struct host_up_info *) arg; struct arpeth_hdr *arpethh; unsigned int ip; arpethh = (struct arpeth_hdr *)(p->p_arph + 1); ip = *(unsigned int *) arpethh->ar_sip; if (p->p_arph->ar_op == htons(ARPOP_REPLY) && ntohl(ip) >= ntohl(hui...
false
false
false
false
false
0
GetResidue(int idx) const { if (idx < 0 || (unsigned)idx >= NumResidues()) { obErrorLog.ThrowError(__FUNCTION__, "Requested Residue Out of Range", obDebug); return((OBResidue*)NULL); } return (_residue[idx]); }
false
false
false
false
false
0
cs42l52_get_clk(int mclk, int rate) { int i, ret = -EINVAL; u_int mclk1, mclk2 = 0; for (i = 0; i < ARRAY_SIZE(clk_map_table); i++) { if (clk_map_table[i].rate == rate) { mclk1 = clk_map_table[i].mclk; if (abs(mclk - mclk1) < abs(mclk - mclk2)) { mclk2 = mclk1; ret = i; } } } return ret; }
false
false
false
false
false
0
used_inputs(befig_list* befig) { bepor_list* bepor; bereg_list *bereg; beaux_list *beaux; bebus_list *bebus; bebux_list *bebux; beout_list *beout; biabl_list *biabl; /*all inputs should be used*/ for (bepor=befig->BEPOR; bepor; bepor=bepor->NEXT) { /*only input*/ if (bepor-...
false
false
false
false
false
0
recurseDirectories(const sys::Path& path, std::set<sys::Path>& result, std::string* ErrMsg) { result.clear(); if (RecurseDirectories) { std::set<sys::Path> content; if (path.getDirectoryContents(content, ErrMsg)) return true; for (std::set<sys::Path>::iterator I = content.begin...
false
false
false
false
false
0
label_changed_cb (MxGtkFrame *frame) { char *font = NULL; GtkFrame *gtk_frame = GTK_FRAME (frame); GtkWidget *label_widget; label_widget = gtk_frame_get_label_widget (gtk_frame); if (!label_widget) return; /* ensure font is correct */ gtk_widget_style_get (GTK_WIDGET (frame), ...
false
false
false
false
false
0
wordshift(char *first, char *rest) { char *p, *q = rest; do { p = newsplit(&q); strcpy(first, p); strcpy(rest, q); } while (!egg_strcasecmp(first, "and") || !egg_strcasecmp(first, "or")); }
false
false
false
false
false
0
rmhash(com, n) CONST char *com; int n; { hashlist *hp, *prev; prev = NULL; for (hp = hashtable[n]; hp; hp = hp -> next) { if (!strpathcmp(com, hp -> command)) { if (!prev) hashtable[n] = hp -> next; else prev -> next = hp -> next; Xfree(hp -> command); Xfree(hp -> path); Xfree(hp); return; } ...
false
false
false
false
false
0
rc_ctx_init(regcomp_ctx *ctx, ScmRegexp *rx) { ctx->rx = rx; ctx->pattern = (SCM_FALSEP(rx->pattern)? rx->ast : rx->pattern); ctx->casefoldp = FALSE; ctx->lookbehindp = FALSE; if (SCM_STRINGP(rx->pattern)) { ctx->ipat = SCM_PORT(Scm_MakeInputStringPort(SCM_STRING(rx->pattern), ...
false
false
false
false
false
0
Read_Write(int argc, Object *argv, int readflg) { struct S_String *sp; int len, fd; fd = Get_Integer(argv[0]); Check_Type(argv[1], T_String); sp = STRING(argv[1]); if (argc == 3) { len = Get_Integer(argv[2]); if (len < 0 || (unsigned int)len > sp->size) Range_Error(a...
false
true
false
false
true
1
xml_text(GMarkupParseContext *context, const gchar *text, gsize text_len, gpointer user_data, GError **error) { WorldParser *parser = (WorldParser *)user_data; gchar *tmp; if (parser->forWorldSelector && parser->state ...
false
false
false
false
false
0
dump_vals(FILE *f, int count, struct VAL *names) { DWORD i,j,val32; WORD val16; for (i = 0; names[i].type != EoLST; i++) { switch (names[i].type) { case INT32: fread(&val32,4,1,f); val32 = SWAP4(val32); printf("\t%-12s = %d\n",names[i].name,val32); break; case CCODE: fread(&val...
false
false
false
false
false
0
lra_init_elimination (void) { basic_block bb; rtx insn; init_elim_table (); FOR_EACH_BB (bb) FOR_BB_INSNS (bb, insn) if (NONDEBUG_INSN_P (insn)) mark_not_eliminable (PATTERN (insn)); setup_elimination_map (); }
false
false
false
false
false
0
inClass(const TargetRegisterClass &Test, unsigned Reg, const TargetRegisterClass *RC) { if (TargetRegisterInfo::isPhysicalRegister(Reg)) return Test.contains(Reg); else return Test.hasSubClassEq(RC); }
false
false
false
false
false
0
command_dir(command_t *command, ttp_session_t *session) { u_char result; char read_str[2048]; u_int16_t num_files, i; size_t filelen; u_int16_t status = 0; /* make sure that we have an open session */ if (session == NULL || session->server == NULL) return warn("Not connected...
true
true
false
false
true
1
util__sparsesparse_vector_setX(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) { ScmObj sv_scm; SparseVector* sv; ScmObj index_scm; u_long index; ScmObj value_scm; ScmObj value; ScmObj SCM_SUBRARGS[3]; int SCM_i; SCM_ENTER_SUBR("sparse-vector-set!"); for (SCM_i=0; SCM_i<3; SCM_i++) { SCM_SUBRARGS[S...
false
false
false
false
false
0
operator>(const Software& sv) const { if (family != sv.family || name != sv.name || version.empty() || version == sv.version) { logger.msg(VERBOSE, "%s > %s => false", (std::string)*this, (std::string)sv); return false; } if (sv.version.empty()) { logger.msg(VERBOSE, "%s > %s => true", (s...
false
false
false
false
false
0
coda_replace_fid(struct inode *inode, struct CodaFid *oldfid, struct CodaFid *newfid) { struct coda_inode_info *cii = ITOC(inode); unsigned long hash = coda_f2i(newfid); BUG_ON(!coda_fideq(&cii->c_fid, oldfid)); /* replace fid and rehash inode */ /* XXX we probably need to hold some lock here! */ remo...
false
false
false
false
false
0
scan_do (Netinfo * netinfo) { const gchar *host = NULL; GtkTreeModel *model; gint ip_version; gchar *program = NULL; gchar *command = NULL; GtkWidget *parent; g_return_if_fail (netinfo != NULL); /* Because of the delay, we can't check twice for a hostname/IP. * It was made before this function was called. ...
false
false
false
false
false
0
SelectT2AddrModeImm8(SDValue N, SDValue &Base, SDValue &OffImm) { // Match simple R - imm8 operands. if (N.getOpcode() != ISD::ADD && N.getOpcode() != ISD::SUB && !CurDAG->isBaseWithConstantOffset(N)) return false; if (ConstantSDNode *RHS = dyn_cast<ConstantSD...
false
false
false
false
false
0
__smsc75xx_phy_wait_not_busy(struct usbnet *dev, int in_pm) { unsigned long start_time = jiffies; u32 val; int ret; do { ret = __smsc75xx_read_reg(dev, MII_ACCESS, &val, in_pm); if (ret < 0) { netdev_warn(dev->net, "Error reading MII_ACCESS\n"); return ret; } if (!(val & MII_ACCESS_BUSY))...
false
false
false
false
false
0
_gth_browser_update_bookmark_list (GthBrowser *browser) { GtkWidget *menu; GtkWidget *bookmark_list; GtkWidget *bookmark_list_separator; GBookmarkFile *bookmarks; char **uris; gsize length; int i; bookmark_list = gtk_ui_manager_get_widget (gth_browser_get_ui_manag...
false
false
false
false
false
0
HandleJoinChannelOpcode(WorldPacket& recvPacket) { DEBUG_LOG("WORLD: Received opcode %s (%u, 0x%X)", recvPacket.GetOpcodeName(), recvPacket.GetOpcode(), recvPacket.GetOpcode()); std::string channelName, pass; recvPacket >> channelName; if (channelName.empty()) { return; } recvPacket >> p...
false
false
false
false
false
0
undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, unsigned migratetype) { unsigned long pfn; struct page *page; BUG_ON((start_pfn) & (pageblock_nr_pages - 1)); BUG_ON((end_pfn) & (pageblock_nr_pages - 1)); for (pfn = start_pfn; pfn < end_pfn; pfn += pageblock_nr_pages) { ...
false
false
false
false
false
0
nm_system_replace_default_ip6_route_vpn (int ifindex, const struct in6_addr *ext_gw, const struct in6_addr *int_gw, guint32 mss, int parent_ifindex, ...
false
false
false
false
false
0
convert_libgnomekbd_layouts (GSettings *settings) { GVariantBuilder builder; GSettings *libgnomekbd_settings; gchar **layouts, **l; if (!schema_is_installed ("org.gnome.libgnomekbd.keyboard")) return; init_builder_with_sources (&builder, settings); libg...
false
false
false
false
false
0
scale_bbs_frequencies (basic_block *bbs, int nbbs, int num, int den) { int i; edge e; for (i = 0; i < nbbs; i++) { bbs[i]->frequency = (bbs[i]->frequency * num) / den; bbs[i]->count = (bbs[i]->count * num) / den; for (e = bbs[i]->succ; e; e = e->succ_next) e->count = (e->count * num) /den;...
false
false
false
false
false
0
add_cgpu(struct cgpu_info *cgpu) { static struct _cgpu_devid_counter *devids = NULL; struct _cgpu_devid_counter *d; HASH_FIND_STR(devids, cgpu->drv->name, d); if (d) cgpu->device_id = ++d->lastid; else { d = cgmalloc(sizeof(*d)); cg_memcpy(d->name, cgpu->drv->name, sizeof(d->name)); cgpu->device_id = d->l...
false
true
false
false
true
1
__xfs_inobt_rec_merge( struct xfs_inobt_rec_incore *trec, /* target */ struct xfs_inobt_rec_incore *srec) /* src */ { ASSERT(trec->ir_startino == srec->ir_startino); /* combine the counts */ trec->ir_count += srec->ir_count; trec->ir_freecount += srec->ir_freecount; /* * Merge the holemask and free mask. For...
false
false
false
false
false
0
quote_msglocale(struct Client *source_p, char *locale) { if (locale != NULL) { set_locale(locale); rebuild_isupport_message_line(); sendto_one(source_p, ":%s NOTICE %s :Set MSGLOCALE to '%s'", me.name, source_p->name, get_locale()); } else sendto_one(source_p, ":%s NOTICE %s :MSGLOCALE i...
false
false
false
false
false
0
resetProgram(bool possible_nSRST) { bool result; if (possible_nSRST && apply_nSRST) { setJtagParameter(JTAG_P_EXTERNAL_RESET, 0x01); } result = doSimpleJtagCommand('x', 1); if (possible_nSRST && apply_nSRST) { setJtagParameter(JTAG_P_EXTERNAL_RESET, 0x00); } return result; }
false
false
false
false
false
0
lit_string_to_int(char *s) { int i; if (str_to_int(s, &i)) return i; else if (strlen(s) > 1) return INT_MIN; else return ctoi(s[0]); }
false
false
false
false
false
0
NPP_Print(NPP instance, NPPrint* printInfo) { xprintf("NPP_Print:\n"); if(printInfo == NULL) return; /* if (instance != NULL) { plugin_instance_t* this = (plugin_instance_t*) instance->pdata; if (printInfo->mode == NP_FULL) { void* platformPrint = printInfo->print.fullPrint.platformPri...
false
false
false
false
false
0
prev_real_insn (insn) rtx insn; { while (insn) { insn = PREV_INSN (insn); if (insn == 0 || GET_CODE (insn) == INSN || GET_CODE (insn) == CALL_INSN || GET_CODE (insn) == JUMP_INSN) break; } return insn; }
false
false
false
false
false
0
test_commit_write__root(void) { git_oid tree_id, commit_id; const git_oid *branch_oid; git_signature *author, *committer; const char *branch_name = "refs/heads/root-commit-branch"; git_tree *tree; git_oid_fromstr(&tree_id, tree_oid); cl_git_pass(git_tree_lookup(&tree, g_repo, &tree_id)); /* create signatures ...
false
false
false
false
false
0
expand_intrinsic_bsr (tree callee, tree arg) { // Intrinsic bsr gets turned into (size - 1) - count_leading_zeros(arg). // %% TODO: The return value is supposed to be undefined if arg is zero. tree type = TREE_TYPE (arg); tree tsize = build_integer_cst (TREE_INT_CST_LOW (TYPE_SIZE (type)) - 1, type); tree exp...
false
false
false
false
false
0