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
immerse_clamp_detail_offset(ImmerseControls *controls, gdouble xpos, gdouble ypos) { xpos = CLAMP(xpos, 0.0, controls->xmax); ypos = CLAMP(ypos, 0.0, controls->ymax); if (xpos != controls->args->xpos || ypos != controls->args->ypos) { gchar *s; controls->args->xp...
false
false
false
false
false
0
create_particular(void) { char buf[BUFSZ], *bufp, monclass = MAXMCLASSES; int which, tries, i; struct permonst *whichpm; struct monst *mtmp; bool madeany = false; bool maketame, makepeaceful, makehostile; tries = 0; do { which = urole.malenum; /* an arbitrary index into mons[] *...
false
false
false
false
false
0
matrix_reorg (void) { struct cgraph_node *node; if (profile_info) check_transpose_p = true; else check_transpose_p = false; /* If there are hand written vectors, we skip this optimization. */ for (node = cgraph_nodes; node; node = node->next) if (!may_flatten_matrices (node)) return 0; m...
false
false
false
false
false
0
channel_direct_tcpip(LIBSSH2_SESSION * session, const char *host, int port, const char *shost, int sport) { LIBSSH2_CHANNEL *channel; unsigned char *s; if (session->direct_state == libssh2_NB_state_idle) { session->direct_host_len = strlen(host); session->direct_shost_l...
false
false
false
false
false
0
SparseMatrix_export_binary(char *name, SparseMatrix A, int *flag){ FILE *f; *flag = 0; f = fopen(name, "wb"); if (!f) { *flag = 1; return; } fwrite(&(A->m), sizeof(int), 1, f); fwrite(&(A->n), sizeof(int), 1, f); fwrite(&(A->nz), sizeof(int), 1, f); fwrite(&(A->nzmax), sizeof(int), 1, f); f...
false
false
false
false
true
1
sci_controller_start(struct isci_host *ihost, u32 timeout) { enum sci_status result; u16 index; if (ihost->sm.current_state_id != SCIC_INITIALIZED) { dev_warn(&ihost->pdev->dev, "%s invalid state: %d\n", __func__, ihost->sm.current_state_id); return SCI_FAILURE_INVALID_STATE; } /* Build the TCi...
false
false
false
false
false
0
print_node(heap_node *node){ printf("\n[%d, %d] (lcp = %d) [%d] mem: ", node->key, node->ESA[node->u_idx].sa, node->ESA[node->u_idx].lcp, node->ESA[node->u_idx].bwt); int8 *pt = node->c_buffer; size_t i = 0; for( ; i < 2*C_BUFFER_SIZE+2; i++){ if(i < C_BUFFER_SIZE){ printf("|%d| ", *(pt++)); } i...
false
false
false
false
false
0
lm78_update_device(struct device *dev) { struct lm78_data *data = dev_get_drvdata(dev); int i; mutex_lock(&data->update_lock); if (time_after(jiffies, data->last_updated + HZ + HZ / 2) || !data->valid) { dev_dbg(dev, "Starting lm78 update\n"); for (i = 0; i <= 6; i++) { data->in[i] = lm78_rea...
false
false
false
false
false
0
AllocateExternalArray(int length, ExternalArrayType array_type, void* external_pointer, PretenureFlag pretenure) { AllocationSpace space = (pretenure == TENURED) ? OLD_DATA_SPACE : NEW_SPACE; Object* result =...
false
false
false
false
false
0
draw_decal_label(MeminfoMeter *mm, gint draw_to_screen) { GkrellmDecal *d; GkrellmTextstyle ts_save; gchar buf[128]; gint x_off, w; d = mm->decal_label; if (! mm->label_is_data) { gkrellm_decal_text_set_offset(d, mm->x_label, 0); gkrellm_draw_decal_text(mm->panel, d, mm->label, 0); } else ...
false
false
false
false
false
0
start_if_ready (GoaTpAccountLinker *self) { GoaTpAccountLinkerPrivate *priv = self->priv; GList *goa_accounts = NULL; GList *tp_accounts = NULL; GList *l = NULL; GHashTableIter iter; gpointer key, value; if (priv->goa_client == NULL || priv->account_manager == NULL || !tp_proxy_is_prepared (p...
false
false
false
false
false
0
rowCount(const QModelIndex& parent) const { if ((Section)parent.column() == Name || !parent.isValid()) { if (flat_) { return (parent.isValid() ? 0 : tree_->getChildOptionNames("",false,false).count()); } else { QString option; if (parent.isValid()) option = indexToOptionName(parent); return tree_->...
false
false
false
false
false
0
PrepareForWrite() { // We're ready if we're the only owner. if(p->second == 1) return; // Then make a clone. p_t *newtree = new p_t(p->first, 1); // Forget the old Dealloc(); // Keep the new p = newtree; }
false
false
false
false
false
0
getByKey2(const char *key, const char *subKey, UErrorCode& status) { if(U_FAILURE(status)) { return NULL; } if(fBundle) { #if defined (U_DEBUG_CALDATA) fprintf(stderr, "%p: //\n"); #endif fFillin = ures_getByKeyWithFallback(fBundle, key, fFillin, &status); fOtherFillin = ure...
false
false
false
false
false
0
VisitSubtreeWrapper(Object** p, uint16_t class_id) { if (in_groups_.Contains(*p)) return; Isolate* isolate = Isolate::Current(); v8::RetainedObjectInfo* info = isolate->heap_profiler()->ExecuteWrapperClassCallback(class_id, p); if (info == NULL) return; GetListMaybeDisposeInfo(info)->Add(HeapObject::cas...
false
false
false
false
false
0
pi_next(opj_pi_iterator_t * pi) { switch (pi->poc.prg) { case LRCP: return pi_next_lrcp(pi); case RLCP: return pi_next_rlcp(pi); case RPCL: return pi_next_rpcl(pi); case PCRL: return pi_next_pcrl(pi); case CPRL: return pi_next_cprl(pi); case PROG_UNKNOWN: return OPJ_FALSE; } return OP...
false
false
false
false
false
0
dump_timestamp(int64_t ts) { if(ts > 0) bgav_dprintf("%"PRId64" (%f)", ts, (float)ts / 90000.0); else bgav_dprintf("Unknown"); }
false
false
false
false
false
0
_ipmi_oem_quanta_get_extended_config_string (ipmi_oem_state_data_t *state_data, uint8_t configuration_id, uint8_t attribute_id, uint8_t index, ...
false
false
false
false
false
0
OnListBox(wxCommandEvent& event) { if(event.GetEventObject() == NULL) return; if(event.GetEventObject() == levellist) { if(event.GetClientData() != NULL) { CountedPtr<Level> newlevel = (Level*) event.GetClientData(); if(event.GetEventType() == wxEVT_COMMAND_LISTBOX_DOUBLE...
false
false
false
false
false
0
sample(int t0, int b0, int l0, int r0, char *name, char *name1, char *name2, double *msc) { int btn, d, fmask; double tmp; /* IN name = name of raster map to be set up name1 = name of overlay vector map name2 = name of overlay site map msc[0]= cols of region/width of...
false
false
false
false
false
0
numaAddBorder(NUMA *nas, l_int32 left, l_int32 right, l_float32 val) { l_int32 i, n, len; l_float32 startx, delx; l_float32 *fas, *fad; NUMA *nad; PROCNAME("numaAddBorder"); if (!nas) return (NUMA *)ERROR_PTR("nas not defined", procNam...
false
false
false
false
false
0
pop_datafd() { if ( include_depth <= 1 ) { include_depth = 0; data_fd = NULL;} else fclose(data_fd); if ( include_depth > 0 ) { data_fd = datafile_stack[--include_depth-1].fd; line_no = datafile_stack[include_depth-1].line; } else data_fd = NULL; }
false
false
false
false
false
0
psk_server_callback(SSL *ssl, const char *identity, unsigned char *psk, int max_psk_len) { unsigned int psk_len; fr_tls_server_conf_t *conf; conf = (fr_tls_server_conf_t *)SSL_get_ex_data(ssl, FR_TLS_EX_INDEX_CONF); if (!conf) return 0; /* * FIXME: Look up the PSK password based on the identi...
false
false
false
false
false
0
qla4xxx_wait_login_resp_boot_tgt(struct scsi_qla_host *ha) { struct ddb_entry *ddb_entry; struct dev_db_entry *fw_ddb_entry = NULL; dma_addr_t fw_ddb_entry_dma; unsigned long wtime; uint32_t ddb_state; int max_ddbs, idx, ret; max_ddbs = is_qla40XX(ha) ? MAX_DEV_DB_ENTRIES_40XX : MAX_DEV_DB_ENTRIES; ...
false
false
false
false
false
0
run() { m_serverSocket = new QTcpServer; connect(this, SIGNAL(messageReceived(int,Jolie::Message)), m_server, SLOT(messageReceived(int,Jolie::Message))); connect(m_serverSocket, SIGNAL(newConnection()), this, SLOT(onIncomingConnection()), Qt::QueuedConnection); m_serverSocket->...
false
false
false
false
false
0
_dhcp_down(interface_defn *ifd, execfn *exec) { if ( execable("/sbin/dhclient") ) { if (!execute("dhclient -6 -r -pf /run/dhclient6.%iface%.pid -lf /var/lib/dhcp/dhclient6.%iface%.leases %iface%", ifd, exec)) return 0; } if ( iface_is_link() ) { if (!execute("ip link set dev %iface% down", ifd, exec)) return 0; } r...
false
false
false
false
false
0
get(const std::string& key) const { static std::string emptyString=""; if (count(key)==1) return attributes_.find(key)->second; else return emptyString; // Throw an exception? }
false
false
false
false
false
0
get_drag_data (NemoTreeViewDragDest *dest, GdkDragContext *context, guint32 time) { GdkAtom target; target = gtk_drag_dest_find_target (GTK_WIDGET (dest->details->tree_view), context, NULL); if (target == GDK_NONE) { return FALSE; } if (target == gdk_atom_intern (NEMO_ICO...
false
false
false
false
false
0
indicesToPointers(const int* map) { #define IDX2PTR(_p_,_b_) map?(&(_b_)[map[(((char*)_p_)-(char*)0)]]): \ (&(_b_)[(((char*)_p_)-(char*)0)]) btSoftBody::Node* base=&m_nodes[0]; int i,ni; for(i=0,ni=m_nodes.size();i<ni;++i) { if(m_nodes[i].m_leaf) { m_nodes[i].m_leaf->data=&m_nodes[i]; } } for(i=0,ni=m_...
false
false
false
false
false
0
GetAlignment(const std::string& widgettype, const std::string& object, const std::string& name, PG_Label::TextAlign& align) { long b = -1; GetProperty(widgettype, object, name, b); if(b == -1) { return; } switch(b) { case 0: align = PG_Label::LEFT; break; case 1: align = PG_Label::CENTER; break...
false
false
false
false
false
0
channel_x_off(PLCI *plci, byte ch, byte flag) { DIVA_CAPI_ADAPTER *a = plci->adapter; if ((a->ch_flow_control[ch] & N_RX_FLOW_CONTROL_MASK) == 0) { a->ch_flow_control[ch] |= (N_CH_XOFF | flag); a->ch_flow_plci[ch] = plci->Id; a->ch_flow_control_pending++; } }
false
false
false
false
false
0
main ( int agc, char ** argv ) { int NbrIteration = 1 ; int Min; int OPTIONS; char * FileName; FileName = LitOptions ( agc, argv, &OPTIONS ) ; // Charge le Graph contenu ds le fichier do { /* 1 */ if ( OPTIONS & VERB ) { RED printf ( "\n( %d ) PARCOUR LE FLOT ", NbrIteration ) ; DEFAULT_COLOR } Ini...
false
false
false
false
true
1
DataSetContour(vtkDataSet *input, vtkPolyData *output) { int numContours=this->ContourValues->GetNumberOfContours(); double *values=this->ContourValues->GetValues(); vtkContourFilter *contour = vtkContourFilter::New(); contour->SetInput((vtkImageData *)input); co...
false
false
false
false
false
0
fpm_clipboard_clear(GtkClipboard *clip, gpointer data) { fpm_clipboard *clipboard = data; if(clipboard->no_clear) { clipboard->no_clear = FALSE; } else { g_free(clipboard); } }
false
false
false
false
false
0
luaX_next (LexState *ls) { ls->lastline = ls->linenumber; if (ls->lookahead.token != TK_EOS) { /* is there a look-ahead token? */ ls->t = ls->lookahead; /* use this one */ ls->lookahead.token = TK_EOS; /* and discharge it */ } else ls->t.token = llex(ls, &ls->t.seminfo); /* read next token */ }
false
false
false
false
false
0
load_rax(void* value) { EnsureSpace ensure_space(this); emit(0x48); // REX.W emit(0xA1); emitq(reinterpret_cast<uintptr_t> (value)); }
false
false
false
false
false
0
gfs2_symlink(struct inode *dir, struct dentry *dentry, const char *symname) { struct gfs2_sbd *sdp = GFS2_SB(dir); unsigned int size; size = strlen(symname); if (size > sdp->sd_sb.sb_bsize - sizeof(struct gfs2_dinode) - 1) return -ENAMETOOLONG; return gfs2_create_inode(dir, dentry, NULL, S_IFLNK | S_IRWXUGO...
false
false
false
false
false
0
edwin_new(struct xio *xio, struct vbi *vbi, int pgno, int subno) { struct edwin *w; struct vt_page *vtp; u8 buf[64]; int i; if (not(w = malloc(sizeof(*w)))) goto fail1; if (not(w->xw = xio_open_win(xio, 0))) goto fail2; w->pgno = pgno; w->subno = subno; vtp = vbi_query_page(vbi...
false
false
false
false
false
0
glob_set(URLGlob *glob, char **patternp, size_t *posp, unsigned long *amount, int globindex) { /* processes a set expression with the point behind the opening '{' ','-separated elements are collected until the next closing '}' */ URLPattern *pat; bool done ...
false
false
false
false
false
0
main(int argc, char **argv) { try { printf(" observations2map - Part of the MRPT\n"); printf(" MRPT C++ Library: %s - Sources timestamp: %s\n", MRPT_getVersion().c_str(), MRPT_getCompilationDate().c_str()); printf("-------------------------------------------------------------------\n"); // Process arguments:...
false
false
false
false
false
0
ATRewriteTables(List **wqueue, LOCKMODE lockmode) { ListCell *ltab; /* Go through each table that needs to be checked or rewritten */ foreach(ltab, *wqueue) { AlteredTableInfo *tab = (AlteredTableInfo *) lfirst(ltab); /* Foreign tables have no storage. */ if (tab->relkind == RELKIND_FORE...
false
false
false
false
false
0
installedTask() { Task::installedTask(); if (myserver->getfd() >= 0) { loggedIn("+OK Already logged in."); // Already return; } currentHandler= &LoginTask::greetingHandler; myserver->pop3LoginInfo = myserver->savedLoginInfo; string errmsg=myserver-> socketConnect(myserver->pop3LoginInfo, "pop3",...
false
false
false
false
false
0
mdio_write(struct nic *nic __unused, int phy_id, int location, int value) { int i; int cmd = (0x5002 << 16) | (phy_id << 23) | (location<<18) | value; long mdio_addr = ioaddr + CSR9; whereami("mdio_write\n"); if (tp->chip_id == LC82C168) { int i = 1000; outl(cmd, ioaddr + 0xA0); do if ( ! ...
false
false
false
false
false
0
gx_set_dclk_frequency(struct fb_info *info) { const struct gx_pll_entry *pll_table; int pll_table_len; int i, best_i; long min, diff; u64 dotpll, sys_rstpll; int timeout = 1000; /* Rev. 1 Geode GXs use a 14 MHz reference clock instead of 48 MHz. */ if (cpu_data(0).x86_mask == 1) { pll_table = gx_pll_table_14...
false
false
false
false
false
0
occurrencesOf(const char *pSearchString,unsigned searchLen,unsigned startPos) const { unsigned count=0; while ((startPos=_pBuffer->indexOf(pSearchString,searchLen,startPos))<_pBuffer->length()) { count++; startPos+=searchLen; } return count; }
false
false
false
false
false
0
sync_annot_list_add(struct sync_annot_list *l, const char *entry, const char *userid, const char *value) { struct sync_annot *item = xzmalloc(sizeof(struct sync_annot)); item->entry = xstrdup(entry); item->userid = xstrdup(userid); item->value = xstrdup(value); item->mark = 0; if (l->t...
false
false
false
false
false
0
up_device_unifying_finalize (GObject *object) { UpDeviceUnifying *unifying; g_return_if_fail (object != NULL); g_return_if_fail (UP_IS_DEVICE_UNIFYING (object)); unifying = UP_DEVICE_UNIFYING (object); g_return_if_fail (unifying->priv != NULL); if (unifying->priv->poll_timer_id > 0) g_source_remove (unifying...
false
false
false
false
false
0
_wrap_new_apol_context_t(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wra...
false
false
false
false
false
0
_cmsCreateMutex(cmsContext ContextID) { _cmsMutexPluginChunkType* ptr = (_cmsMutexPluginChunkType*) _cmsContextGetClientChunk(ContextID, MutexPlugin); if (ptr ->CreateMutexPtr == NULL) return NULL; return ptr ->CreateMutexPtr(ContextID); }
false
false
false
false
false
0
index_pruneheader(char *buf, struct strlist *headers, struct strlist *headers_not) { char *p, *colon, *nextheader; int goodheader; char *endlastgood = buf; struct strlist *l; p = buf; while (*p && *p != '\r') { colon = strchr(p, ':'); if (colon && headers_not) { goodheader = 1; ...
false
false
false
false
false
0
to_XChar2b (object font, XFontStruct* font_info, const chart* src, XChar2b* dst, unsigned int count) { object encoding; pushSTACK(font); pushSTACK(O(object_xlib__encoding)); funcall(L(slot_value), 2); encoding = value1; if (font_info->min_byte1 == 0 && font_info->max_byte1 == 0) { /...
false
false
false
false
false
0
phrtsd(const char *const phrase, FourByteLong *const seed1, FourByteLong *const seed2) // not used in AutoDock code /* ********************************************************************** void phrtsd(char* phrase,FourByteLong *seed1,FourByteLong *seed2) PHRase To SeeDs ...
false
false
false
false
false
0
stir421x_patch_device(struct irda_usb_cb *self) { unsigned int i; int ret; char stir421x_fw_name[12]; const struct firmware *fw; const unsigned char *fw_version_ptr; /* pointer to version string */ unsigned long fw_version = 0; /* * Known firmware patch file names for STIR421x dongles *...
false
false
false
false
false
0
fz_stroke_flush(struct sctx *s, fz_linecap start_cap, fz_linecap end_cap) { if (s->sn == 2) { fz_add_line_cap(s, s->beg[1], s->beg[0], start_cap); fz_add_line_cap(s, s->seg[0], s->seg[1], end_cap); } else if (s->dot) { fz_add_line_dot(s, s->beg[0]); } }
false
false
false
false
false
0
is_root_dn_pw( const char *dn, const Slapi_Value *cred ) { int rv= 0; char *rootpw = config_get_rootpw(); if ( rootpw == NULL || !slapi_dn_isroot( dn ) ) { rv = 0; } else { Slapi_Value rdnpwbv; Slapi_Value *rdnpwvals[2]; slapi_value_init_string(&rdnpwbv,rootpw); rdnpwvals[ 0 ] = &rdnpwbv; rdnpw...
false
false
false
false
false
0
npc_in_room (sc_gameref_t game, sc_int npc, sc_int room) { if (npc_trace) { sc_trace ("NPC: checking NPC %ld in room %ld (NPC is in %ld)\n", npc, room, gs_npc_location (game, npc)); } return gs_npc_location (game, npc) - 1 == room; }
false
false
false
false
false
0
search(le_uint16 value, const le_uint16 array[], le_int32 count) { le_int32 power = 1 << highBit(count); le_int32 extra = count - power; le_int32 probe = power; le_int32 index = 0; if (value >= array[extra]) { index = extra; } while (probe > (1 << 0)) { probe >>= 1; ...
false
false
false
false
false
0
netsnmp_access_route_entry_create(void) { netsnmp_route_entry *entry = SNMP_MALLOC_TYPEDEF(netsnmp_route_entry); if(NULL == entry) { snmp_log(LOG_ERR, "could not allocate route entry\n"); return NULL; } entry->oid_index.oids = &entry->ns_rt_index; entry->oid_index.len = 1; entr...
false
false
false
false
false
0
JPEGEncodeImage(const ImageInfo *image_info, Image *image) { unsigned char *blob; size_t length; MagickPassFail status=MagickFail; blob=ImageToJPEGBlob(image,image_info,&length,&image->exception); if (blob != (unsigned char *) NULL) { register const unsigned char *p; regis...
false
false
false
false
false
0
cacheGeometry() const { d_cachedGeometryValid = true; d_geometry->reset(); // if no image, nothing more to do. if (!d_cursorImage) return; if (d_customSize.d_width != 0.0f || d_customSize.d_height != 0.0f) { calculateCustomOffset(); d_cursorImage->draw(*d_geometry, d_cu...
false
false
false
false
false
0
my_memlen(const char *buf, size_t count) { if (count > 0 && buf[count-1] == '\n') return count - 1; else return count; }
false
false
false
false
false
0
rl_vi_end_word (count, key) int count, key; { if (count < 0) { rl_ding (); return -1; } if (_rl_uppercase_p (key)) rl_vi_eWord (count, key); else rl_vi_eword (count, key); return (0); }
false
false
false
false
false
0
glulxe_retained_unregister(void *array, glui32 len, char *typecode, gidispatch_rock_t objrock) { arrayref_t *arref = NULL; arrayref_t **aptr; glui32 ix, addr2, val; if (typecode[4] != 'I' || array == NULL) { /* We only retain integer arrays. */ return; } for (aptr=(&arrays); (*aptr); aptr=(&((*...
false
false
false
false
false
0
gtk_source_gutter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkSourceGutter *self = GTK_SOURCE_GUTTER (object); switch (prop_id) { case PROP_VIEW: set...
false
false
false
false
false
0
par_timesdivide(root) TREE *root; { TREE *newroot; while(symbol == times || symbol == ptimes || symbol == divide) { newroot = newtree(); LEFT(newroot) = root; switch(symbol) { case times: VDATA(newroot) = opr_mul; break; case ptimes: VDATA(newroot) = opr_pmul; ...
false
false
false
false
false
0
ComputeLength() { Packet::ComputeLength(); length+=4+strlen(oldpath)+4+strlen(newpath); if(protocol_version>=5) length+=4; // flags }
false
false
false
false
false
0
rgbe_mapped_file_remaining (GMappedFile *f, const void *data) { g_return_val_if_fail (f, 0); g_return_val_if_fail (GPOINTER_TO_UINT (data) > GPOINTER_TO_UINT (g_mapped_file_get_contents (f)), 0); return GPOINTER_TO_UINT (data) - GPOINTER_TO_UINT (g_ma...
false
false
false
false
false
0
run (void) { if (this->open () == -1) return 1; if (option[BINARYSEARCH]) { if (this->compute_binary_search () == -1) return 1; } else if (option[LINEARSEARCH]) { if (this->compute_linear_search () == -1) return 1; } else { if (this->compute_perfect_has...
false
false
false
false
false
0
add_item_cb (const char *type, gpointer data_p, gpointer be_data_p) { GncXmlDataType_t *data = data_p; struct file_backend *be_data = be_data_p; g_return_if_fail (type && data && be_data); g_return_if_fail (data->version == GNC_FILE_BACKEND_VERS); if (be_data->ok) return; if (!g_strcm...
false
false
false
false
false
0
cht_ti_jack_event(struct notifier_block *nb, unsigned long event, void *data) { struct snd_soc_jack *jack = (struct snd_soc_jack *)data; struct snd_soc_dapm_context *dapm = &jack->card->dapm; if (event & SND_JACK_MICROPHONE) { snd_soc_dapm_force_enable_pin(dapm, "SHDN"); snd_soc_dapm_force_enable_pin(dapm, "M...
false
false
false
false
false
0
slotToggleProviderButton() { QString filter; QActionList checkedActions; foreach( const Playlists::PlaylistProvider *p, m_providerActions.keys() ) { QAction *action = m_providerActions.value( p ); if( action->isChecked() ) { QString escapedName = QRegExp::escape( p->p...
false
false
false
false
false
0
import_environment_set_x (SCM env, SCM sym, SCM val) #define FUNC_NAME "import_environment_set_x" { SCM owner = import_environment_lookup (env, sym); if (SCM_UNBNDP (owner)) { return SCM_UNDEFINED; } else if (scm_is_pair (owner)) { SCM resolve = import_environment_conflict (env, sym, owne...
false
false
false
false
false
0
toString() const { string s=""; int i; for (i=0; i<3; i++) { if (i > 0) s.append(":",1); string ss; string::iterator b, e; switch (i) { case 0: ss=path; break; case 1: ss=hiersep; break; default: ss=name; break; } b=ss.begin(); e=ss.end(); while (b != e) { if (...
false
false
false
false
false
0
cmd_window_move(const char *data, SERVER_REC *server, WI_ITEM_REC *item) { if (!is_numeric(data, 0)) { command_runsub("window move", data, server, item); return; } active_window_move_to(atoi(data)); }
false
false
false
false
true
1
af9005_rc_query(struct dvb_usb_device *d, u32 * event, int *state) { struct af9005_device_state *st = d->priv; int ret, len; u8 obuf[5]; u8 ibuf[256]; *state = REMOTE_NO_KEY_PRESSED; if (rc_decode == NULL) { /* it shouldn't never come here */ return 0; } /* deb_info("rc_query\n"); */ obuf[0] = 3; /* res...
false
false
false
false
false
0
grep_config(const char *var, const char *value, void *cb) { struct grep_opt *opt = cb; char *color = NULL; switch (userdiff_config(var, value)) { case 0: break; case -1: return -1; default: return 0; } if (!strcmp(var, "grep.extendedregexp")) { if (git_config_bool(var, value)) opt->regflags |= REG_EXTEND...
false
false
false
false
false
0
setupHeuristics(CbcModel & model) { // Allow rounding heuristic CbcRounding heuristic1(model); heuristic1.setHeuristicName("rounding"); int numberHeuristics = model.numberHeuristics(); int iHeuristic; bool found; found = false; for (iHeuristic = 0; iHeuristic < numberHeuristics; iHeuris...
false
false
false
false
false
0
uniform () { /* Component 1 */ double p1 = a12 * Cg[1] - a13n * Cg[0]; int k = p1 / m1; p1 -= k * m1; if (p1 < 0.0) p1 += m1; Cg[0] = Cg[1]; Cg[1] = Cg[2]; Cg[2] = p1; /* Component 2 */ double p2 = a21 * Cg[5] - a23n * Cg[3]; k = p2 / m2; p2 -= k * m2; if (p2 < 0.0) p2 += m2; Cg[3] = Cg[4];...
false
false
false
false
false
0
showredcdata(void) { REDC_CACHE *rcp; long i; for (i = 0, rcp = redc_cache; i < MAXREDC; i++, rcp++) { if (rcp->age > 0) { printf("%-8ld%-8ld", i, rcp->age); qprintnum(rcp->rnum, 0); printf("\n"); } } }
false
false
false
false
false
0
handle_eth_ud_smac_index(struct mlx4_ib_dev *dev, struct mlx4_ib_qp *qp, struct mlx4_qp_context *context) { u64 u64_mac; int smac_index; u64_mac = atomic64_read(&dev->iboe.mac[qp->port - 1]); context->pri_path.sched_queue = MLX4_IB_DEFAULT_SCHED_QUEUE | ((qp->port - 1) << 6); if (!qp->pri.smac &&...
false
false
false
false
false
0
rt73usb_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif) { struct rt2x00_dev *rt2x00dev = hw->priv; u64 tsf; u32 reg; rt2x00usb_register_read(rt2x00dev, TXRX_CSR13, &reg); tsf = (u64) rt2x00_get_field32(reg, TXRX_CSR13_HIGH_TSFTIMER) << 32; rt2x00usb_register_read(rt2x00dev, TXRX_CSR12, &reg); tsf |=...
false
false
false
false
false
0
NITFUncompressVQTile( NITFImage *psImage, GByte *pabyVQBuf, GByte *pabyResult ) { int i, j, t, iSrcByte = 0; for (i = 0; i < 256; i += 4) { for (j = 0; j < 256; j += 8) { GUInt16 firstByte = pabyVQBuf[iSrcB...
false
true
false
false
false
1
AddInstancePropertyAccessor( v8::Handle<String> name, AccessorGetter getter, AccessorSetter setter, v8::Handle<Value> data, v8::AccessControl settings, v8::PropertyAttribute attributes) { if (IsDeadCheck("v8::FunctionTemplate::AddInstancePropertyAccessor()")) { return; } EN...
false
false
false
false
false
0
check_request(struct dundi_request *dr) { struct dundi_request *cur; AST_LIST_LOCK(&peers); AST_LIST_TRAVERSE(&requests, cur, list) { if (cur == dr) break; } AST_LIST_UNLOCK(&peers); return cur ? 1 : 0; }
true
true
false
false
false
1
v4lconvert_vflip_yuv420(unsigned char *src, unsigned char *dest, struct v4l2_format *fmt) { int y; /* First flip the Y plane */ src += fmt->fmt.pix.height * fmt->fmt.pix.bytesperline; for (y = 0; y < fmt->fmt.pix.height; y++) { src -= fmt->fmt.pix.bytesperline; memcpy(dest, src, fmt->fmt.pix.width); dest +...
false
false
false
false
false
0
unbind_ports(void) { SERVICE_OPTIONS *opt; #ifdef HAVE_STRUCT_SOCKADDR_UN struct stat st; /* buffer for stat */ #endif s_poll_init(fds); s_poll_add(fds, signal_pipe[0], 1, 0); for(opt=service_options.next; opt; opt=opt->next) { s_log(LOG_DEBUG, "Closing service [%s]", opt->servname); ...
false
false
false
false
false
0
e1000_run_loopback_test(struct e1000_adapter *adapter) { struct e1000_hw *hw = &adapter->hw; struct e1000_tx_ring *txdr = &adapter->test_tx_ring; struct e1000_rx_ring *rxdr = &adapter->test_rx_ring; struct pci_dev *pdev = adapter->pdev; int i, j, k, l, lc, good_cnt, ret_val = 0; unsigned long time; ew32(RDT, rx...
false
false
false
false
false
0
get_block_list_match_tlg_and_dlg_tag(Block *block_head, const int tlg_tag, const int dlg_tag) { Block *bpt; List *head = NULL; for (bpt = block_head; bpt != NULL; bpt = bpt->next) { if (block_match_tlg_and_dlg_tag(bpt, tlg_ta...
false
false
false
false
false
0
ShouldOmitSectionDirective(StringRef Name, const MCAsmInfo &MAI) const { // FIXME: Does .section .bss/.data/.text work everywhere?? if (Name == ".text" || Name == ".data" || (Name == ".bss" && !MAI.usesELFSectionDirectiveForBSS())) return true; return fa...
false
false
false
false
false
0
sinfo_pro_save_ims( cpl_imagelist * ims, cpl_frameset * ref, cpl_frameset * set, const char * out_file, const char * pro_catg, cpl_table * qclog, const char * recid, cpl_parameterlist* parlist) { ...
false
false
false
false
false
0
parse_switch(int fd, char *line) { Node *nd; Switch *sw; Port *port; char *nodeid; char *nodedesc; int nports, r, esp0 = 0; if (!(nports = parse_node_ports(line + 6)) || !(nodeid = parse_node_id(line, &line))) return 0; nodedesc = parse_node_desc(line, &line); if (!(nd = new_node(SWITCH_NODE, nodeid,...
false
false
false
false
false
0
key_addition_8to32(const UINT8 *txt, UINT32 *keys, UINT32 *out) { const UINT8 *ptr; int i, j; UINT32 val; ptr = txt; for (i=0; i<4; i++) { val = 0; for (j=0; j<4; j++) val |= (*ptr++ << 8*j); out[i] = keys[i]^val; } }
false
false
false
false
false
0
draw_sprites(struct mame_bitmap *bitmap,const struct rectangle *cliprect) { int offs; for (offs = 0;offs < spriteram_size/2;offs += 4) { int sx,sy,code,color,flipx,flipy,height,y; sx = spriteram16[offs + 2]; sy = spriteram16[offs + 0]; code = spriteram16[offs + 1]; color = spriteram16[offs + 2...
false
false
false
false
false
0
gwy_si_unit_clone_real(GObject *source, GObject *copy) { GwySIUnit *si_unit, *clone; g_return_if_fail(GWY_IS_SI_UNIT(source)); g_return_if_fail(GWY_IS_SI_UNIT(copy)); si_unit = GWY_SI_UNIT(source); clone = GWY_SI_UNIT(copy); if (gwy_si_unit_equal(si_unit, clone)) return; g_array_s...
false
false
false
false
false
0
gridDefMask(int gridID, const int *mask) { long size, i; grid_t *gridptr; if ( reshGetStatus ( gridID, &gridOps ) == CLOSED ) { xwarning("%s", "Operation not executed."); return; } gridptr = ( grid_t *) reshGetVal ( gridID, &gridOps ); size = gridptr->size; if ( size == 0 ) Error...
false
false
false
false
false
0
showMultiMap(const MultiMap& mm) { for (MultiMap::const_iterator i = mm.begin(); i != mm.end(); ++i) { cout << (*i).first << "==" << (*i).second << "|" << endl; } }
false
false
false
false
false
0
_cdk_stream_get_opaque (cdk_stream_t s, int fid) { struct stream_filter_s *f; if (!s) return NULL; for (f = s->filters; f; f = f->next) { if ((int) f->type == fid) return f->opaque; } return NULL; }
false
false
false
false
false
0
Restore() { assert("pre: context_is_set" && this->Context!=0); assert("pre: current_context_matches" && this->Context->IsCurrent()); if(this->DisplayListUnderCreationInCompileMode()) { vtkgl::UseProgram(0); this->SavedId=0; } else { GLint value; glGetIntegerv(vtkgl::CURRENT_PROGRA...
false
false
false
false
false
0
ccss_selector_get_importance (ccss_selector_t const *self) { g_assert (self); return self->importance; }
false
false
false
false
false
0
update_note_header_size_elf64(const Elf64_Ehdr *ehdr_ptr) { int i, rc=0; Elf64_Phdr *phdr_ptr; Elf64_Nhdr *nhdr_ptr; phdr_ptr = (Elf64_Phdr *)(ehdr_ptr + 1); for (i = 0; i < ehdr_ptr->e_phnum; i++, phdr_ptr++) { void *notes_section; u64 offset, max_sz, sz, real_sz = 0; if (phdr_ptr->p_type != PT_NOTE) co...
false
false
false
false
false
0