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
IPrcWrite(pfPrcHelper* prc) { pfGUIDialogMod::IPrcWrite(prc); prc->startTag("PopUpParams"); prc->writeParam("Margin", fMargin); prc->writeParam("Alignment", fAlignment); prc->endTag(true); prc->writeSimpleTag("MenuItems"); for (size_t i=0; i<fMenuItems.getSize(); i++) { prc->startT...
false
false
false
false
false
0
FieldCollector( void *pBareOp, char **papszList ) { swq_expr_node *op = (swq_expr_node *) pBareOp; /* -------------------------------------------------------------------- */ /* References to tables other than the primarily are currently */ /* unsupported. Err...
false
false
false
false
false
0
GetRuleTable(GrpLineAndFile & lnf, std::string staTableName) { GdlRuleTable * prultbl = FindRuleTable(staTableName); if (prultbl) return prultbl; // Create a new one, if permissible. Symbol psymTableName = g_cman.SymbolTable()->FindSymbol(staTableName); Assert(psymTableName); if (!psymTableName || !psymTable...
false
false
false
false
false
0
upcastToImageNode() const { return (fNodeType == plVault::kNodeImage) ? (plVaultImageNode*)this : NULL; }
false
false
false
false
false
0
render_custom (GsdOsdDrawContext *ctx, cairo_t *cr, double _x0, double _y0, double width, double height) { GdkPixbuf *pixbuf; int icon_size; ...
false
false
false
false
false
0
indent(struct twojson *j) { size_t indent = j->indent; while (indent--) j->out(j->ctx, "\t"); }
false
false
false
false
false
0
pf_fuel_map_path(struct pf_map *pfm, struct tile *ptile) { struct pf_fuel_map *pffm = PF_FUEL_MAP(pfm); if (same_pos(ptile, pfm->params.start_tile)) { return pf_path_new_to_start_tile(pf_map_parameter(pfm)); } else if (pf_fuel_map_iterate_until(pffm, ptile)) { retu...
false
false
false
false
false
0
complete_set_fields (GkmTransaction *transaction, GObject *obj, gpointer user_data) { GkmSecretItem *self = GKM_SECRET_ITEM (obj); GHashTable *old_fields = user_data; if (gkm_transaction_get_failed (transaction)) { if (self->fields) g_hash_table_unref (self->fields); self->fields = old_fields; } else { gk...
false
false
false
false
false
0
static_class (gamgi_window *window) { GtkWidget *dialog = window->dialog0; GtkWidget *entry; GtkWidget *button; GtkWidget *combo; const char *name; int row; /********************************************************** * All mode: look for a window * * Object mode: look first for a window, t...
false
false
false
false
false
0
addrinfo_getnameinfo(int argc, VALUE *argv, VALUE self) { rb_addrinfo_t *rai = get_addrinfo(self); VALUE vflags; char hbuf[1024], pbuf[1024]; int flags, error; rb_scan_args(argc, argv, "01", &vflags); flags = NIL_P(vflags) ? 0 : NUM2INT(vflags); if (rai->socktype == SOCK_DGRAM) fl...
true
true
false
false
false
1
cp_usb_async_write(struct cp_usb_async *cp, uint8_t mask, uint8_t value) { int p; uint16_t gpio_set; int ret; if (cp->set) { value = (cp->value & ~mask) | (value & mask); mask = value ^ cp->value; } cp->set = 1; cp->value = value; gpio_set = ((uint16_t) value << 8) | mask; if (cp->p == MAX_OUTSTANDING) ...
false
false
false
false
false
0
buf_read(const char *path) { struct stat st; int fd, size; char *buf, *t; if (stat(path, &st) < 0) return NULL; if (st.st_size == 0) { if (!_is_virtual(st.st_dev)) return NULL; st.st_size = st.st_blksize; } if (_is_virtual(st.st_dev)) st.st_size = st.st_blksize; t = buf = malloc(st.st_size); if (bu...
false
false
false
false
false
0
html_context_new (HtmlParser * parser, gpointer user_data) { HtmlContext *ctxt = (HtmlContext *) g_new0 (HtmlContext, 1); ctxt->parser = parser; ctxt->user_data = user_data; ctxt->buf = g_string_new (NULL); return ctxt; }
false
false
false
false
false
0
find_best_colors ( gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, int minc0, int minc1, int minc2, int numcolors, JSAMPLE colorlist[], JSAMPLE bestcolor[]) /* Find the closest colormap entry for each cell in the update box, * given the list of candidate colors prepared by find_nearby_color...
false
false
false
false
false
0
cpl_column_get_data_array_const(const cpl_column *column) { cpl_type type = cpl_column_get_type(column); if (column == 0x0) { cpl_error_set_where_(); return NULL; } if (type & CPL_TYPE_POINTER) return (const cpl_array **)column->values->array; cpl_error_set_(CPL_ERROR_TY...
false
false
false
false
false
0
__scsi_put_command(struct Scsi_Host *shost, struct scsi_cmnd *cmd) { unsigned long flags; if (unlikely(list_empty(&shost->free_list))) { spin_lock_irqsave(&shost->free_list_lock, flags); if (list_empty(&shost->free_list)) { list_add(&cmd->list, &shost->free_list); cmd = NULL; } spin_unlock_irqrestore(&...
false
false
false
false
false
0
initsigs(void) { #ifdef SIGPIPE PyOS_setsig(SIGPIPE, SIG_IGN); #endif #ifdef SIGXFZ PyOS_setsig(SIGXFZ, SIG_IGN); #endif #ifdef SIGXFSZ PyOS_setsig(SIGXFSZ, SIG_IGN); #endif PyOS_InitInterrupts(); /* May imply initsignal() */ if (PyErr_Occurred()) { Py_FatalError("Py_Initialize: can't import...
false
false
false
false
false
0
akiko_nvram_read (int offset) { uae_u32 v = 0; switch (offset) { case 0: if (!scl_dir) v |= scl_in ? 0x80 : 0x00; else v |= scl_out ? 0x80 : 0x00; if (!sda_dir) v |= sda_in ? 0x40 : 0x00; else v |= sda_out ? 0x40 : 0x00; break; case 2: v |= scl_dir ? 0x80 : 0x00; v |= sda_dir ? 0x40 : 0x0...
false
false
false
false
false
0
_gcry_twofish_ctr_enc(void *context, unsigned char *ctr, void *outbuf_arg, const void *inbuf_arg, size_t nblocks) { TWOFISH_context *ctx = context; unsigned char *outbuf = outbuf_arg; const unsigned char *inbuf = inbuf_arg; unsigned char tmpbuf[TWOFISH_BLOCKSIZE]; unsigned int burn, burn_stack_depth =...
true
true
false
false
false
1
file_tell_callback_(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data) { FLAC__off_t offset; (void)client_data; offset = ftello(encoder->private_->file); if(offset < 0) { return FLAC__STREAM_ENCODER_TELL_STATUS_ERROR; } else { *absolute_byte_offset = (FLAC__uint64)of...
false
false
false
false
false
0
parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr) { struct predicate *our_pred; struct time_val tval; enum comparison_type comp; const char *timearg, *orig_timearg; const char *errmsg = "arithmetic overflow while converting %s " "days to a number of seconds"; struct timespec orig...
false
false
false
false
false
0
ipvlan_handle_mode_l3(struct sk_buff **pskb, struct ipvl_port *port) { void *lyr3h; int addr_type; struct ipvl_addr *addr; struct sk_buff *skb = *pskb; rx_handler_result_t ret = RX_HANDLER_PASS; lyr3h = ipvlan_get_L3_hdr(skb, &addr_type); if (!lyr3h) goto out; addr = ipvlan_addr_lookup(port, lyr3h, a...
false
false
false
false
false
0
_build_trace_string(zval **frame TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */ { char *s_tmp, **str; int *len, *num; long line; HashTable *ht = Z_ARRVAL_PP(frame); zval **file, **tmp; str = va_arg(args, char**); len = va_arg(args, int*); num = va_arg(args, int*); s_tmp = emalloc(1...
false
false
false
false
false
0
get_fields_chosen() const { type_list_field_items list_fields; //Field: Glib::RefPtr<Gtk::TreeSelection> refTreeSelection = m_treeview->get_selection(); if(!refTreeSelection) return list_fields; //Relationship: //Note that a null relationship means that the parent table was selected instead. sha...
false
false
false
false
false
0
open_scanner(Epson_Scanner *s) { SANE_Status status = 0; DBG(7, "%s: %s\n", __func__, s->hw->sane.name); if (s->fd != -1) { DBG(5, "scanner is already open: fd = %d\n", s->fd); return SANE_STATUS_GOOD; /* no need to open the scanner */ } if (s->hw->connection == SANE_EPSON_NET) { unsigned char buf[5]; ...
false
false
false
false
false
0
tree_dir_next_posix(struct tree *t) { int r; const char *name; size_t namelen; if (t->d == NULL) { #if defined(HAVE_READDIR_R) size_t dirent_size; #endif #if defined(HAVE_FDOPENDIR) t->d = fdopendir(tree_dup(t->working_dir_fd)); #else /* HAVE_FDOPENDIR */ if (tree_enter_working_dir(t) == 0) { t->d = open...
false
false
false
false
false
0
MG_check_alignment(AW_window *aww,int fast) { AWUSE(aww); // check type and names !!!! char result[1024]; result[0] = 0; if (!fast){ aw_openstatus("Checking alignments"); sleep(1); } GB_begin_transaction(GLOBAL_gb_dest); GB_begin_transaction(GLOBAL_gb_merge); char **n...
false
false
false
false
false
0
vhx_inireg (dict, pt_paini) struct beden **dict ; struct paini *pt_paini; { char *sig_name ; char *ins_name ; void *pt_sig ; struct ptype *pt_depend; unsigned char *pt_curval; /* ###------------------------------------------------------### */ /* for each pai...
false
false
false
false
true
1
emboss_getoptions(char *pgm, int argc, char *argv[]) { AjPStr matrixtype = NULL; AjPStr treetype=NULL; long inseed0 = 0; putchar('\n'); jumble = false; lower = false; outgrno = 1; outgropt = false; replicates = false; trout = true; upper = false; printdata = false; progress = true; treeprin...
false
false
false
false
false
0
RemoveProperty (const char* pKey,unsigned int type, unsigned int index ) { ai_assert(NULL != pKey); for (unsigned int i = 0; i < mNumProperties;++i) { aiMaterialProperty* prop = mProperties[i]; if (prop && !strcmp( prop->mKey.data, pKey ) && prop->mSemantic == type && prop->mIndex == index) { // De...
false
false
false
false
false
0
luaS_hash (const char *str, size_t l, unsigned int seed) { unsigned int h = seed ^ cast(unsigned int, l); size_t l1; size_t step = (l >> LUAI_HASHLIMIT) + 1; for (l1 = l; l1 >= step; l1 -= step) h = h ^ ((h<<5) + (h>>2) + cast_byte(str[l1 - 1])); return h; }
false
false
false
false
false
0
varCount(const QByteArray &var) const { int n = 0; for(ConstIterator it = begin(); it != end(); ++it) { if((*it).var == var) ++n; } return n; } }
false
false
false
false
false
0
return_response() { int reading; int writing; fd_set readfds; fd_set writefds; int maxfd; int r; struct buffer* readbuf; struct buffer* writebuf; struct buffer* newbuf; int f; if (fcntl(CGIOUT, F_SETFL, O_NONBLOCK) < 0) die(errno, "fcntl"); f = fcntl(CGIOUT, F_GETFL); reading = 1; read...
false
false
false
false
true
1
requestMessageBox(int _type, const QString& text, const QString& caption, const QString& buttonYes, const QString& buttonNo, const QString& iconYes, const QString& iconNo, const QString& dontAskAgainName...
false
false
false
false
false
0
isSubclassOrImplements (Block *b) { if (this == b) { return true ; } if (isSuperBlock (b)) { return true ; } if (b->type == T_INTERFACE) { Block *blk = this ; while (blk != NULL) { if (blk->implementsInterface (b)) { return true ; ...
false
false
false
false
false
0
open (const ACE_TCHAR *fifo_name, int flags, mode_t perms, int persistent, LPSECURITY_ATTRIBUTES sa) { ACE_TRACE ("ACE_FIFO_Recv::open"); if (ACE_FIFO::open (fifo_name, ACE_NONBLOCK | flags, perms, sa) == -1) return -1; else ...
false
false
false
false
false
0
activity_proxy_update (EActivityProxy *proxy) { EActivity *activity; EActivityState state; GCancellable *cancellable; const gchar *icon_name; gboolean sensitive; gboolean visible; gchar *description; activity = e_activity_proxy_get_activity (proxy); if (activity == NULL) { gtk_widget_hide (GTK_WIDGET (prox...
false
false
false
false
false
0
handle_alias(int *argcp, const char ***argv) { int envchanged = 0, ret = 0, saved_errno = errno; const char *subdir; int count, option_count; const char **new_argv; const char *alias_command; char *alias_string; int unused_nongit; subdir = setup_git_directory_gently(&unused_nongit); alias_command = (*argv)[0...
false
false
false
false
false
0
data_book_initable_init (GInitable *initable, GCancellable *cancellable, GError **error) { EBookBackend *backend; EDataBook *book; book = E_DATA_BOOK (initable); /* XXX If we're serving a direct access backend only for the * purpose of catching "respond" cal...
false
false
false
false
false
0
pokey_potgo(int chip) { struct POKEYregisters *p = &pokey[chip]; int pot; LOG(("POKEY #%d pokey_potgo\n", chip)); p->ALLPOT = 0xff; for( pot = 0; pot < 8; pot++ ) { p->POTx[pot] = 0xff; if( p->pot_r[pot] ) { int r = (*p->pot_r[pot])(pot); LOG(("POKEY #%d pot_r(%d) returned $...
false
false
false
false
false
0
qla4_83xx_wait_for_loopback_config_comp(struct scsi_qla_host *ha, int wait_for_link) { int status = QLA_SUCCESS; if (!wait_for_completion_timeout(&ha->idc_comp, (IDC_COMP_TOV * HZ))) { ql4_printk(KERN_INFO, ha, "%s: IDC Complete notification not received, Waiting for another %d timeout", __func__, h...
false
false
false
false
false
0
pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error) { xmlChar *rel; gboolean primary_bool; GDataGDOrganizationPrivate *priv = GDATA_GD_ORGANIZATION (parsable)->priv; /* Is it the primary organisation? */ if (gdata_parser_boolean_from_property (root_node, "p...
false
false
false
false
false
0
gftp_add_bookmark (gftp_bookmarks_var * newentry) { gftp_bookmarks_var * preventry, * folderentry, * endentry; char *curpos; if (!newentry->protocol) newentry->protocol = g_strdup ("FTP"); /* We have to create the folders. For example, if we have Debian Sites/Debian, we have to create a Debian Sites...
false
false
false
true
false
1
create_foreignscan_plan(PlannerInfo *root, ForeignPath *best_path, List *tlist, List *scan_clauses) { ForeignScan *scan_plan; RelOptInfo *rel = best_path->path.parent; Index scan_relid = rel->relid; Oid rel_oid = InvalidOid; Bitmapset *attrs_used = NULL; ListCell *lc; int i; Assert(rel->fdwroutin...
false
false
false
false
false
0
PM_trace(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end) { if (pm_passent && pm_passent->health > 0) return gi.trace(start, mins, maxs, end, pm_passent, MASK_PLAYERSOLID); else return gi.trace(start, mins, maxs, end, pm_passent, MASK_DEADSOLID); }
false
false
false
false
false
0
ExpandIntRes_SIGN_EXTEND_INREG(SDNode *N, SDValue &Lo, SDValue &Hi) { DebugLoc dl = N->getDebugLoc(); GetExpandedInteger(N->getOperand(0), Lo, Hi); EVT EVT = cast<VTSDNode>(N->getOperand(1))->getVT(); if (EVT.bitsLE(Lo.getValueType())) { // sext_inreg the low part if needed. Lo = DAG.getNode(ISD::SIGN_...
false
false
false
false
false
0
modify_switch_entries(modify_context *mc,backend *be) { ldbm_instance *inst = (ldbm_instance *) be->be_instance_info; int ret = 0; if (mc->old_entry!=NULL && mc->new_entry!=NULL) { ret = cache_replace(&(inst->inst_cache), mc->old_entry, mc->new_entry); if (ret == 0) mc->new_entry_in_cache = 1; } r...
false
false
false
false
false
0
on_next_transfer (gftp_transfer * tdata) { intptr_t refresh_files; gftp_file * tempfle; tdata->next_file = 0; for (; tdata->updfle != tdata->curfle; tdata->updfle = tdata->updfle->next) { tempfle = tdata->updfle->data; if (tempfle->done_view || tempfle->done_edit) { if (tempf...
false
false
false
false
false
0
make_out_of_memory() { if (_memo) deref(); _memo = oom_memo; _memo->_refcount++; _data = _memo->_real_data; _length = 0; }
false
false
false
false
false
0
paint_scale() { double i,j; double di,dj; double dim; //mantissa of di char str[100]; // printf("nr=%d, freq=%lf\n",nr,f); if (!i_GC) i_GC = Gdk::GC::create( get_window() ); di = (double)sampnr/sampfreq/10.0; for(dim=di;dim>=10.0;dim/=10.0); for(;dim<1.0;dim*=10.0); i...
false
false
false
false
false
0
read_tree_node(fd, byts, idxs, maxidx, startidx, prefixtree, maxprefcondnr) FILE *fd; char_u *byts; idx_T *idxs; int maxidx; /* size of arrays */ idx_T startidx; /* current index in "byts" and "idxs" */ int prefixtree; /* TRUE for reading PREFIXTREE */ int maxprefcondnr; ...
false
false
false
false
false
0
tryToOpenWallet() { DEBUG_BLOCK //We only want to load the wallet if the user has enabled features //that require a user/pass if( ( m_enableProvider ) && ( !m_ignoreWallet ) ) { debug() << "Opening wallet"; //Open wallet unless explicitly told not to m_wallet = KWallet::Wal...
false
false
false
false
false
0
MakeCopy( const TemplateString& name_of_copy, UnsafeArena* arena) { if (template_global_dict_owner_ != this) { // We're not at the root, which is illegal. return NULL; } return InternalMakeCopy(name_of_copy, arena, NULL, template_global_dict_owner_); }
false
false
false
false
false
0
readwbmp(int (*getin) (void *in), void *in, Wbmp **return_wbmp) { int row, col, byte, pel, pos; Wbmp *wbmp; if((wbmp = (Wbmp *)gdMalloc(sizeof(Wbmp))) == NULL) { return -1; } wbmp->type = getin(in); if(wbmp->type != 0) { gdFree(wbmp); return -1; } if(skipheader(getin, in)) { gdFree(wbmp); return -1...
false
false
false
false
false
0
pnfs_register_layoutdriver(struct pnfs_layoutdriver_type *ld_type) { int status = -EINVAL; struct pnfs_layoutdriver_type *tmp; if (ld_type->id == 0) { printk(KERN_ERR "NFS: %s id 0 is reserved\n", __func__); return status; } if (!ld_type->alloc_lseg || !ld_type->free_lseg) { printk(KERN_ERR "NFS: %s Layout ...
false
false
false
false
false
0
gst_message_set_seqnum (GstMessage * message, guint32 seqnum) { g_return_if_fail (GST_IS_MESSAGE (message)); GST_MESSAGE_SEQNUM (message) = seqnum; }
false
false
false
false
false
0
tabBarWidthForMaxChars( int maxLength ) { int hframe, overlap; hframe = tabBar()->style()->pixelMetric( QStyle::PM_TabBarTabHSpace, 0L, tabBar() ); overlap = tabBar()->style()->pixelMetric( QStyle::PM_TabBarTabOverlap, 0L, tabBar() ); const QFontMetrics fm = tabBar()->fontMetrics(); int x = 0; for ( int i...
false
false
false
false
false
0
SearchApplyCloningBlock(Block *pHeadBlk) { Block *pBlk = pHeadBlk; Block *pRetBlk = NULL; while(pBlk != NULL){ if(pBlk->applyFlexCloning){ pRetBlk = pBlk; break; } if(pBlk->inner != NULL){ pRetBlk = SearchApplyCloningBlock(pBlk->inner); if(pRetBlk != NULL){ break; } } } ...
false
false
false
false
false
0
real_timer_callback(void) { double time_until_next_call = 1.0; voteinfo_queue_check_removed(); { double autoconnect_time = try_to_autoconnect(); time_until_next_call = MIN(time_until_next_call, autoconnect_time); } if (C_S_RUNNING != client_state()) { return time_until_next_call; } { d...
false
false
false
false
false
0
sm_await_intr_cb(struct libusb_transfer *transfer) { struct fpi_ssm *ssm = transfer->user_data; struct fp_img_dev *dev = ssm->priv; if (transfer->status != LIBUSB_TRANSFER_COMPLETED) { g_free(transfer->buffer); fpi_ssm_mark_aborted(ssm, transfer->status); return; } fp_dbg("interrupt received: %02x %02x %02...
false
false
false
false
false
0
canonicalize_for_substitution (tree node) { /* For a TYPE_DECL, use the type instead. */ if (TREE_CODE (node) == TYPE_DECL) node = TREE_TYPE (node); if (TYPE_P (node) && TYPE_CANONICAL (node) != node && TYPE_MAIN_VARIANT (node) != node) { tree orig = node; /* Here we want to strip...
false
false
false
false
false
0
createFile( FLMUINT uiFileNum, FLMBYTE * pucSerialNum, FLMBYTE * pucNextSerialNum, FLMBOOL bKeepSignature) { RCODE rc = FERR_OK; char szRflFileName[ F_PATH_MAX_SIZE]; flmAssert( m_pFile); // Better not be trying to create the current file flmAssert( uiFileNum != m_pCurrentBuf->uiCurrFileNum); // If ...
false
false
false
false
true
1
M_memSize() { size_t size; int i; size = 0; for (i=1; i<=MAXMEM; i++) if ( mstack[i].ptr ) size += mstack[i].size; return size; }
false
true
false
false
false
1
UpdateLink( void *theEnv, void *buf, long obji) { long *blink; blink = (long *) buf; ObjectBinaryData(theEnv)->LinkArray[obji] = DefclassPointer(*blink); }
false
false
false
false
false
0
lg_SetPrivateKeyAttribute(LGObjectCache *obj, CK_ATTRIBUTE_TYPE type, const void *value, unsigned int len, PRBool *writePrivate) { NSSLOWKEYPrivateKey *privKey; NSSLOWKEYDBHandle *keyHandle; char *nickname = NULL; SECStatus rv; CK_RV crv; /* we can't change the ID and we don't store t...
false
false
false
false
false
0
actionRecyclingFinished() { kDebug(); getRightDialog()->close(); if (m_automaton->isAdmin()) { setCurrentPlayerToFirst(); distributeArmies(); QByteArray buffer; m_automaton->sendMessage(buffer,ShowArmiesToPlace); clear(); QByteArray buffer2; m_automaton->sendMessage(buffer2,StartLo...
false
false
false
false
false
0
nvme_unmap_data(struct nvme_dev *dev, struct request *req) { struct nvme_iod *iod = blk_mq_rq_to_pdu(req); enum dma_data_direction dma_dir = rq_data_dir(req) ? DMA_TO_DEVICE : DMA_FROM_DEVICE; if (iod->nents) { dma_unmap_sg(dev->dev, iod->sg, iod->nents, dma_dir); if (blk_integrity_rq(req)) { if (!rq_data...
false
false
false
false
false
0
on_cme__spinbutton_framerate_changed (GtkEditable *editable, GapCmeGlobalParams *gpp) { GtkAdjustment *adj; if(gap_debug) printf("CB: on_cme__spinbutton_framerate_changed\n"); if(gpp == NULL) return; adj = GTK_ADJUSTMENT(gpp->cme__spinbutton_framerate_adj); if(adj...
false
false
false
false
false
0
ooOnReceivedTerminalCapabilitySetAck(OOH323CallData* call) { int ret = OO_OK; call->localTermCapState = OO_LocalTermCapSetAckRecvd; if(call->remoteTermCapState != OO_RemoteTermCapSetAckSent) return OO_OK; if(call->masterSlaveState == OO_MasterSlave_Idle) { ret = ooSendMasterSlaveDeterminatio...
false
false
false
false
false
0
oid_rt_pro_read_rf_reg_hdl(struct oid_par_priv *poid_par_priv) { struct _adapter *Adapter = (struct _adapter *) (poid_par_priv->adapter_context); struct rf_reg_param *pbbreg; u8 path; u8 offset; u32 value; if (poid_par_priv->type_of_oid != QUERY_OID) return RNDIS_STATUS_NOT_ACCEPTED; if (poid_par_priv-...
false
false
false
false
false
0
sram_test_word(const struct lanai_dev *lanai, int offset, u32 pattern) { u32 readback; sram_write(lanai, pattern, offset); readback = sram_read(lanai, offset); if (likely(readback == pattern)) return 0; printk(KERN_ERR DEV_LABEL "(itf %d): SRAM word at %d bad: wrote 0x%X, read 0x%X\n", lanai->numb...
false
false
false
false
false
0
ModifySkillSpecial(int sk, char *special) { if(sk < 0 || sk > (NSKILLS-1)) return; if (special && (FindSpecial(special) == NULL)) return; SkillDefs[sk].special = special; }
false
false
false
false
false
0
cardStateMayHaveChanged() { CKYStatus status; log->log("calling IsConnected\n"); if( !CKYCardConnection_IsConnected(conn) ) { return true; } log->log("IsConnected returned false\n"); // If the card has been removed or reset, this call will fail. unsigned long cardState; CKYBuffer a...
false
false
false
false
false
0
next(void) { // if we have cached break positions and we're still in the range // covered by them, just move one step forward in the cache if (fCachedBreakPositions != NULL) { if (fPositionInCache < fNumCachedBreakPositions - 1) { ++fPositionInCache; int32_t pos = fCachedBrea...
false
false
false
false
false
0
handle_cli_data_get(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { struct ast_data_query query = { .version = AST_DATA_QUERY_VERSION }; struct ast_data *tree; switch (cmd) { case CLI_INIT: e->command = "data get"; e->usage = "" "Usage: data get <path> [<search> [<filter>]]\n" " Ge...
false
false
false
false
false
0
mr(void){R *t&&*t!=';'&&*t!=')'&&*t!=']'&&*t!='}'&&*t!=ELSE;}
false
false
false
false
false
0
GDALComputeRasterStatistics( GDALRasterBandH hBand, int bApproxOK, double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev, GDALProgressFunc pfnProgress, void *pProgressData ) { VALIDATE_POINTER1( hBand, "GDALComputeRasterStatistics", CE_Failure ); GDALRasterBand *poBand =...
false
false
false
false
false
0
New(double time) { EnsureInitialized("v8::Date::New()"); LOG_API("Date::New"); if (isnan(time)) { // Introduce only canonical NaN value into the VM, to avoid signaling NaNs. time = i::OS::nan_value(); } ENTER_V8; EXCEPTION_PREAMBLE(); i::Handle<i::Object> obj = i::Execution::NewDate(time, &h...
false
false
false
false
false
0
sse_alloc_vjd_deck(int L, int i, int j, int x) { int status; int jp; int sW; int vecs = 0; sse_deck_t *tmp; ESL_DPRINTF3(("alloc_vjd_deck : %.4f\n", size_vjd_deck(L,i,j))); ESL_ALLOC(tmp, sizeof(sse_deck_t)); ESL_ALLOC(tmp->vec, sizeof(__m128 *) * (L+1)); /* always alloc 0..L rows, some of w...
false
true
false
false
true
1
dom_characterdata_data_write(dom_object *obj, zval *newval TSRMLS_DC) { zval value_copy; xmlNode *nodep; nodep = dom_object_get_node(obj); if (nodep == NULL) { php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC); return FAILURE; } if (newval->type != IS_STRING) { if(Z_REFCOUNT_P(newval) > 1) { value_c...
false
false
false
false
false
0
php_ob_buffer_status(php_ob_buffer *ob_buffer, zval *result) { zval *elem; MAKE_STD_ZVAL(elem); array_init(elem); add_assoc_long(elem, "chunk_size", ob_buffer->chunk_size); if (!ob_buffer->chunk_size) { add_assoc_long(elem, "size", ob_buffer->size); add_assoc_long(elem, "block_size", ob_buffer->block_size); ...
false
false
false
false
false
0
fullBasis() const { int i ; int numberBasic=0; for (i=0;i<numStructural_;i++) { Status status = getStructStatus(i); if (status==CoinWarmStartBasis::basic) numberBasic++; } for (i=0;i<numArtificial_;i++) { Status status = getArtifStatus(i); if (status==CoinWarmStartBasis::basic) n...
false
false
false
false
false
0
readIgnoreList (const char *const list) { char* newList = stringCopy (list); const char *token = strtok (newList, IGNORE_SEPARATORS); while (token != NULL) { vString *const entry = vStringNewInit (token); saveIgnoreToken (entry); token = strtok (NULL, IGNORE_SEPARATORS); } eFree (newList); }
false
false
false
false
false
0
cdfOpenFile(const char *filename, const char *mode, int *filetype) { int ncid = -1; #if defined (HAVE_LIBNETCDF) int fmode = tolower(*mode); int writemode = NC_CLOBBER; int readmode = NC_NOWRITE; int status; if ( filename == NULL ) ncid = CDI_EINVAL; else { switch (fmode) { case 'r': ...
false
false
false
false
false
0
int_cleanup_check(int create) { if(cleanup_stack) return 1; if(!create) return 0; cleanup_stack = sk_ENGINE_CLEANUP_ITEM_new_null(); return (cleanup_stack ? 1 : 0); }
false
false
false
false
false
0
parse_subnet_declaration (cfile, share) struct parse *cfile; struct shared_network *share; { const char *val; enum dhcp_token token; struct subnet *subnet; struct iaddr iaddr; unsigned char addr [4]; unsigned len = sizeof addr; isc_result_t status; subnet = (struct subnet *)0; status = subnet_allocate (&sub...
false
false
false
false
false
0
cddb_handle_response_list(cddb_conn_t *c, cddb_disc_t *disc) { char *msg, *line; int code, count; switch (code = cddb_get_response_code(c, &msg)) { case -1: return -1; case 200: /* found exact match */ cddb_log_debug("...exact match"); ...
false
false
false
false
false
0
ensure_mandatory_properties (ECalComponent *comp) { ECalComponentPrivate *priv; priv = comp->priv; g_return_if_fail (priv->icalcomp != NULL); if (!priv->uid) { gchar *uid; uid = e_cal_component_gen_uid (); priv->uid = icalproperty_new_uid (uid); g_free (uid); icalcomponent_add_property (priv->icalcomp...
false
false
false
false
false
0
remove_spaces(char * old) { char * pos1, *pos2, *ret; int num_spaces = 0; pos1 = old; while(*pos1 != '\0') { if(*pos1 == ' ') num_spaces++; pos1++; } if(!num_spaces) return old; ret = malloc(strlen(old) + 1 + 2 * num_spaces); pos1 = old; pos2 = ret; while(*pos1 != '\0...
false
false
false
false
false
0
aboutToShutdown() { if (Utils::Log::warnPluginsCreation()) WARN_FUNC; // Save settings // Disconnect from signals that are not needed during shutdown // Hide UI (if you add UI that is not in the main window directly) // Remove preferences pages to plugins manager object pool if (_prefPag...
false
false
false
false
false
0
receive (Message * msg, /**< [out] Received message. */ bool block) /**< [in] Whether to block thread until message is received. */ { LOG4CPLUS_TRACE(logger, "[encmq::subscriber::receive] ENTER"); zmq_msg_t message; zmq_msg_init(&...
false
false
false
false
false
0
tdb_remove_flags(struct tdb_context *tdb, unsigned flags) { if ((flags & TDB_ALLOW_NESTING) && (flags & TDB_DISALLOW_NESTING)) { tdb->ecode = TDB_ERR_NESTING; TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_remove_flags: " "allow_nesting and disallow_nesting are not allowed together!")); return; } if (flags & TDB...
false
false
false
false
false
0
encx24j600_receive_packet(struct encx24j600_priv *priv, struct rsv *rsv) { struct net_device *dev = priv->ndev; struct sk_buff *skb = netdev_alloc_skb(dev, rsv->len + NET_IP_ALIGN); if (!skb) { pr_err_ratelimited("RX: OOM: packet dropped\n"); dev->stats.rx_dropped++; return -ENOMEM; } skb_reserve(sk...
false
false
false
false
false
0
gnm_bessel_i (gnm_float x, gnm_float alpha) { if (x < 0) { if (alpha != gnm_floor (alpha)) return gnm_nan; return gnm_fmod (alpha, 2) == 0 ? bessel_i (-x, alpha, 1) /* Even for even alpha */ : 0 - bessel_i (-x, alpha, 1); /* Odd for odd alpha */ } else return bessel_i (x, alpha, 1); }
false
false
false
false
false
0
dvb_timer_get_overlap (time_t this_start, time_t this_end, time_t other_start, time_t other_end) { DVBOverlapType result = 0; time_t _tmp0_ = 0; time_t _tmp1_ = 0; _tmp0_ = this_start; _tmp1_ = other_start; if (_tmp0_ <= _tmp1_) { time_t _tmp2_ = 0; time_t _tmp3_ = 0; _tmp2_ = this_end; _tmp3_ = other_sta...
false
false
false
false
false
0
cmdi_open_UNIX (chn_t *ch) { size_t l; struct sockaddr_un a; int on = 1; if ((l = strlen (ch->cf->method.str)) > sizeof(a.sun_path)) { mlpx_printf (CHN_MSG, MF_ERR, "socket path to long (%d)\n", l); return -1; } #ifndef __linux__ a.sun_len = l; #endif a.sun_family = AF_UNIX; strncpy (a.sun_path,...
false
true
false
false
false
1
max77802_rtc_set_time(struct device *dev, struct rtc_time *tm) { struct max77802_rtc_info *info = dev_get_drvdata(dev); u8 data[RTC_NR_TIME]; int ret; ret = max77802_rtc_tm_to_data(tm, data); if (ret < 0) return ret; mutex_lock(&info->lock); ret = regmap_bulk_write(info->max77802->regmap, MAX77802_RTC_...
false
false
false
false
false
0
Brain() { BrainInfoClass brain(DNA[GENE_NUM_NEURODES], DNA[GENE_NUM_LAYERS], DNA[GENE_NUM_INPUTS], DNA[GENE_NUM_OUTPUTS], double(DNA[GENE_TOPO_DIST])/MAX_TOPO_DIST); return brain; }
false
false
false
false
false
0
cosm_set_time(struct cosm_msg *msg) { int rc = do_settimeofday64(&msg->timespec); if (rc) dev_err(&client_spdev->dev, "%s: %d settimeofday rc %d\n", __func__, __LINE__, rc); }
false
false
false
false
false
0
pop() { gamestate_t *oldtop = top; if(top) top = top->next; if(oldtop) { oldtop->leave(); oldtop->manager = 0; log_printf(DLOG, "GameStateManager: Popped state '%s'\n", oldtop->name); } if(top) top->reenter(); }
false
false
false
false
false
0