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
reap(void) { int i, cs; pid_t c; while((c = waitpid(-1, &cs, WNOHANG)) > 0) { for(i = 0; i < ovdb_conf.numrsprocs; i++) { if(c == children[i].pid) { if(children[i].started + 30 > time(NULL)) return 1; children[i].num = 0; if(wholistens == i) wholistens = -1; if((children[i].pid...
false
false
false
false
true
1
setupdemoplayback() { demoheader hdr; string msg; msg[0] = '\0'; defformatstring(file)("demos/%s.dmo", smapname); path(file); demoplayback = opengzfile(file, "rb"); if(!demoplayback) formatstring(msg)("could not read demo \"%s\"", file); else if(demoplayback->read(&hdr, sizeof(demoheader...
false
false
false
false
false
0
getProgramMemory(const Token *tok, unsigned int varid, const ValueFlow::Value &value) { std::map<unsigned int, MathLib::bigint> programMemory; programMemory[varid] = value.intvalue; const std::map<unsigned int, MathLib::bigint> programMemory1(programMemory); int indentlevel = 0; for (const Token *to...
false
false
false
false
false
0
render_proposal_accelerator_func (GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter, GtkSourceCompletion *completion) { gin...
false
false
false
false
false
0
garnier_makemap(const char *input, ajint *map, ajint n) { ajint i; for(i=0;i<n;i++) map[aascii[(ajint)input[i]]]=i; return; }
false
false
false
false
false
0
jme_disable_rx_engine(struct jme_adapter *jme) { int i; u32 val; /* * Disable RX Engine */ jwrite32(jme, JME_RXCS, jme->reg_rxcs); wmb(); val = jread32(jme, JME_RXCS); for (i = JME_RX_DISABLE_TIMEOUT ; (val & RXCS_ENABLE) && i > 0 ; --i) { mdelay(1); val = jread32(jme, JME_RXCS); rmb(); } if (!i) ...
false
false
false
false
false
0
__dispose_buffer(struct journal_head *jh, transaction_t *transaction) { int may_free = 1; struct buffer_head *bh = jh2bh(jh); if (jh->b_cp_transaction) { JBUFFER_TRACE(jh, "on running+cp transaction"); __jbd2_journal_temp_unlink_buffer(jh); /* * We don't want to write the buffer anymore, clear the * bit...
false
false
false
false
false
0
populate (MenuBuilder &builder) { if (doc != NULL) { xmlNodePtr root = xmlDocGetRootElement (doc); if (root != NULL && root->name != NULL && xmlStrEqual (BAD_CAST "toolbar", root->name)) { for (xmlNodePtr child = root->children ; child != NULL; child = child->next) { if (child->type == X...
false
false
false
false
false
0
slotFinished() { Q_D(MultiGetJob); if (!d->findCurrentEntry()) return; if (d->m_redirectionURL.isEmpty()) { // No redirection, tell the world that we are finished. emit result(d->m_currentEntry.id); } d->m_redirectionURL = KUrl(); setError( 0 ); d->m_incomingMetaData.clear(); d->m_activeQueu...
false
false
false
false
false
0
adjustPlayers() { uint oldNbPlayer = _players.count(); uint i; GenericPlayer * player; TRACE("GraphicalGameData::Adjust old %d, new %d ",oldNbPlayer, getNbPlayer()); if( oldNbPlayer > getNbPlayer() ) { for( i = getNbPlayer(); i < oldNbPlayer; i++ ) { player = _players.takeLast(); resetOwnership( player...
false
false
false
false
false
0
compareORFs(const void *dataA, const void *dataB) { MaximalORF *orfA = (MaximalORF*) dataA, *orfB = (MaximalORF*) dataB; gt_assert(orfA && orfB); if (orfA->lengthwithoutstopcodon > orfB->lengthwithoutstopcodon) return -1; else if (orfA->lengthwithoutstopcodon == orfB->lengthwithoutstopcodon) { ...
false
false
false
false
false
0
send_nsc_frame(t30_state_t *s) { /* Only send if there is an NSF message to send. */ if (s->tx_info.nsc && s->tx_info.nsc_len) { span_log(&s->logging, SPAN_LOG_FLOW, "Sending user supplied NSC - %d octets\n", s->tx_info.nsc_len); s->tx_info.nsc[0] = 0xFF; s->tx_info.nsc[1] = 0x03; ...
false
false
false
false
false
0
dbcb_resp_short(uint32_t code, const char *msg) { write_ui32(cstate.writebuf, code); const size_t msglen = strlen(msg); if (msglen != 0) { cstate.writebuf.append_literal("\t1\t"); cstate.writebuf.append(msg, msg + msglen); } else { cstate.writebuf.append_literal("\t1"); } cstate.writebuf.append_...
false
false
false
false
false
0
mx_deform_bow_tie_texture_reset (ClutterTexture *texture) { CoglHandle material; material = clutter_texture_get_cogl_material (texture); if (material) { CoglMatrix matrix; cogl_matrix_init_identity (&matrix); cogl_material_set_layer_matrix (material, 0, &matrix); } }
false
false
false
false
false
0
FindInitTrampolineFromAlloca(Value *TrampMem) { // Strip off at most one level of pointer casts, looking for an alloca. This // is good enough in practice and simpler than handling any number of casts. Value *Underlying = TrampMem->stripPointerCasts(); if (Underlying != TrampMem && (!Underlying->hasOneUs...
false
false
false
false
false
0
pathkeys_contained_in(List *keys1, List *keys2) { switch (compare_pathkeys(keys1, keys2)) { case PATHKEYS_EQUAL: case PATHKEYS_BETTER2: return true; default: break; } return false; }
false
false
false
false
false
0
exit_callback ( GtkAction *act ) { gint w, h; char temp[128]; int loop; /* save task data */ save_all (); /* save window size */ w = 0; h = 0; gdk_window_get_size ( GTK_WIDGET ( main_window )->window, &w, &h ); if ( w != 0 && h != 0 ) { configSetAttributeInt ( CONFIG_MAIN_WINDOW_WIDTH, w ); ...
true
true
false
false
false
1
s5p_jpeg_irq(int irq, void *dev_id) { struct s5p_jpeg *jpeg = dev_id; struct s5p_jpeg_ctx *curr_ctx; struct vb2_v4l2_buffer *src_buf, *dst_buf; unsigned long payload_size = 0; enum vb2_buffer_state state = VB2_BUF_STATE_DONE; bool enc_jpeg_too_large = false; bool timer_elapsed = false; bool op_completed = false...
false
false
false
false
false
0
connectFrom(SoField *field) // //////////////////////////////////////////////////////////////////////// { // Disconnect any previous connection disconnect(); // Check the types of the two fields SoType fieldType = field->getTypeId(); if (getTypeId() != fieldType) { SbBool ret; SoFieldConverter...
false
false
false
false
false
0
fxfromDOS(FXchar*& string,FXint& len){ register FXint f=0,t=0,c; while(f<len && string[f]!='\0'){ if((c=string[f++])!='\r') string[t++]=c; } len=t; if(!FXRESIZE(&string,FXchar,len+1)) return false; string[len]='\0'; return true; }
false
false
false
false
false
0
visitMemoryReference(Instruction &I, Value *Ptr, uint64_t Size, unsigned Align, Type *Ty, unsigned Flags) { // If no memory is being referenced, it doesn't matter if the pointer // is valid. if (Size == 0) return; Value *UnderlyingObject = fin...
false
false
false
false
false
0
Reconnect_action(Widget w, XEvent *event, String *params, Cardinal *num_params) { action_debug(Reconnect_action, event, params, num_params); if (check_usage(Reconnect_action, *num_params, 0, 0) < 0) return; if (CONNECTED || HALF_CONNECTED) { popup_an_error("Already connected"); return; } if (current_host == ...
false
false
false
false
false
0
isBinaryData( const QString &fileName ) { QFile file(fileName); if (!file.open(QIODevice::ReadOnly)) return false; // err, whatever const QByteArray data = file.read(32); return isBufferBinaryData(data); }
false
false
false
false
false
0
get_command_name(xp, idx) expand_T *xp UNUSED; int idx; { if (idx >= (int)CMD_SIZE) # ifdef FEAT_USR_CMDS return get_user_command_name(idx); # else return NULL; # endif return cmdnames[idx].cmd_name; }
false
false
false
false
false
0
bus_service_unlink (BusService *service) { _dbus_assert (service->owners == NULL); /* the service may not be in the hash, if * the failure causing transaction cancel * was in the right place, but that's OK */ _dbus_hash_table_remove_string (service->registry->service_hash, ...
false
false
false
false
false
0
__db_cursor_pp(dbp, txn, dbcp, flags) DB *dbp; DB_TXN *txn; DBC **dbcp; u_int32_t flags; { DB_THREAD_INFO *ip; ENV *env; REGENV *renv; int rep_blocked, ret; env = dbp->env; (*dbcp) = NULL; DB_ILLEGAL_BEFORE_OPEN(dbp, "DB->cursor"); ENV_ENTER(env, ip); XA_CHECK_TXN(ip, txn); /* Check for replication bl...
false
false
false
true
false
1
jp2_read_boxhdr_char( opj_jp2_box_t *box, OPJ_BYTE * p_data, OPJ_UINT32 * p_number_bytes_read, OPJ_UINT32 p_box_max_size, opj_event_mgr_t * p_manager ) { // preconditions assert(p_data != 00); assert(box != 00); assert...
false
false
false
false
false
0
set(PropertyReceiver*, const String&) { Logger::getSingleton().logEvent("ScrolledContainerProperties::ChildExtentsArea property does not support being set.", Errors); }
false
false
false
false
false
0
G_WriteSaveName(int slot, const char *charname) { //char savedir[16]; char *tmpname; boolean retval; savegameslot = slot; // haleyjd: removed special -cdrom treatment, as I believe it is taken // care of automatically via using Choco's savegamedir setting. // haleyjd: free previous path, ...
false
true
false
false
false
1
e_rule_context_create_part (ERuleContext *context, const gchar *name) { EFilterPart *part; g_return_val_if_fail (E_IS_RULE_CONTEXT (context), NULL); g_return_val_if_fail (name != NULL, NULL); part = e_rule_context_find_part (context, name); if (part == NULL) return NULL; return e...
false
false
false
false
false
0
handshake(struct oxu_hcd *oxu, void __iomem *ptr, u32 mask, u32 done, int usec) { u32 result; do { result = readl(ptr); if (result == ~(u32)0) /* card removed */ return -ENODEV; result &= mask; if (result == done) return 0; udelay(1); usec--; } while (usec > 0); return -ETIMEDOUT; }
false
false
false
false
false
0
efivar_data_read(struct efivar_entry *entry, char *buf) { struct efi_variable *var = &entry->var; if (!entry || !buf) return -EINVAL; var->DataSize = 1024; if (efivar_entry_get(entry, &var->Attributes, &var->DataSize, var->Data)) return -EIO; memcpy(buf, var->Data, var->DataSize); return var->DataSize; }
false
true
false
false
false
1
CheckStringsEqual(TestResults& results, char const* expected, char const* actual, TestDetails const& details) { using namespace std; if (strcmp(expected, actual)) { UnitTest::MemoryOutStream stream; stream << "Expected " << expected << " but was " << actual; ...
false
false
false
false
false
0
addEdge(edge_t * de, edge_t * e) { short cnt = ED_count(de); edge_t **el; el = (edge_t **) (ED_to_virt(de)); el = ALLOC(cnt + 1, el, edge_t *); el[cnt] = e; ED_to_virt(de) = (edge_t *) el; ED_count(de)++; }
false
false
false
false
false
0
parseCommand(char* cmd) { //DEBUG2("[DS]: parseCommand >%s<", cmd); char *prev, *next; if (cmd == NULL) { return ; } //skip lines starting with \n and \r if (cmd[0] == '\r') { cmd++; } if (cmd[0] == '\n') { cmd++; } // most common case if (!cmd[0])...
true
true
false
false
false
1
monster_hitrun_att(int dir, object *ob, object *enemy) { if (ob->move_status++ < 25) return dir; else if (ob->move_status < 50) return absdir(dir+4); ob->move_status = 0; return absdir(dir+4); }
false
false
false
false
false
0
check_lhs_vec (nlspec *s) { int v = gretl_vector_get_length(s->lvec); if (v != s->nobs) { fprintf(stderr, "LHS vector should be of length %d, is %d\n", s->nobs, v); return 1; } return 0; }
false
false
false
false
false
0
gx_default_destroy_buf_device(gx_device *bdev) { gx_device *mdev = bdev; if (!gs_device_is_memory(bdev)) { /* bdev must be a plane extraction device. */ mdev = ((gx_device_plane_extract *)bdev)->plane_dev; gs_free_object(bdev->memory, bdev, "destroy_buf_device"); } /* gs_free_ob...
false
false
false
false
false
0
units_em_to_pixels (const gchar *font_name, gfloat em) { ClutterBackend *backend = clutter_get_default_backend (); if (font_name == NULL || *font_name == '\0') return em * _clutter_backend_get_units_per_em (backend, NULL); else { PangoFontDescription *font_desc; gflo...
false
false
false
false
false
0
hw_var_set_bssid(struct rtw_adapter *padapter, u8 *val) { u8 idx = 0; u32 reg_bssid; reg_bssid = REG_BSSID; for (idx = 0; idx < 6; idx++) rtl8723au_write8(padapter, (reg_bssid + idx), val[idx]); }
false
false
false
false
false
0
mirror() const { AIBoard other; other.mCurrent = mCurrent; // Loop rows for (int y=0;y<=5;y++) { ushort tmp = mBoard[y]; ushort ntmp = 0; // Loop coloums for (int x=0; x<=6; x++) { ntmp = ntmp << 2; ntmp |= (tmp >> (x<<1)) & 3; } other.mBoard[y] = ntmp; } return ...
false
false
false
false
false
0
listTypeInitIterator(robj *subject, int index, unsigned char direction) { listTypeIterator *li = zmalloc(sizeof(listTypeIterator)); li->subject = subject; li->encoding = subject->encoding; li->direction = direction; if (li->encoding == REDIS_ENCODING_ZIPLIST) { li->zi = ziplistIndex(subject-...
false
false
false
false
false
0
parse_changes_string(char *str) { int rc; Slapi_Mods *mods; Slapi_Mod mod; char *line, *next; struct berval type, value; struct berval bv_null = {0, NULL}; int freeval = 0; /* allocate mods array */ mods = slapi_mods_new (); if (mods == NULL) return NULL; slapi_mods_init (mods, 16); /* JCMREPL - ONREPL...
false
false
false
false
false
0
initLockedFiles(bool lockFiles) { LockManager::initLockedFiles("fzz", m_fzzFolder, m_fzzFiles, lockFiles ? LockManager::SlowTime : 0); if (lockFiles) { QFileInfoList backupList; LockManager::checkLockedFiles("fzz", backupList, m_fzzFiles, true, LockManager::SlowTime); } }
false
false
false
false
false
0
tpm_pcr_read_dev(struct tpm_chip *chip, int pcr_idx, u8 *res_buf) { int rc; struct tpm_cmd_t cmd; cmd.header.in = pcrread_header; cmd.params.pcrread_in.pcr_idx = cpu_to_be32(pcr_idx); rc = tpm_transmit_cmd(chip, &cmd, READ_PCR_RESULT_SIZE, 0, "attempting to read a pcr value"); if (rc == 0) memcpy(res...
false
true
false
false
false
1
ucma_alloc_multicast(struct ucma_context *ctx) { struct ucma_multicast *mc; mc = kzalloc(sizeof(*mc), GFP_KERNEL); if (!mc) return NULL; mutex_lock(&mut); mc->id = idr_alloc(&multicast_idr, mc, 0, 0, GFP_KERNEL); mutex_unlock(&mut); if (mc->id < 0) goto error; mc->ctx = ctx; list_add_tail(&mc->list, &ct...
false
false
false
false
false
0
stripslash(std::string &in) { std::string result; for (char *s = (char *) in.c_str(); *s && *s != '/'; s++) result.push_back(*s); in = result; }
false
false
false
false
false
0
et_drag_drop (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, ETable *et) { gboolean ret_val; gint row, col; e_table_get_cell_at (et, x, y, &row, &col); if (row != et->drop_row && col != et->drop_row) { g_signal_emit (...
false
false
false
false
false
0
on_navigation_popup_menu (GtkWidget *tv, void *data) { GSQL_TRACE_FUNC; GSQLNavigation *navigation = data; GtkTreePath *path = NULL; GtkTreeViewColumn *column; GtkTreeModel *model; GtkTreeIter iter; GSQLNavigationHandler handler = NULL; model = gtk_tree_view_get_model (GTK_TREE_VIEW (tv)); gtk_tree_view_g...
false
false
false
false
false
0
get_from_reschedule_unknown_list(lListElem *host, u_long32 job_number, u_long32 task_number) { lListElem *ruep = NULL; DENTER(TOP_LAYER, "get_from_reschedule_unknown_list"); for_each(ruep, lGetList(host, EH_reschedule_...
false
false
false
false
false
0
__create_snap(struct dm_pool_metadata *pmd, dm_thin_id dev, dm_thin_id origin) { int r; dm_block_t origin_root; uint64_t key = origin, dev_key = dev; struct dm_thin_device *td; struct disk_device_details details_le; __le64 value; /* check this device is unused */ r = dm_btree_lookup(&pmd->details_info, pmd...
false
false
false
false
false
0
lookup_c_ip(struct ast_context *c, const char *name) { struct ast_ignorepat *ip = NULL; if (ast_rdlock_context(c)) /* error, skip */ return 0; while ( (ip = ast_walk_context_ignorepats(c, ip)) ) if (!strcmp(name, ast_get_ignorepat_name(ip))) break; ast_unlock_context(c); return ip ? -1 /* success */ : 0; }
false
false
false
false
false
0
next_stack_msection ___PVOID { if (stack_msection != 0) words_prev_msections += alloc_stack_start - alloc_stack_ptr; stack_msection = next_msection (heap_msection); alloc_stack_limit = start_of_tospace (stack_msection); alloc_stack_start = alloc_stack_limit + (___MSECTION_SIZE>>1); alloc_stack_ptr = allo...
false
false
false
false
false
0
cacheChunk(FileVaultInfo* info, uint32_t chunk) { unsigned char buffer[info->blockSize]; unsigned char msgDigest[FILEVAULT_MSGDGST_LENGTH]; uint32_t msgDigestLen; if(chunk == info->curChunk) { return; } if(info->dirty) { writeChunk(info); } info->file->seek(info->file, chunk * info->blockSize + info->dat...
true
true
false
false
true
1
slotOk() { QStringList languages; for ( int i = 0, count = d->languageButtons.count(); i < count; ++i ) { KLanguageButton *languageButton = d->languageButtons[i]; languages << languageButton->current(); } if (d->applicationLanguageList() != languages) { QString languageString ...
false
false
false
false
false
0
enqueue_compositor(gs_composite_t **ppcomp_first, gs_composite_t **ppcomp_last, gs_composite_t *pcomp) { if (*ppcomp_last == NULL) { pcomp->prev = pcomp->next = NULL; *ppcomp_last = *ppcomp_first = pcomp; } else { (*ppcomp_last)->next = pcomp; pcomp->prev = *ppcomp_last; ...
false
false
false
false
false
0
PS_Standard_Strings( FT_UInt sid ) { return ( sid < NUM_SID_GLYPHS ? sid_standard_names[sid] : 0 ); }
false
false
false
false
false
0
Load() { if(m_Interfaces.size() == 0) { std::cerr << "Proxy::Load Interface not set" << std::endl; return false; } std::vector<ProxyInterface*>::iterator it = m_Interfaces.begin(); while(it != m_Interfaces.end()) { if((*it)->Fetch()) { return true; } it++; }...
false
false
false
false
false
0
validate_mad(const struct ib_mad_hdr *mad_hdr, const struct ib_mad_qp_info *qp_info, bool opa) { int valid = 0; u32 qp_num = qp_info->qp->qp_num; /* Make sure MAD base version is understood */ if (mad_hdr->base_version != IB_MGMT_BASE_VERSION && (!opa || mad_hdr->base_version != OPA_MGMT_BASE_VERSION)) ...
false
false
false
false
false
0
New_Pam_PassthruSuffix(char *suffix) { Pam_PassthruSuffix *newone = NULL; if (suffix) { newone = (Pam_PassthruSuffix *)slapi_ch_malloc(sizeof(Pam_PassthruSuffix)); /* The passed in suffix should already be normalized. */ newone->pamptsuffix_dn = slapi_sdn_new_normdn_byval(suffix); newone->pamptsuffix_next = N...
false
false
false
false
false
0
CheckExtension() { // Compute the extension. std::string realExt = cmSystemTools::GetFilenameLastExtension(this->FullPath); if(!realExt.empty()) { // Store the extension without the leading '.'. this->Extension = realExt.substr(1); } // Look for object files. if(this->Extension == "obj" |...
false
false
false
false
false
0
draw_sprites(struct mame_bitmap *bitmap,const struct rectangle *cliprect) { int i, offs; /* Let's draw the sprites */ for (i = 0 ; i < 2 ; i++) { unsigned char *ram = &spriteram[i * 0x800]; int sx = 0; int sy = 0; for ( offs = 0 ; offs < 0x100 ; offs++) { int attr = ram[offs + 0x300]; ...
true
true
false
false
false
1
count_lines (char *text) { char *p; for (p = text; *p; p++) { if (*p == '\n') { cb_source_line++; } } }
false
false
false
false
false
0
main(int argc, char *argv[]) { fs_gnu_options(argc, argv, "<kbname>\n"); if (argc != 2) { fprintf(stderr, "Usage: %s <kbname>\n", basename(argv[0])); return 1; } const char *kbname = argv[1]; fs_backend *be = fs_backend_init(kbname, 0); if (!be) { return 1; } ...
false
false
false
false
false
0
gnibbles_worm_rescale (GnibblesWorm *worm, gint tilesize) { int i; gfloat x_pos, y_pos; gint count; ClutterActor *tmp; GError *err = NULL; if (!worm) return; if (!worm->actors) return; count = clutter_group_get_n_children (CLUTTER_GROUP (worm->actors)); for (i = 0; i < count; i++) { tmp...
false
false
false
false
false
0
Init() { m_dirty = true; m_countVirt = 0; m_lineFrom = m_lineTo = (size_t)-1; m_linesPerPage = 0; m_headerWidth = m_lineHeight = 0; m_small_image_list = (wxImageList *) NULL; m_normal_image_list = (wxImageList *) NULL; m_small_spacing = 30; m_normal_spacing = 40; m_ha...
false
false
false
false
false
0
process_term_req (owned_t *object_) { // When shutting down we can ignore termination requests from owned // objects. They are going to be terminated anyway. if (shutting_down) return; // If I/O object is well and alive ask it to terminate. io_objects_t::iterator it = std::find (io_objec...
false
false
false
false
false
0
avtab_hash_eval(struct avtab *h, char *tag) { int i, chain_len, slots_used, max_chain_len; unsigned long long chain2_len_sum; struct avtab_node *cur; slots_used = 0; max_chain_len = 0; chain2_len_sum = 0; for (i = 0; i < h->nslot; i++) { cur = flex_array_get_ptr(h->htable, i); if (cur) { slots_used++; ...
false
false
false
false
false
0
edac_pci_main_kobj_setup(void) { int err; struct bus_type *edac_subsys; edac_dbg(0, "\n"); /* check and count if we have already created the main kobject */ if (atomic_inc_return(&edac_pci_sysfs_refcount) != 1) return 0; /* First time, so create the main kobject and its * controls and attributes */ edac...
false
false
false
false
false
0
correct(PTW_attackstate * state, uint8_t * key, int keylen) { int i; int j; int k; uint8_t keybuf[PTW_KSBYTES]; rc4state rc4state; // We need at least 3 sessions to be somehow certain if (state->sessions_collected < 3) { return 0; } tried++; k = rand()%(state->se...
false
false
false
false
false
0
save_thread_context (MonoContext *ctx) { DebuggerTlsData *tls; tls = mono_native_tls_get_value (debugger_tls_id); g_assert (tls); if (ctx) mono_thread_state_init_from_monoctx (&tls->context, ctx); else mono_thread_state_init_from_current (&tls->context); }
false
false
false
false
false
0
ifuTransmission(cpl_image *image, int startPix, int endPix, double *norm, double *err) { /* char task[] = "ifuTransmission"; */ int nx = cpl_image_get_size_x(image); int ny = cpl_image_get_size_y(image); float *data = cpl_image_get_d...
false
false
false
false
false
0
GrantLock(LOCK *lock, PROCLOCK *proclock, LOCKMODE lockmode) { lock->nGranted++; lock->granted[lockmode]++; lock->grantMask |= LOCKBIT_ON(lockmode); if (lock->granted[lockmode] == lock->requested[lockmode]) lock->waitMask &= LOCKBIT_OFF(lockmode); proclock->holdMask |= LOCKBIT_ON(lockmode); LOCK_PRINT("GrantLoc...
false
false
false
false
false
0
writeDimDiametric(DL_WriterA& dw, const DL_DimensionData& data, const DL_DimDiametricData& edata, const DL_Attributes& attrib) { dw.entity("DIMENSION"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbE...
false
false
false
false
false
0
free_all_trans(tree* t) { long i; for ( i = 0; i < nonodes2; i++ ) t->freetrans[i] = i; t->transindex = nonodes2 - 1; }
false
false
false
false
false
0
mount_op_aborted (GVfsRemoteVolumeMonitor *object, const gchar *arg_dbus_name, const gchar *arg_id, gpointer user_data) { GProxyVolumeMonitor *monitor = G_PROXY_VOLUME_MONITOR (user_data); GProxyVolumeMonitorClass *klass; G_LOCK (proxy_vm); klass = G_PROXY...
false
false
false
false
false
0
bucket_refresh(cqueue_t *unused_cq, void *obj) { struct kbucket *kb = obj; time_delta_t elapsed; g_assert(is_leaf(kb)); (void) unused_cq; /* * To adapt the size of the routing table to the local usage of the node * we do not always record lookups that fall in the bucket: we wish to know * which buckets ar...
false
false
false
false
false
0
m_explore_and_check (pIIR_EnumerationType et, RegionStack &rstack, bool collect_access_info) { if (done(et) & EXPLORED) return 0; else done(et) |= EXPLORED; int enum_count = 0, error_count = 0; // Count number of elements for (pIIR_EnumerationLiteralList ell = et->enumeration_literals; ell; ell = ell->rest) ...
false
false
false
false
false
0
do_set_cmd(MdbSQL *sql, char *s) { char *level1, *level2; level1 = strtok(s, " \t\n"); if (!level1) { printf("Usage: set [stats|showplan|noexec] [on|off]\n"); return; } if (!strcmp(level1,"stats")) { level2 = strtok(NULL, " \t"); if (!level2) { printf("Usage: set stats [on|off]\n"); return; } if ...
false
false
false
false
false
0
iwlagn_mac_sta_notify(struct ieee80211_hw *hw, struct ieee80211_vif *vif, enum sta_notify_cmd cmd, struct ieee80211_sta *sta) { struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); struct iwl_station_priv *sta_priv = (void *)sta->drv_priv; int sta_id; IWL_DEBUG_MAC80211(priv, "enter\n"); switch (c...
false
false
false
false
false
0
mpt_lan_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) { struct net_device *dev = ioc->netdev; struct mpt_lan_priv *priv; if (dev == NULL) return(1); else priv = netdev_priv(dev); dlprintk((KERN_INFO MYNAM ": IOC %s_reset routed to LAN driver!\n", reset_phase==MPT_IOC_SETUP_RESET ? "setup" : ( reset_phas...
false
false
false
false
false
0
clip1(Piste *p1, Piste *p2, float a, float b, float c) { float t=-(p1->x*a+p1->y*b+c)/((p2->y-p1->y)*b+(p2->x-p1->x)*a); t=t<0?0:t>1?1:t; if (p1->x*a+p1->y*b+c<0) p1->x=p1->x+t*(p2->x-p1->x), p1->y=p1->y+t*(p2->y-p1->y); if (p2->x*a+p2->y*b+c<0) p2->x=p1->x+t*(p2->x-p1->x), p2->y=p1->y+t*(p2->y-p1->y); ...
false
false
false
false
false
0
store_parm_decls_newstyle (tree fndecl, const struct c_arg_info *arg_info) { tree decl; c_arg_tag *tag; unsigned ix; if (current_scope->bindings) { error_at (DECL_SOURCE_LOCATION (fndecl), "old-style parameter declarations in prototyped " "function definition"); /* Get rid of the old-style...
false
false
false
false
false
0
git_commit_create( git_oid *oid, git_repository *repo, const char *update_ref, const git_signature *author, const git_signature *committer, const char *message, const git_tree *tree, int parent_count, const git_commit *parents[]) { size_t final_size = 0; int message_length, author_length, committer_...
false
false
false
false
false
0
snd_es1968_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { struct es1968 *chip = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct esschan *chan = runtime->private_data; int size = params_buffer_bytes(hw_params); if (chan->mem...
false
false
false
false
false
0
bitmap_file_unmap(struct bitmap_storage *store) { struct page **map, *sb_page; int pages; struct file *file; file = store->file; map = store->filemap; pages = store->file_pages; sb_page = store->sb_page; while (pages--) if (map[pages] != sb_page) /* 0 is sb_page, release it below */ free_buffers(map[page...
false
false
false
false
false
0
cb_validation_error_action_changed (G_GNUC_UNUSED GtkMenuShell *ignored, FormatState *state) { int index = gtk_combo_box_get_active (state->validation.error.action); gboolean const flag = (index > 0) && (gtk_combo_box_get_active (state->validation.constraint_type) > 0); gtk_widget_set_sensitive (GTK_WIDGE...
false
false
false
false
false
0
ecsshres(void) { return bplcon0_res == RES_SUPERHIRES && (currprefs.chipset_mask & CSMASK_ECS_DENISE) && !(currprefs.chipset_mask & CSMASK_AGA); }
false
false
false
false
false
0
Initialize() { if (this->ExtentLists) { int n = this->NumberOfExtentEntries; for (int i = 0; i < n; i++) { if (this->ExtentLists[i] != &this->ExtentListLengths[n + 2*i]) { delete [] this->ExtentLists[i]; } } delete [] this->ExtentLists; } this->ExtentLis...
false
false
false
false
false
0
figure_type_and_name( const string& h_) { auto tt = agh::str::tokens( h_, "-"); if ( tt.size() == 2 ) { for ( auto& T : _CT_ ) if ( all_of( tt.begin(), tt.end(), [&]( const string& t) { ...
false
false
false
false
false
0
resync_IV(GF_Crypt *mc, u64 BSO, char *salt) { char IV[17]; u64 count; u32 remain; GF_BitStream *bs; count = BSO / 16; remain = (u32) (BSO % 16); /*format IV to begin of counter*/ bs = gf_bs_new(IV, 17, GF_BITSTREAM_WRITE); gf_bs_write_u8(bs, 0); /*begin of counter*/ gf_bs_write_data(bs, salt, 8); gf_bs_wri...
false
false
false
false
true
1
setarrayvector (lua_State *L, Table *t, unsigned int size) { unsigned int i; luaM_reallocvector(L, t->array, t->sizearray, size, TValue); for (i=t->sizearray; i<size; i++) setnilvalue(&t->array[i]); t->sizearray = size; }
false
false
false
false
false
0
TransferParameters( Shuttle & shuttle ) { shuttle.TransferInt(wxT("Threshold"),mThresholdLevel,0); shuttle.TransferInt(wxT("Width"),mClickWidth,0); return true; }
false
false
false
false
false
0
e_canvas_vbox_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { GnomeCanvasItem *item; ECanvasVbox *e_canvas_vbox; item = GNOME_CANVAS_ITEM (object); e_canvas_vbox = E_CANVAS_VBOX (object);...
false
false
false
false
false
0
main(int argc, const char **argv) { const char *usage[] = { "test-parse-options <options>", NULL }; struct option options[] = { OPT_BOOLEAN('b', "boolean", &boolean, "get a boolean"), OPT_BIT('4', "or4", &boolean, "bitwise-or boolean with ...0100", 4), OPT_GROUP(""), OPT_INTEGER('i', "integer", &integ...
false
false
false
false
false
0
cma_city_dlg_callback(struct widget *pButton) { if (Main.event.button.button == SDL_BUTTON_LEFT) { disable_city_dlg_widgets(); popup_city_cma_dialog(pCityDlg->pCity); } return -1; }
false
false
false
false
false
0
load( const string& fname) { ifstream f (fname); if ( not f.good() ) return CHypnogram::TError::nofile; SPage P; size_t saved_pagesize; f >> saved_pagesize; if ( not f.good() ) return CHypnogram::TError::baddata; if ( saved_pa...
false
false
false
false
false
0
check_val_sync(Task *task){ int i,mtno; Boolean flag,delflg; flag = FALSE; for(i=1;i<task->TaskNum;i++){ mtno = task->SortedT[i]; delflg = search_val_no(task,mtno); if(delflg) flag = TRUE; } return(flag); }
false
false
false
false
false
0
ReadFirstChild( GDALJP2Box *poSuperBox ) { szBoxType[0] = '\0'; if( !poSuperBox->IsSuperBox() ) return FALSE; return SetOffset( poSuperBox->nDataOffset ) && ReadBox(); }
false
false
false
false
false
0
set_prop_info(Objid oid, const char *pname, Var info, Objid progr) { Objid new_owner; unsigned new_flags; const char *new_name; enum error e; db_prop_handle h; if (!valid(oid)) e = E_INVARG; else e = validate_prop_info(info, &new_owner, &new_flags, &new_name); if (e != E_NONE) retur...
false
false
false
false
false
0