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
lm93_update_client_full(struct lm93_data *data, struct i2c_client *client) { dev_dbg(&client->dev, "starting device update (block data enabled)\n"); /* in1 - in16: values & limits */ lm93_read_block(client, 3, (u8 *)(data->block3)); lm93_read_block(client, 7, (u8 *)(data->block7)); /* temp1 - temp4: valu...
false
false
false
false
false
0
fill_cmd_set_lan_configuration_parameters_bmc_generated_arp_control (uint8_t channel_number, uint8_t bmc_generated_gratuitous_arps, uint8_t bmc_generated_arp_responses, ...
false
false
false
false
false
0
sig_connected(XMPP_SERVER_REC *server) { if (!IS_XMPP_SERVER(server) || !server->connrec->reconnection) return; signal_emit("xmpp set presence", 4, server, server->connrec->show, server->connrec->away_reason, server->connrec->priority); g_free_and_null(server->connrec->away_reason); }
false
false
false
false
false
0
compute_screen_to_graph (double r_graph [3] [3], double r_screen [3] [3], double a [3] [3], double a_inverse [3] [3]) // computes the transformation to get graph coordinates given // screen coordinates, where // G S // r = T r // // since this transformation is defined using three points (...
false
false
false
false
false
0
start_accept() { new_connection_.reset(new connection(io_service_, connection_manager_, request_handler_)); acceptor_.async_accept(new_connection_->socket(), boost::bind(&server::handle_accept, this, boost::asio::placeholders::error)); }
false
false
false
false
false
0
main(int argc, char **argv) { PIX *pixs, *pixh, *pixv, *pix, *pixd; char *filein, *fileout; static char mainName[] = "runlengthtest"; if (argc != 3) return ERROR_INT(" Syntax: runlengthtest filein fileout", mainName, 1); filein = argv[1]; fileout = argv[2]; if ((p...
false
false
false
false
false
0
Nav_Alt_Flags(char *Nav, int flags) { flags &= ~NP_VALIDTYPE; //clear the NP_SHIP and NP_WAYPOINT bits, make sure they haven't been set int nav = FindNav(Nav); if (nav != -1) { Navs[nav].flags &= NP_VALIDTYPE; // Clear all bits BUT NP_SHIP or NO_WAYPOINT Navs[nav].flags |= flags; // merge } return (nav != ...
false
false
false
false
false
0
read_next_command(void) { static int stdin_eof = 0; if (stdin_eof) { unread_command_buf = 0; return EOF; } do { if (unread_command_buf) { unread_command_buf = 0; } else { struct recent_command *rc; strbuf_detach(&command_buf, NULL); stdin_eof = strbuf_getline(&command_buf, stdin, '\n'); if...
false
false
false
false
false
0
lame_set_quality(lame_global_flags * gfp, int quality) { if (is_lame_global_flags_valid(gfp)) { if (quality < 0) { gfp->quality = 0; } else if (quality > 9) { gfp->quality = 9; } else { gfp->quality = quality; } return 0; ...
false
false
false
false
false
0
uufilter(int in, int out) { char out_buf[16384]; SERVER *server; char *buffer; enum { UuStateSearching, UuStateDoing, UuStateSkipping } state = UuStateSearching; long n, pos; server = server_create(in); pos = 0; while ((buffer = server_read(server))) switch (state) { case UuSt...
true
true
false
false
false
1
camel_index_add_name (CamelIndex *idx, const gchar *name) { CamelIndexClass *class; g_return_val_if_fail (CAMEL_IS_INDEX (idx), NULL); class = CAMEL_INDEX_GET_CLASS (idx); g_return_val_if_fail (class->add_name != NULL, NULL); if ((idx->state & CAMEL_INDEX_DELETED) == 0) return class->add...
false
false
false
true
false
1
hoist(Instruction &I, BasicBlock *Preheader) { DEBUG(dbgs() << "LICM hoisting to " << Preheader->getName() << ": " << I << "\n"); // Move the new node to the Preheader, before its terminator. I.moveBefore(Preheader->getTerminator()); if (isa<LoadInst>(I)) ++NumMovedLoads; else if (isa<CallInst>(I)) +...
false
false
false
false
false
0
List_truncate (T list, int n) { T head = list; while (--n > 0) { list = list->rest; } if (list) { list->rest = (T) NULL; } return head; }
false
false
false
false
false
0
CreateDefaultRepresentation() { if (!this->WidgetRep) { vtkScalarBarRepresentation *rep = vtkScalarBarRepresentation::New(); this->SetRepresentation(rep); rep->Delete(); } }
false
false
false
false
false
0
Append(const QByteArray &entry, const Id &remote) { if(_enabled) { _entries.append(QPair<QByteArray, Id>(entry, remote)); } }
false
false
false
false
false
0
imageFilterList() { QStringList ss; if (g_availableFilters.isEmpty()) { registerDefaultImageFilters(); } for (QMap<QByteArray, ImageFilterFactoryFunction>::iterator it = g_availableFilters.begin(); it != g_availableFilters.end(); ++it) { ss.append(it.key()); } return ss; }
false
false
false
false
false
0
dump_kkd(MdbHandle *mdb, void *kkd, size_t len) { GArray *aprops = kkd_to_props(mdb, kkd, len); int i; for (i=0; i<aprops->len; ++i) { MdbProperties *props = g_array_index(aprops, MdbProperties*, i); mdb_dump_props(props, stdout, 1); } }
false
false
false
false
false
0
_setWithOids(ArchiveHandle *AH, TocEntry *te) { if (AH->currWithOids != te->withOids) { _doSetWithOids(AH, te->withOids); AH->currWithOids = te->withOids; } }
false
false
false
false
false
0
mon_text_error(void *data, struct urb *urb, int error) { struct mon_reader_text *rp = data; struct mon_event_text *ep; if (rp->nevents >= EVENT_MAX || (ep = kmem_cache_alloc(rp->e_slab, GFP_ATOMIC)) == NULL) { rp->r.m_bus->cnt_text_lost++; return; } ep->type = 'E'; ep->id = (unsigned long) urb; ep->bu...
false
false
false
false
false
0
getTagID(MDMODEL md_model, const char *key) { if(_table_map.find(md_model) != _table_map.end()) { TAGINFO *info_map = (TAGINFO*)_table_map[md_model]; for(TAGINFO::iterator i = info_map->begin(); i != info_map->end(); i++) { const TagInfo *info = (*i).second; if(info && (strcmp(info->fieldname, key) == 0)) ...
false
false
false
false
false
0
setEditorData(QWidget *editor, const QModelIndex &index) const { QComboBox *comboBox = qobject_cast<QComboBox*>(editor); if(comboBox && m_model->getSelections(index).size()) { comboBox->clear(); QStringList varList = m_model->getSelections(index); comboBox->addItems(varList);...
false
false
false
false
false
0
pnfs_within_mdsthreshold(struct nfs_open_context *ctx, struct inode *ino, int iomode) { struct nfs4_threshold *t = ctx->mdsthreshold; struct nfs_inode *nfsi = NFS_I(ino); loff_t fsize = i_size_read(ino); bool size = false, size_set = false, io = false, io_set = false, ret = false; if (t == NULL) return...
false
false
false
false
false
0
parseValue( DOM::CSSStyleDeclarationImpl *declaration, int _id, const DOM::DOMString &string, bool _important) { #ifdef CSS_DEBUG kDebug( 6080 ) << "CSSParser::parseValue: id=" << _id << " important=" << _important << " value='" << string.string() << "'" << endl; #endi...
false
false
false
false
false
0
_dbus_transport_new_for_tcp_socket (const char *host, const char *port, const char *family, const char *noncefile, DBusError *error) { int fd; DBusTran...
false
false
false
false
false
0
ensTranscriptadaptorRetrieveAllStableidentifiers( EnsPTranscriptadaptor tca, AjPList stableids) { AjBool result = AJFALSE; AjPStr primary = NULL; AjPStr table = NULL; if (!tca) return ajFalse; if (!stableids) return ajFalse; table = ajStrNewC("transcript"); pr...
false
false
false
false
false
0
hexium_init_done(struct saa7146_dev *dev) { struct hexium *hexium = (struct hexium *) dev->ext_priv; union i2c_smbus_data data; int i = 0; DEB_D("hexium_init_done called\n"); /* initialize the helper ics to useful values */ for (i = 0; i < sizeof(hexium_ks0127b); i++) { data.byte = hexium_ks0127b[i]; if (0 ...
false
false
false
false
false
0
g_typelib_free (GITypelib *typelib) { if (typelib->mfile) g_mapped_file_unref (typelib->mfile); else if (typelib->owns_memory) g_free (typelib->data); if (typelib->modules) { g_list_foreach (typelib->modules, (GFunc) g_module_close, NULL); g_list_free (typelib->modules); } g_sl...
false
false
false
false
false
0
update_urls(PROJECT* p, vector<std::string> &urls) { unsigned int i, j; bool found, any_new; any_new = false; for (i=0; i<urls.size(); i++) { found = false; for (j=0; j<p->scheduler_urls.size(); j++) { if (urls[i] == p->scheduler_urls[j]) { found = true; ...
false
false
false
false
false
0
axnet_open(struct net_device *dev) { int ret; struct axnet_dev *info = PRIV(dev); struct pcmcia_device *link = info->p_dev; unsigned int nic_base = dev->base_addr; dev_dbg(&link->dev, "axnet_open('%s')\n", dev->name); if (!pcmcia_dev_present(link)) return -ENODEV; outb_p(0xFF, nic_ba...
false
false
false
false
false
0
GetFormula() { string attr = "Formula"; OBPairData *dp = (OBPairData *) GetData(attr); if (dp != NULL) // we already set the formula (or it was read from a file) return dp->GetValue(); obErrorLog.ThrowError(__FUNCTION__, "Ran OpenBabel::SetFormula -- Hill order formul...
false
false
false
false
false
0
filter_gui_get_size_rule(void) { filesize_t lower; filesize_t upper; filter_t *target; gboolean negate; gboolean active; gboolean soft; guint16 flags; if (gui_filter_dialog() == NULL) return NULL; lower = filter_update_size( GTK_ENTRY(gui_filter_dialog_lookup("entry_filte...
false
false
false
false
false
0
eputc(struct MF *mf, unsigned char c) { int return_val; if ((mf->Mf_putc) == NULLFUNC) { mferror(mf, "Mf_putc undefined"); return (-1); } return_val = (mf->Mf_putc) (mf, c); if (return_val == EOF) mferror(mf, "error writing"); mf->Mf_numbyteswritten++; return (return_val); }
false
false
false
false
false
0
EuclideanDistance(cmsFloat32Number a[], cmsFloat32Number b[], int n) { cmsFloat32Number sum = 0; int i; for (i=0; i < n; i++) { cmsFloat32Number dif = b[i] - a[i]; sum += dif * dif; } return sqrtf(sum); }
false
false
false
false
false
0
Roll(double angle) { if (angle - this->RollAngle != 0) { this->UpdateTool(this->PitchAngle, this->YawAngle, angle); } }
false
false
false
false
false
0
listen_change_state(capidrv_contr *card, int event) { struct listenstatechange *p = listentable; while (p->event) { if (card->state == p->actstate && p->event == event) { if (debugmode) printk(KERN_DEBUG "capidrv-%d: listen_change_state %d -> %d\n", card->contrnr, card->state, p->nextstate); ca...
false
false
false
false
false
0
isrv_register_fd(isrv_state_t *state, int peer, int fd) { int n; DPRINTF("register_fd(peer:%d,fd:%d)", peer, fd); if (FD_COUNT >= FD_SETSIZE) return -1; if (FD_COUNT <= fd) { n = FD_COUNT; FD_COUNT = fd + 1; DPRINTF("register_fd: FD_COUNT %d", FD_COUNT); FD2PEER = xrealloc(FD2PEER, FD_COUNT * sizeof(FD2...
false
false
false
false
false
0
qos_json(request_rec *r, qos_dir_config *dconf, const char **query, const char **msg) { const char *contenttype = apr_table_get(r->headers_in, "Content-Type"); if(contenttype && (strncasecmp(contenttype, "application/json", 16) == 0)) { apr_size_t len = 0; const char *data = NULL; /* check if parp has b...
false
false
false
false
false
0
split_in_3(Grid *grid, Simplex *simp, Vertex *vert) { // define new vertices of new simplex Simplex *new_simp1 = add_new_simp(grid, vert, simp->sommet[1], simp->sommet[2]); Simplex *new_simp2 = add_new_simp(grid, vert, simp->sommet[2], simp->sommet[0]); simp->sommet[2] = vert; // define new neighbors new_simp1-...
false
false
false
false
false
0
string_strip_leading_c(char *str, char stripchar) { int a = 0; int b = 0; while (str[a] != '\0' && str[a] == stripchar) a++; while (str[a] != '\0') str[b++] = str[a++]; str[b] = str[a]; return a-b; }
false
false
false
false
false
0
load_get_size_callback (gint *width, gint *height, gpointer data) { SvgLoadVals *vals = data; *width = vals->width; *height = vals->height; if (*width < 1 || *height < 1) { *width = SVG_DEFAULT_SIZE; *height = SVG_DEFAULT_SIZE; } ...
false
false
false
false
false
0
gnome_desktop_item_set_string (GnomeDesktopItem *item, const char *attr, const char *value) { g_return_if_fail (item != NULL); g_return_if_fail (item->refcount > 0); g_return_if_fail (attr != NULL); set (item, attr, value); if (strcmp (attr, GNOME_DESKTOP_ITEM_TYPE) == 0) item->type = type_...
false
false
false
false
false
0
IPrcWrite(pfPrcHelper* prc) { plSingleModifier::IPrcWrite(prc); prc->startTag("MultistageBehParams"); prc->writeParam("FreezePhys", fFreezePhys); prc->writeParam("SmartSeek", fSmartSeek); prc->writeParam("ReverseFBControlsOnRelease", fReverseFBControlsOnRelease); prc->endTag(true); prc->wr...
false
false
false
false
false
0
llrpc(unsigned command, void *data) { if (command == CLICK_LLRPC_SET_SWITCH) { int32_t *val = reinterpret_cast<int32_t *>(data); if (*val >= noutputs()) return -EINVAL; _output = *val; return 0; } else if (command == CLICK_LLRPC_GET_SWITCH) { int32_t *val = reinterpret_cast<int32_t *>(dat...
false
false
false
false
false
0
ap1394_if_print(const struct pcap_pkthdr *h, const u_char *p) { u_int length = h->len; u_int caplen = h->caplen; struct firewire_header *fp; u_short ether_type; if (caplen < FIREWIRE_HDRLEN) { printf("[|ap1394]"); return FIREWIRE_HDRLEN; } if (eflag) ap1394_hdr_print(p, length); length -= FIREWIRE_HDRL...
false
false
false
false
false
0
_copyAlias(const Alias *from) { Alias *newnode = makeNode(Alias); COPY_STRING_FIELD(aliasname); COPY_NODE_FIELD(colnames); return newnode; }
false
false
false
false
false
0
Lattice (int n, int m) { Graph *g; Edge *e; int i, j; g = grid (n, m); // Add horizontal edges for (j = 0; j < n; ++j) { for (i = 1; i < m; ++i) { e = new Edge ((*g)[j * m + i - 1], (*g)[j * m + i]); g->add (e); } } // Add vertical edges for (i = 0; i < m; ++i) { for (j = 0; j < (n - 1); ++j) { ...
false
false
false
false
false
0
bind_to_notify_cb (GdaHolder *bind_to, G_GNUC_UNUSED GParamSpec *pspec, GdaHolder *holder) { gda_holder_lock ((GdaLockable*) holder); gda_holder_lock ((GdaLockable*) bind_to); g_signal_handler_disconnect (holder->priv->simple_bind, holder->priv->simple_bind_type_changed_id); holder->priv->simple_bind_type...
false
false
false
false
false
0
IssueTmpRSAKey(SSL *ssl, int export, int keylen) { NsOpenSSLConn *sslconn; char *server = "none"; RSA *rsaPtr = NULL; sslconn = (NsOpenSSLConn *) SSL_get_app_data(ssl); if (sslconn != NULL && sslconn->ssldriver != NULL) { server = sslconn->ssldriver->server; } ...
false
false
false
false
false
0
boot_flags_persistent_commit (const char *section_name, const struct config_keyvalue *kv, void *arg) { ipmi_chassis_config_state_data_t *state_data; struct boot_flags_data data; config_err_t ret; assert (section_name); assert (kv); assert (arg); ...
false
false
false
false
false
0
main(int _argc, char** _argv){ srand(static_cast<unsigned int>(time(NULL))); char next = 'Y'; AgentController* agent = NULL; InitializeAgent(agent); //main render loop while(true){ //update AgentStates while(agent->Update()); cout << "Continue? (Y/N)" << endl; cin >> next; if (next != ...
false
false
false
false
false
0
check_protocol (tree p, const char *type, tree name) { if (TREE_CODE (p) == PROTOCOL_INTERFACE_TYPE) { int f1, f2; /* Ensure that all protocols have bodies! */ if (warn_protocol) { f1 = check_methods (PROTOCOL_CLS_METHODS (p), objc_implementation_context, '+'); f2 = ch...
false
false
false
false
false
0
conv_rgbF_gF (unsigned char *src, unsigned char *dst, long samples) { long n = samples; while (n--) { int c; float sum = 0; for (c = 0; c < 3; c++) { sum += (*(float *) src); src += 4; } sum /= 3; (*(float *) dst) = sum; dst...
false
false
false
false
false
0
ff_write_ee(struct fmc_device *fmc, int pos, const void *data, int len) { if (!(fmc->flags & FMC_DEVICE_HAS_GOLDEN)) return -EOPNOTSUPP; return ff_eeprom_write(fmc, pos, data, len); }
false
false
false
false
false
0
sock_error(int x) { #ifdef PROX_DEBUG fprintf(stderr, "HttpProxyGetStream: socket error: %d\n", x); #endif reset(true); if(x == BSocket::ErrHostNotFound) error(ErrProxyConnect); else if(x == BSocket::ErrConnectionRefused) error(ErrProxyConnect); else if(x == BSocket::ErrRead) error(ErrProxyNeg); }
false
false
false
false
false
0
uniqcache(devp, n, min, max) CONST devstat *devp; int n; u_long min, max; { int i, j, size; if (min >= max) return(0); for (i = n - cachesize[n]; i >= 0; i -= cachesize[i]) { if (devp -> drive != cachedrive[i]) continue; if (min <= sectno[i] && max >= sectno[i] + cachesize[i]) return(shiftcache(devp, i, -1))...
false
false
false
false
false
0
filter(char *s, char *fil, ...) { va_list ap; register char *starts, *startf; register int quote; char *oldbufferpos; char *str_start = s; oldbufferpos=bufferpos; startf=starts= NULL; va_start(ap, fil); quote=0; do { if ( *fil==WILDCARD ) { char **strptr = va_arg(ap, char**); ...
false
false
false
false
false
0
do_net_segment(FILE *fp) { unsigned int n1, n2, color; reset_attributes(); /* net segment connectivity records have the following format: * S #N1 #N2 - Net connectivity, Node N1 is connected to N2 */ if(fscanf(fp,"%u %u\n",&n1, &n2) != 2) { fprintf(stderr,"Error: Invalid net segme...
false
false
false
false
true
1
clearUserCache(btManifoldPoint& pt) { void* oldPtr = pt.m_userPersistentData; if (oldPtr) { #ifdef DEBUG_PERSISTENCY int i; int occurance = 0; for (i=0;i<m_cachedPoints;i++) { if (m_pointCache[i].m_userPersistentData == oldPtr) { occurance++; if (occurance>1) printf("error in clearUserCac...
false
false
false
false
false
0
latexNextNotBlankIs(int i, Accessor &styler, char needle) { char ch; while (i < styler.Length()) { ch = styler.SafeGetCharAt(i); if (!latexIsBlankAndNL(ch) && ch != '*') { if (ch == needle) return true; else return false; } i++; } return false; }
false
false
false
false
false
0
coda_dentry_delete(const struct dentry * dentry) { int flags; if (d_really_is_negative(dentry)) return 0; flags = (ITOC(d_inode(dentry))->c_flags) & C_PURGE; if (is_bad_inode(d_inode(dentry)) || flags) { return 1; } return 0; }
false
false
false
false
false
0
visitRing(OBMol *mol, OBRing *ring, std::vector<OBRing*> &rlist, std::vector<OBRing*> &rignored) { const std::vector<int> &atoms = ring->_path; OBBitVec mask; // Make sure mask is the same size as the maximum ring atom/bond index. mask.SetBitOn(mol->NumAtoms()); mask.SetBitOn(mol->NumBonds()); ...
false
false
false
false
false
0
meta_draw_spec_new (MetaTheme *theme, const char *expr, GError **error) { MetaDrawSpec *spec; spec = g_slice_new0 (MetaDrawSpec); pos_tokenize (expr, &spec->tokens, &spec->n_tokens, NULL); spec->constant = meta_theme_replace_constants (theme, spec->tokens, ...
false
false
false
false
false
0
TC0110PCR_restore_colors(int chip) { int i,color,r=0,g=0,b=0; for (i=0; i<(256*16); i++) { color = TC0110PCR_ram[chip][i]; switch (TC0110PCR_type) { case 0x00: { r = (color >> 0) & 0x1f; g = (color >> 5) & 0x1f; b = (color >> 10) & 0x1f; r = (r << 3) | (r >> 2); ...
false
false
false
false
false
0
log_likelihood_fn( float *datum, class_DS class, double limit) { int i = 0, num; float sum = 0.0; tparm_DS tparm; num = class->num_tparms; do { tparm=class->tparms[i]; tparm->datum=datum; switch(tparm->tppt) { case MN_CN: sum += (float) multi_normal_cn_log_likelihood(tparm); br...
false
false
false
false
false
0
check_word(ClawsSpellEntry *entry, int start, int end) { GtkAspell *gtkaspell = entry->gtkaspell; PangoAttrIterator *it; gint s, e; gboolean misspelled; gchar *text = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); gchar *word = NULL; /* Check to see if we've got any attributes at this position. * If so, ...
false
false
false
false
false
0
prog_basename(const char *path) { const char *name; if (!path) return set_errnull(EINVAL); return (name = strrchr(path, PATH_SEP)) ? (name + 1) : path; }
false
false
false
false
false
0
set_insert_key(register PySetObject *so, PyObject *key, Py_hash_t hash) { register setentry *entry; typedef setentry *(*lookupfunc)(PySetObject *, PyObject *, Py_hash_t); assert(so->lookup != NULL); entry = so->lookup(so, key, hash); if (entry == NULL) return -1; if (entry->key == NULL)...
false
false
false
false
false
0
secs_to_uptime(long secs) { long int days = secs / 86400; int hours = (int)((secs - (days * 86400)) / 3600); int minutes = (int)((secs - (days * 86400) - (hours * 3600)) / 60); char *uptime_string = NULL; switch (days) { case 0: tor_asprintf(&uptime_string, "%d:%02d hours", hours, minutes); break; ...
false
false
false
false
false
0
bGet6PicInfo(int iFodo, const UCHAR *aucGrpprl, int iBytes, picture_block_type *pPicture) { int iFodoOff, iInfoLen; BOOL bFound; UCHAR ucTmp; TRACE_MSG("vGet6PicInfo"); fail(iFodo < 0 || aucGrpprl == NULL || pPicture == NULL); iFodoOff = 0; bFound = FALSE; while (iBytes >= iFodoOff + 1) { switch (ucGetByt...
false
false
false
false
false
0
listcleanup(LISTVAR_ *list, size_t toRemove) { if (size(list) == toRemove) /* remove all ? */ { listDestructor(list); /* then wipe out the list */ *list = *listConstructor(); /* and return a new, empty one */ return; } { /* walk al...
false
false
false
false
false
0
gst_remove_silence_init (GstRemoveSilence * filter, GstRemoveSilenceClass * gclass) { filter->vad = vad_new (DEFAULT_VAD_HYSTERESIS); filter->remove = FALSE; if (!filter->vad) { GST_DEBUG ("Error initializing VAD !!"); return; } gst_remove_silence_reset (filter); }
false
false
false
false
false
0
kvm_vcpu_trigger_posted_interrupt(struct kvm_vcpu *vcpu) { #ifdef CONFIG_SMP if (vcpu->mode == IN_GUEST_MODE) { /* * The vector of interrupt to be delivered to vcpu had * been set in PIR before this function. * * Following cases will be reached in this block, and * we always send a notification event ...
false
false
false
false
false
0
ensure_repository_init( const char *working_directory, int repository_kind, const char *expected_path_index, const char *expected_path_repository, const char *expected_working_directory) { char path_odb[GIT_PATH_MAX]; git_repository *repo; if (gitfo_isdir(working_directory) == GIT_SUCCESS) return GIT_ERROR; ...
false
false
false
false
false
0
makeQualityPssm( bool isApplyMasking ){ if( !isQuality( args.inputFormat ) || isQuality( referenceFormat ) ) return; LOG( "making PSSM..." ); query.resizePssm(); const uchar *seqBeg = query.seqReader(); const uchar *seqEnd = seqBeg + query.finishedSize(); const uchar *q = query.qualityReader(); int *pss...
false
false
false
false
false
0
rb_gzwriter_write(VALUE obj, VALUE str) { struct gzfile *gz = get_gzfile(obj); if (TYPE(str) != T_STRING) str = rb_obj_as_string(str); if (gz->enc2 && gz->enc2 != rb_ascii8bit_encoding()) { str = rb_str_conv_enc(str, rb_enc_get(str), gz->enc2); } gzfile_write(gz, (Bytef*)RSTRING_PTR(str), RSTRING...
false
false
false
false
false
0
find_last_handler_block (StackFrameInfo *frame, MonoContext *ctx, gpointer data) { int i; gpointer ip; FindHandlerBlockData *pdata = data; MonoJitInfo *ji = frame->ji; if (!ji) return FALSE; ip = MONO_CONTEXT_GET_IP (ctx); for (i = 0; i < ji->num_clauses; ++i) { MonoJitExceptionInfo *ei = ji->clauses + i;...
false
false
false
false
false
0
addnsec3param(const unsigned char *salt, size_t salt_len, dns_iterations_t iterations) { dns_dbnode_t *node = NULL; dns_rdata_nsec3param_t nsec3param; unsigned char nsec3parambuf[5 + 255]; dns_rdatalist_t rdatalist; dns_rdataset_t rdataset; dns_rdata_t rdata = DNS_RDATA_INIT; isc_buffer_t b; isc_result_t...
true
true
false
false
false
1
init_godslist(void) { godlink *gl = (godlink *)malloc(sizeof(godlink)); if (gl == NULL) fatal(OUT_OF_MEMORY); gl->name = NULL; /* how to describe the god to the player */ gl->arch = NULL; /* pointer to the archetype of this god */ gl->id = 0; /* id of the god */ gl->next = ...
false
false
false
true
false
1
Play() { if (this->Recording) { this->Stop(); } if (!this->Playing) { this->Initialize(); this->Playing = 1; this->Modified(); this->PlayerThreadId = this->PlayerThreader->SpawnThread((vtkThreadFunctionType)\ &vtkVideoSourcePlayThread,t...
false
false
false
false
false
0
varpanel_refresh (displayd * display, ggobid * gg) { splotd *sp = gg->current_splot; GGobiData *d; if (display) { d = display->d; if (sp != NULL && d != NULL) { if (GGOBI_IS_EXTENDED_DISPLAY (display)) { GGOBI_EXTENDED_DISPLAY_GET_CLASS (display)->varpanel_refresh (display, ...
false
false
false
true
false
1
efx_mdio_set_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) { struct ethtool_cmd prev = { .cmd = ETHTOOL_GSET }; efx->phy_op->get_settings(efx, &prev); if (ecmd->advertising == prev.advertising && ethtool_cmd_speed(ecmd) == ethtool_cmd_speed(&prev) && ecmd->duplex == prev.duplex && ecmd->po...
false
false
false
false
false
0
Write(trpgWriteBuffer &buf) { if (!isValid()) return false; buf.Begin(TRPG_CHILDREF); buf.Add(lod); buf.Add(x); buf.Add(y); buf.Add(addr.file); buf.Add(addr.offset); buf.Add(zmin); buf.Add(zmax); buf.End(); return true; }
false
false
false
false
false
0
brasero_metadata_create_audio_pipeline (BraseroMetadata *self) { BraseroMetadataPrivate *priv; GstPad *audio_pad; priv = BRASERO_METADATA_PRIVATE (self); priv->audio = gst_bin_new (NULL); /* set up the pipeline according to flags */ if (priv->flags & BRASERO_METADATA_FLAG_SILENCES) { priv->prev_level_mes = 0...
false
false
false
false
false
0
gtk_plot_ps_set_size (GtkPlotPS *ps, gint units, gdouble width, gdouble height) { ps->units = units; ps->width = width; ps->height = height;...
false
false
false
false
false
0
ThrowGib (edict_t * self, char *gibname, int damage, int type) { edict_t *gib; vec3_t vd; vec3_t origin; vec3_t size; float vscale; gib = G_Spawn (); VectorScale (self->size, 0.5, size); VectorAdd (self->absmin, size, origin); gib->s.origin[0] = origin[0] + crandom () * size[0]; gib->s.origin[1] =...
false
false
false
false
false
0
tilt_angle_changed(TiltControls *controls) { double theta, phi, dx, dy; if (controls->in_update) return; theta = G_PI/180.0*gtk_adjustment_get_value(GTK_ADJUSTMENT(controls->theta)); phi = G_PI/180.0*gtk_adjustment_get_value(GTK_ADJUSTMENT(controls->phi)); dx = tan(theta)*cos(phi); dy ...
false
false
false
false
false
0
RegisterImage(int type, const char *xpm_data) { g_return_if_fail(xpm_data); XPM xpmImage(xpm_data); RegisterRGBA(type, new RGBAImage(xpmImage)); }
false
false
false
false
false
0
computeLabelSide(int geomIndex, int side) { for(vector<EdgeEnd*>::iterator it=edgeEnds->begin();it<edgeEnds->end();it++) { EdgeEnd *e=*it; if (e->getLabel().isArea()) { int loc=e->getLabel().getLocation(geomIndex,side); if (loc==Location::INTERIOR) { label.setLocation(geomIndex,side,Location::INTERIOR); ...
false
false
false
false
false
0
traverse(struct seq_file *m, loff_t offset) { loff_t pos = 0, index; int error = 0; void *p; m->version = 0; index = 0; m->count = m->from = 0; if (!offset) { m->index = index; return 0; } if (!m->buf) { m->buf = seq_buf_alloc(m->size = PAGE_SIZE); if (!m->buf) return -ENOMEM; } p = m->op->start(...
false
false
false
false
false
0
get_prop_dest_stmt (tree name, tree *final_name_p) { use_operand_p use; gimple use_stmt; do { /* If name has multiple uses, bail out. */ if (!single_imm_use (name, &use, &use_stmt)) return NULL; /* If this is not a trivial copy, we found it. */ if (!gimple_assign_ssa_name_copy_p (use_stm...
false
false
false
false
false
0
removeImage(HTMLImageElementImpl *image) { // Remove instances of this image from both lists. m_imageLoadEventDispatchSoonList.removeAll(image); m_imageLoadEventDispatchingList.removeAll(image); if (m_imageLoadEventDispatchSoonList.isEmpty() && m_imageLoadEventTimer) { killTimer(m_imageLoadEvent...
false
false
false
false
false
0
sync_tod_with_servertime(void) { #if NO_X11 RAWFB_RET_VOID return; #else static Atom ticker_atom = None; XEvent xev; char diff[128]; static int seq = 0; static unsigned long xserver_ticks = 1; int i, db = 0; RAWFB_RET_VOID if (atom_NET_ACTIVE_WINDOW == None) { atom_NET_ACTIVE_WINDOW = XInternAtom(dpy, "_N...
false
false
false
false
false
0
dnsmasq_state_changed_cb (NMDnsMasqManager *manager, guint32 status, gpointer user_data) { NMDevice *self = NM_DEVICE (user_data); switch (status) { case NM_DNSMASQ_STATUS_DEAD: nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_SHARED_START_FAILED); break; default: break; } }
false
false
false
false
false
0
WidestLineWidth(Surface *surface, ViewStyle &vs, int styleOffset, const StyledText &st) { int widthMax = 0; size_t start = 0; while (start < st.length) { size_t lenLine = st.LineLength(start); int widthSubLine; if (st.multipleStyles) { widthSubLine = WidthStyledText(surface, vs, styleOffset, st.text + start...
false
false
false
false
false
0
handle_source_data(CMD_Request *rx_message, CMD_Reply *tx_message) { RPT_SourceReport report; struct timeval now_corr; /* Get data */ LCL_ReadCookedTime(&now_corr, NULL); if (SRC_ReportSource(ntohl(rx_message->data.source_data.index), &report, &now_corr)) { switch (SRC_GetType(ntohl(rx_message->data.sour...
false
false
false
false
false
0
exif_content_foreach_entry (ExifContent *content, ExifContentForeachEntryFunc func, void *data) { unsigned int i; if (!content || !func) return; for (i = 0; i < content->count; i++) func (content->entries[i], data); }
false
false
false
false
false
0
gst_byte_writer_init_with_buffer (GstByteWriter * writer, GstBuffer * buffer, gboolean initialized) { g_return_if_fail (GST_IS_BUFFER (buffer) && gst_buffer_is_writable (buffer)); gst_byte_writer_init_with_data (writer, GST_BUFFER_DATA (buffer), GST_BUFFER_SIZE (buffer), initialized); }
false
false
false
false
false
0
fill_terrain_info(void) { int i, j; ox = MAX(p_ptr->px - MAX_PF_RADIUS / 2, 0); oy = MAX(p_ptr->py - MAX_PF_RADIUS / 2, 0); ex = MIN(p_ptr->px + MAX_PF_RADIUS / 2 - 1, DUNGEON_WID); ey = MIN(p_ptr->py + MAX_PF_RADIUS / 2 - 1, DUNGEON_HGT); for (i = 0; i < MAX_PF_RADIUS * MAX_PF_RADIUS; i++) terrain[0][i] = -...
false
false
false
false
false
0
ath10k_wmi_op_gen_peer_create(struct ath10k *ar, u32 vdev_id, const u8 peer_addr[ETH_ALEN], enum wmi_peer_type peer_type) { struct wmi_peer_create_cmd *cmd; struct sk_buff *skb; skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd)); if (!skb) return ERR_PTR(-ENOMEM); cmd = (struct wmi_peer_create_cmd ...
false
false
false
false
false
0
getUserDataPath() const { #if QT_VERSION < 0x050000 QString dataPath = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation) + "/chessdata"; #else QString dataPath = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) + "/chessdata"; #endif return dataPath; }
false
false
false
false
false
0