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
cmd_hyperlink_finalize (GObject *cmd) { CmdHyperlink *me = CMD_HYPERLINK (cmd); if (me->new_style) gnm_style_unref (me->new_style); me->new_style = NULL; if (me->old_styles != NULL) { GSList *l; for (l = me->old_styles ; l != NULL ; l = g_slist_remove (l, l->data)) { CmdHyperlinkOldStyle *os = l->data; ...
false
false
false
false
false
0
dump(ostream&o, unsigned ind) const { o << setw(ind) << "" << "function definition for " << scope_path(scope_) << endl; if (result_sig_) { o << setw(ind+2) << "" << "Return signal: "; if (result_sig_->get_signed()) o << "+"; o << result_sig_->name() << "[" << result_sig_->msb() << ":" ...
false
false
false
false
false
0
Create(Object* value) { isolate_->counters()->global_handles()->Increment(); if (first_free_ == NULL) { first_block_ = new NodeBlock(first_block_); first_block_->PutNodesOnFreeList(&first_free_); } ASSERT(first_free_ != NULL); // Take the first node in the free list. Node* result = first_free_; fi...
false
false
false
false
false
0
omapi_message_new (omapi_object_t **o, const char *file, int line) { omapi_message_object_t *m; omapi_object_t *g; isc_result_t status; m = (omapi_message_object_t *)0; status = omapi_message_allocate (&m, file, line); if (status != ISC_R_SUCCESS) return status; g = (omapi_object_t *)0; status = omapi_gener...
false
false
false
false
false
0
get_parent_name(const TMTag *tag, filetype_id ft_id) { const gchar *scope = tag->atts.entry.scope; const gchar *separator = symbols_get_context_separator(ft_id); const gchar *str, *ptr; if (!scope) return NULL; str = scope; while (1) { ptr = strstr(str, separator); if (ptr) { str = ptr + strlen(sep...
false
false
false
false
false
0
fs_chain_find(format_specific_data* chain, long type) { format_specific_data* cur = chain; while (cur) { if (cur->type == type) { return cur; } cur = cur->next; } return NULL; }
false
false
false
false
false
0
rndis_get_ppi(struct rndis_packet *rpkt, u32 type) { struct rndis_per_packet_info *ppi; int len; if (rpkt->per_pkt_info_offset == 0) return NULL; ppi = (struct rndis_per_packet_info *)((ulong)rpkt + rpkt->per_pkt_info_offset); len = rpkt->per_pkt_info_len; while (len > 0) { if (ppi->type == type) retu...
false
false
false
false
false
0
cavan_display_fill_triangle_dummy(struct cavan_display_device *display, cavan_display_point_t *points, cavan_display_color_t color) { double a[3], b[3]; cavan_display_point_t *p0, *p1, *p2; if (points[0].x < points[1].x) { p0 = points; p1 = points + 1; } else { p0 = points + 1; p1 = points; } if (poi...
false
false
false
false
false
0
ldapsvr_cancel_all_query( LdapServer *server ) { GList *node; cm_return_if_fail( server != NULL ); node = server->listQuery; while( node ) { LdapQuery *qry = node->data; /* Notify thread to stop */ ldapqry_set_stop_flag( qry, TRUE ); /* Now cancel thread */ ldapqry_cancel( qry ); node = g_list_next( n...
false
false
false
false
false
0
aes128_encrypt(uint8_t p_block[AES_BLOCK_SIZE], const uint8_t p_key_schedule[AES128_KEY_SCHEDULE_SIZE]) { uint_fast8_t round; aes_add_round_key(p_block, p_key_schedule); for (round = 1; round < AES128_NUM_ROUNDS; ++round) { aes_sbox_apply_block(p_block); aes_shift_rows(p_block); ...
false
false
false
false
false
0
textbuffer_done(yyscan_t scanner) { char *str = cli_realloc(scanner->buf.data, scanner->buf.pos); if(!str) { str = scanner->buf.data; } scanner->yytext = str; scanner->yylen = scanner->buf.pos - 1; memset(&scanner->buf, 0, sizeof(scanner->buf)); return str...
false
false
false
false
false
0
bitBlastEqn(const Expr& e) { TRACE("bitvector", "bitBlastEqn(", e.toString(), ") {"); d_bvBitBlastEq++; DebugAssert(e.isEq(), "TheoryBitvector::bitBlastEqn:" "expecting an equation" + e.toString()); const Expr& leftBV = e[0]; const Expr& rightBV = e[1]; IF_DEBUG(const Type& leftType = getBase...
false
false
false
false
false
0
pgp_cert_load(certificate_type_t type, va_list args) { chunk_t packet, blob = chunk_empty; pgp_packet_tag_t tag; private_pgp_cert_t *this; while (TRUE) { switch (va_arg(args, builder_part_t)) { case BUILD_BLOB_PGP: blob = va_arg(args, chunk_t); continue; case BUILD_END: break; default: ...
false
false
false
false
false
0
dlite_mem_obj(struct mem_t *mem, /* memory space to access */ int is_write, /* access type */ md_addr_t addr, /* address to access */ char *p, /* input/output buffer */ int nbytes) /* size of access */ { enum mem_cmd cmd; if (!is_write) cmd = Read; else cmd = Write; ...
false
false
false
false
false
0
AppendUniqueVirtualFolder(const wxString &folder) { if (m_VirtualFolders.Index(folder)==wxNOT_FOUND) { m_VirtualFolders.push_back(folder); return true; } else return false; }
false
false
false
false
false
0
read_ushort(FILE *f, unsigned short *x) { unsigned char s[2]; if (fread(s, 1, 2, f) != 2) return false; *x = (s[1] << 8) + s[0]; return true; }
false
false
false
false
false
0
LPConeSetData2(LPCone lpcone,int n, const int ik[],const int cols[],const double vals[]){ int info,i,spot,m=lpcone->m; DSDPVec C; DSDPFunctionBegin; lpcone->n=n; info=DSDPVecCreateSeq(n,&C);DSDPCHKERR(info); lpcone->C=C; info=DSDPVecZero(C);DSDPCHKERR(info); lpcone->muscale=1.0; if (n<100) lpcone->mus...
false
false
false
false
false
0
igb_set_vmvir(struct igb_adapter *adapter, u32 vid, u32 vf) { struct e1000_hw *hw = &adapter->hw; if (vid) wr32(E1000_VMVIR(vf), (vid | E1000_VMVIR_VLANA_DEFAULT)); else wr32(E1000_VMVIR(vf), 0); }
false
false
false
false
false
0
slerp(const FMQuaternion& other, float t) const { float theta, st, sut, sout, interp1, interp2; float dot = x * other.x + y * other.y + z * other.z + w * other.w; if (IsEquivalent(dot, 1.0f)) return *this; // algorithm taken from Shoemake's paper theta = (float) acos(dot); theta = theta < 0.0 ? -t...
false
false
false
false
false
0
goo_canvas_item_simple_is_visible (GooCanvasItem *item) { GooCanvasItemSimple *simple = (GooCanvasItemSimple*) item; GooCanvasItemSimpleData *simple_data = simple->simple_data; if (simple_data->visibility <= GOO_CANVAS_ITEM_INVISIBLE || (simple_data->visibility == GOO_CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLD...
false
false
false
false
false
0
extentCompare(BTKey* vLeft, BTKey* vRight) { HFSPlusExtentKey* left; HFSPlusExtentKey* right; left = (HFSPlusExtentKey*) vLeft; right =(HFSPlusExtentKey*) vRight; if(left->forkType < right->forkType) { return -1; } else if(left->forkType > right->forkType) { return 1; } else { if(left->f...
false
false
false
false
false
0
exclude_set_line_exclude( func_unit* funit, /*!< Pointer to functional unit */ int line, /*!< Line number of expression that needs to be set */ int value, /*!< Specifies if we should exclude (1) or include (0) the specified line */ char* reason, ...
false
false
false
false
false
0
render(float frametime) { int i = 0; if ( !Show_escort_view ) { return; } if ( !Num_escort_ships ) { return; } // hud_set_default_color(); setGaugeColor(); // draw the top of the escort view renderBitmap(Escort_gauges[0].first_frame, position[0], position[1]); renderString(position[0] + header_text_o...
false
false
false
false
false
0
ath10k_htc_wait_target(struct ath10k_htc *htc) { struct ath10k *ar = htc->ar; int i, status = 0; unsigned long time_left; struct ath10k_htc_svc_conn_req conn_req; struct ath10k_htc_svc_conn_resp conn_resp; struct ath10k_htc_msg *msg; u16 message_id; u16 credit_count; u16 credit_size; time_left = wait_for_com...
false
false
false
false
false
0
P_ReadSaveGameHeader(void) { int i; byte a, b, c; char vcheck[VERSIONSIZE]; char read_vcheck[VERSIONSIZE]; // skip the description field /* for (i=0; i<SAVESTRINGSIZE; ++i) saveg_read8(); */ for (i=0; i<VERSIONSIZE; ++i) read_vcheck[i] = saveg_read8(); ...
false
false
false
false
false
0
GetCString(String* str, int index) { int length = str->length(); char* result = NewArray<char>(length + 1); for (int i = index; i < length; i++) { uc16 c = str->Get(i); if (c <= 127) { result[i - index] = static_cast<char>(c); } else { result[i - index] = 127; // Force number parsing to f...
false
false
false
false
false
0
split_string_list(StringList & list, ParmString str) { const char * s0 = str; const char * s1; while (true) { while (*s0 != '\0' && asc_isspace(*s0)) ++s0; if (*s0 == '\0') break; s1 = s0; while (!asc_isspace(*s1)) ++s1; String temp(s0,s1-s0); list.add(temp); if (...
false
false
false
false
false
0
StrDup(const char *zSrc, int nByte){ char *zDest; if( nByte<=0 ){ nByte = strlen(zSrc); } zDest = SafeMalloc( nByte + 1 ); strncpy(zDest,zSrc,nByte); zDest[nByte] = 0; return zDest; }
false
false
false
false
false
0
referint_lock() { if (use_txn) { /* no lock if betxn is enabled */ return; } if (NULL == referint_mutex) { referint_mutex = PR_NewLock(); } if (referint_mutex) { PR_Lock(referint_mutex); } }
false
false
false
false
false
0
PQclear(PGresult *res) { PGresult_data *block; int i; if (!res) return; for (i = 0; i < res->nEvents; i++) { /* only send DESTROY to successfully-initialized event procs */ if (res->events[i].resultInitialized) { PGEventResultDestroy evt; evt.result = res; (void) res->events[i].proc(PGEVT_RES...
false
false
false
false
false
0
mailmbox_init(const char * filename, int force_readonly, int force_no_uid, uint32_t default_written_uid, struct mailmbox_folder ** result_folder) { struct mailmbox_folder * folder; int r; int res; folder = mailmbox_folder_new(filename); if (folder == NULL) { res = MAILMBOX_ERROR_MEMORY;...
false
false
false
false
false
0
include_dif (GstRTPDVPay * rtpdvpay, guint8 * data) { gint block_type; gboolean res; block_type = data[0] >> 5; switch (block_type) { case 0: /* Header block */ case 1: /* Subcode block */ case 2: /* VAUX block */ /* always include the...
false
false
false
false
false
0
qrstat_create_report_handler_stdout(qrstat_env_t *qrstat_env, lList **answer_list) { qrstat_report_handler_t* ret = NULL; DENTER(TOP_LAYER, "qrstat_create_report_handler_stdout"); ret = (qrstat_report_handler_t*)sge_malloc(sizeof(qrstat_report_handler_t)); if (ret == N...
false
false
false
false
false
0
freeTopol (topol *tpl) { /* freeTopol */ Free(tpl->links); if (tpl->log_f) Free(tpl->log_f); Free(tpl); }
false
false
false
false
false
0
take(const QDomElement &x) { if(!iqVerify(x, "", id())) return false; //qDebug() << QString("privacy.cpp: Got privacy list %1 reply.").arg(name_); if (x.attribute("type") == "result") { QDomElement q = queryTag(x); bool found; QDomElement listTag = findSubTag(q,"list",&found); if (found) { lis...
false
false
false
false
false
0
onPolicyAtomicChanged(GtkToggleButton *toggle, gpointer data _U_) { VisuData *dataObj; gboolean atomic; g_object_set(G_OBJECT(visu_rendering_getByName(VISU_RENDERING_SPIN_NAME)), "use-atomic", gtk_toggle_button_get_active(toggle), NULL); atomic = (gtk_toggle_button_get_active(toggle) || gt...
false
false
false
false
false
0
vga_client_register(struct pci_dev *pdev, void *cookie, void (*irq_set_state)(void *cookie, bool state), unsigned int (*set_vga_decode)(void *cookie, bool decode)) { int ret = -ENODEV; struct vga_device *vgadev; unsigned long flags; spin_lock_irqsave(&vga_lock, flags); vgadev = vgadev_find(pdev...
false
false
false
false
false
0
checkers_who_won (Pos *pos, Player player, char **commp) { static char comment[32]; char *who_str [2] = { "white won", "black won"}; int found_w = 0, found_b = 0; int i; for (i=0; i<board_wid * board_heit; i++) if (CHECKERS_ISWHITE (pos->board[i])) found_w = 1; else if (CHECKERS_ISBLACK (pos->board[i])) found_...
true
true
false
false
false
1
halfroot(double (*func)(long m, double x), long n, double startx, double delta) { /* searches from the bound (startx) only in one direction (by positive or negative delta, which results in other-bound=startx+delta) delta should be small. (*func) is a function with two arguments */ ...
false
false
false
false
false
0
mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot) { guint8 *start; int i; guint8 *code; guint32 pos; MonoJumpInfo *ji = NULL; GSList *unwind_ops = NULL; const guint kMaxCodeSize = NACL_SIZE (128, 256); start = code = mono_global_codeman_reserve (kMaxCodeSize); /* call_filter (MonoContext *ctx, u...
false
false
false
false
false
0
storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, unsigned SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC, ...
false
false
false
false
false
0
output_quantization_factor(PNG_CONST png_modifier *pm, int in_depth, int out_depth) { if (out_depth == 16 && in_depth != 16 && pm->calculations_use_input_precision) return 257; else return 1; }
false
false
false
false
false
0
GetRate() const { if(!rate->Valid() || !put) return 0; return rate->Get(); }
false
false
false
false
false
0
_e2_permissions_dialog_toggle_recurse_button_cb (GtkWidget *widget, E2_PermsDldRuntime *rt) { if (!rt->permission) return; gboolean flag = (GTK_TOGGLE_BUTTON (widget)->active); gtk_widget_set_sensitive (rt->recurse_dirs_button, flag); gtk_widget_set_sensitive (rt->recurse_other_button, flag); }
false
false
false
false
false
0
modperl_global_lock(modperl_global_t *global) { #if MP_THREADED MP_TRACE_g(MP_FUNC, "locking %s", global->name); MUTEX_LOCK(&global->glock); #endif }
false
false
false
false
false
0
runOnFunction(Function &F) { bool Changed = false; LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo(); DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree(); auto *SEWP = getAnalysisIfAvailable<ScalarEvolutionWrapperPass>(); SE = SEWP ? &SEWP->getSE() : nullptr; AC = &getAnalysis<AssumptionCacheTra...
false
false
false
false
false
0
mono_is_ecma_key (const char *publickey, int size) { int i; if ((publickey == NULL) || (size != MONO_ECMA_KEY_LENGTH) || (publickey [8] != 0x04)) return FALSE; for (i=0; i < size; i++) { if ((publickey [i] != 0x00) && (i != 8)) return FALSE; } return TRUE; }
false
false
false
false
false
0
hip04_rx_poll(struct napi_struct *napi, int budget) { struct hip04_priv *priv = container_of(napi, struct hip04_priv, napi); struct net_device *ndev = priv->ndev; struct net_device_stats *stats = &ndev->stats; unsigned int cnt = hip04_recv_cnt(priv); struct rx_desc *desc; struct sk_buff *skb; unsigned char *buf;...
false
false
false
false
false
0
rb_ary_reject_bang(ary) VALUE ary; { long i1, i2; rb_ary_modify(ary); for (i1 = i2 = 0; i1 < RARRAY(ary)->len; i1++) { VALUE v = RARRAY(ary)->ptr[i1]; if (RTEST(rb_yield(v))) continue; if (i1 != i2) { rb_ary_store(ary, i2, v); } i2++; } if (RARRAY(ary)->len == i2) return Qnil; if ...
false
false
false
false
false
0
CheckTargetCreatureType(Unit* target) const { uint32 spellCreatureTargetMask = m_spellInfo->TargetCreatureType; // Curse of Doom : not find another way to fix spell target check :/ if (m_spellInfo->Id == 603) // in 1.12 "Curse of doom" have only 1 rank. { // not allo...
false
false
false
false
false
0
gmc_v8_0_wait_for_idle(void *handle) { unsigned i; u32 tmp; struct amdgpu_device *adev = (struct amdgpu_device *)handle; for (i = 0; i < adev->usec_timeout; i++) { /* read MC_STATUS */ tmp = RREG32(mmSRBM_STATUS) & (SRBM_STATUS__MCB_BUSY_MASK | SRBM_STATUS__MCB_NON_DISPLAY_BUSY_MASK | S...
false
false
false
false
false
0
dec_utf8(const char *enc, const char *text, size_t len) { PyObject *ret = NULL; PyObject *unicode_text = PyUnicode_DecodeUTF8(text, len, "replace"); if (unicode_text) { ret = PyUnicode_AsEncodedString(unicode_text, enc, "replace"); Py_DECREF(unicode_text); } if (!ret) { PyErr...
false
false
false
false
false
0
mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres, int size, int max_direct) { int err; err = mlx4_db_alloc(dev, &wqres->db, 1, GFP_KERNEL); if (err) return err; *wqres->db.db = 0; err = mlx4_buf_alloc(dev, size, max_direct, &wqres->buf, GFP_KERNEL); if (err) goto err_db; ...
false
false
false
false
false
0
GetProcBind( void *theEnv, void *value, DATA_OBJECT *result) { register DATA_OBJECT *src; PACKED_PROC_VAR *pvar; pvar = (PACKED_PROC_VAR *) ValueToBitMap(value); src = &ProceduralPrimitiveData(theEnv)->LocalVarArray[pvar->first - 1]; if (src->supplementalInfo == EnvTrueSymbol(theEnv)) { ...
false
false
false
false
false
0
Curl_add_bufferf(Curl_send_buffer *in, const char *fmt, ...) { char *s; va_list ap; va_start(ap, fmt); s = vaprintf(fmt, ap); /* this allocs a new string to append */ va_end(ap); if(s) { CURLcode result = Curl_add_buffer(in, s, strlen(s)); free(s); return result; } /* If we failed, we clean...
false
false
false
false
false
0
rtree_key_cmp(HA_KEYSEG *keyseg, uchar *b, uchar *a, uint key_length, uint nextflag) { for (; (int) key_length > 0; keyseg += 2 ) { uint32 keyseg_length; switch ((enum ha_base_keytype) keyseg->type) { case HA_KEYTYPE_INT8: RT_CMP_KORR(int8, mi_sint1korr, 1, nextflag); brea...
false
false
false
false
false
0
getStateById(int id){ struct state* item = states; struct state* new_state; for(;item!=NULL;item = item->next){ if(item->id==id) return item->stat; } new_state = malloc(sizeof(struct state)); new_state->id = id; new_state->stat = 1; new_state->next = states; states = new_state;...
false
false
false
false
false
0
invresolsq( const int& index ) const { if ( cell_matches_parent ) return base_hkl_info().invresolsq(index); else return base_hkl_info().hkl_of(index).invresolsq(base_cell()); }
false
false
false
false
false
0
ho_objlist_clean_by_reading_index (ho_objlist * object_list, int **map) { ho_objlist *temp_object_list; int new_index, i, j; /* allocate temporary list */ temp_object_list = ho_objlist_new (); if (!temp_object_list) return TRUE; *map = (int *) calloc (object_list->size, sizeof (int)); if (!(*map)) ...
false
false
false
false
false
0
json_object_clear(json_t *json) { json_object_t *object; if(!json_is_object(json)) return -1; object = json_to_object(json); hashtable_clear(&object->hashtable); return 0; }
false
false
false
false
false
0
FCEUSS_Save(const char *fname) { EMUFILE* st = 0; char fn[2048]; if(geniestage==1) { FCEU_DispMessage("Cannot save FCS in GG screen.",0); return; } if(fname) //If filename is given use it. { st = FCEUD_UTF8_fstream(fname, "wb"); strcpy(fn, fname); } else //Else, generate one { /...
false
false
false
false
false
0
moveFromBits(quint16 pgMove) { using Chess::Square; Square target((quint16)(pgMove << 13) >> 13, (quint16)(pgMove << 10) >> 13); Square source((quint16)(pgMove << 7) >> 13, (quint16)(pgMove << 4) >> 13); int promotion = (quint16)(pgMove << 1) >> 13; if (promotion > 0) promotion++; return Che...
false
false
false
false
false
0
ajRangeSeqStuff(const AjPRange thys, AjPSeq seq) { ajuint nr; ajuint i; ajuint j; ajuint lasten = 0; ajuint lastst = 0; ajuint len; ajuint st; ajuint en; AjBool result = ajFalse; AjPStr outstr = NULL; nr = thys->n; if(nr) { for(i = 0; i < nr; i++) { ...
false
false
false
false
false
0
gupnp_dlna_profile_guesser_impl_guess_audio_profile (GUPnPDLNAInformation *info, GList *profiles) { GList *iter; GUPnPDLNAProfile *found_profile = NULL; for (iter = profiles; iter != NULL; iter = ite...
false
false
false
false
false
0
hfa384x_from_bap(struct net_device *dev, u16 bap, void *buf, int len) { u16 d_off; u16 *pos; d_off = (bap == 1) ? HFA384X_DATA1_OFF : HFA384X_DATA0_OFF; pos = (u16 *) buf; if (len / 2) HFA384X_INSW(d_off, buf, len / 2); pos += len / 2; if (len & 1) *((char *) pos) = HFA384X_INB(d_off); return 0; ...
false
false
false
false
false
0
bna_rxf_sm_last_resp_wait(struct bna_rxf *rxf, enum bna_rxf_event event) { switch (event) { case RXF_E_FAIL: case RXF_E_FW_RESP: bna_rxf_cfg_reset(rxf); bfa_fsm_set_state(rxf, bna_rxf_sm_stopped); break; default: bfa_sm_fault(event); } }
false
false
false
false
false
0
MatRuecksub(Matrix &A,Matrix &B,Matrix &C,Matrix &D,int &x) { int n=A.getCol(); int t=0; int i; while( t != n) { i=t+1; while( i != n) { B( static_cast<int>(D(i,0)) ,0)-= A( static_cast<int>(D(i,0)) ,t) * B( static_cast<int>(D(t,0)) ,0); ++i; } ++t; } C(n-1,x) = B( s...
false
false
false
false
false
0
MergeNext(const TargetPhrase &inputPhrase) const { if (! IsCompatible(inputPhrase)) { return NULL; } // ok, merge TargetPhrase *clone = new TargetPhrase(*this); clone->m_sourcePhrase = m_sourcePhrase; int currWord = 0; const size_t len = GetSize(); for (size_t currPos = 0 ; currPos < len ; currP...
false
false
false
false
false
0
ignore_all (GtkWidget *menuitem, ESpellEntry *entry) { gchar *word; gint start, end; GSList *li; get_word_extents_from_position ( entry, &start, &end, entry->priv->mark_character); word = gtk_editable_get_chars (GTK_EDITABLE (entry), start, end); for (li = entry->priv->checkers; li; li = g_slist_n...
false
false
false
false
false
0
gt_copysort_checkhardwork(const GtBucketspec2 *bucketspec2, GtCodetype code) { if (bucketspec2->prefixlength > 2U) { return bucketspec2->subbuckettab[0][code / bucketspec2->expandfactor]. hardworktodo; } else { return bucketspec2->su...
false
false
false
false
false
0
gst_video_test_src_smpte100 (GstVideoTestSrc * v, unsigned char *dest, int w, int h) { int i; int j; paintinfo pi = { NULL, }; paintinfo *p = &pi; struct fourcc_list_struct *fourcc; videotestsrc_setup_paintinfo (v, p, w, h); fourcc = v->fourcc; if (fourcc == NULL) return; fourcc->paint_setup...
false
false
false
false
false
0
gs_setcolorspace(gs_state * pgs, gs_color_space * pcs) { int code = 0; code = gs_setcolorspace_only(pgs, pcs); if (code >= 0) { pgs->color[0].color_space->pclient_color_space_data = pcs->pclient_color_space_data; cs_full_init_color(pgs->color[0].ccolor, pcs); ...
false
false
false
false
false
0
netsnmp_null_handler(netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) { DEBUGMSGTL(("helper:null", "Got request\n")); DEBUGMSGTL(("helper:null", " oid:")); ...
false
false
false
false
false
0
isAmbiguity(int c) { int i; char codes[] = "ACGTU"; if (clustalw::userParameters->getUseAmbiguities() == true) { return false; } for (i = 0; i < 5; i++) if (clustalw::userParameters->getAminoAcidCode(c) == codes[i]) { return false; } return true...
false
false
false
false
false
0
ReadPaletteFromFile(FILE *Pal, int s) { char buffer[256*3]; palette *p; int i,j; // printf("Reading a palette of size %d (%d entries)\n",s,s/3); p=(palette *)malloc(sizeof(palette)); fread(buffer, 1, s, Pal); p->size=s/3; for(i=0,j=0;i<s;i+=3,j++) { p->data[j].red=buffer[i]; ...
false
false
false
false
true
1
gfire_remove_group(gfire_data *p_gfire, gfire_group *p_group, gboolean p_remove) { if(!p_gfire || !p_group) return; GList *node = g_list_find(p_gfire->groups, p_group); if(node) { gfire_group_free(p_group, p_remove); p_gfire->groups = g_list_delete_link(p_gfire->groups, node); } }
false
false
false
false
false
0
activateCurrentControl (void) { switch ( getSelectedGlobalControl () ) { case k_AcceptControlIndex: applyPlayersControls (); removeState (); break; case k_CancelControlIndex: removeState (); break; case k_DefaultsControlIndex:...
false
false
false
false
false
0
gfire_game_data_reset(gfire_game_data *p_game) { if(!p_game) return; p_game->id = 0; p_game->ip.value = 0; p_game->port = 0; }
false
false
false
false
false
0
doubleAttributeValue(string line, string attribute) { string valString = attributeValue(line, attribute); if (valString == "") return 0.; istringstream valStream(valString); double doubleVal; valStream >> doubleVal; return doubleVal; }
false
false
false
false
false
0
gkm_template_set_ulong (GArray *template, CK_ATTRIBUTE_TYPE type, CK_ULONG value) { CK_ATTRIBUTE attr; g_return_if_fail (template); attr.type = type; attr.pValue = &value; attr.ulValueLen = sizeof (value); gkm_template_set (template, &attr); }
false
false
false
false
false
0
DelayedChannel() { if (!m_caster || m_caster->GetTypeId() != TYPEID_PLAYER || getState() != SPELL_STATE_CASTING) return; if (isDelayableNoMore()) // Spells may only be delayed twice return; // check pushback reduce int32 delaytime = GetSpellDuration(m_spe...
false
false
false
false
false
0
MSM5232_sh_start (const struct MachineSound *msound) { const struct MSM5232interface *intf = msound->sound_interface; int i,chip; int vol[2]; char buf[2][40]; const char *name[2]; if ( msm5232_init(intf, Machine->sample_rate) != 0) return 1; for (chip=0; chip < intf->num; chip++) { for (i=0; ...
true
true
false
false
false
1
main(int argc, char **argv) { if (argc != 2) { fputs(USAGE, stderr); return (1); } if (!strcasecmp(argv[1], "nsip")) { #ifdef ENABLE_RPZ_NSIP return (0); #else return (1); #endif } if (!strcasecmp(argv[1], "nsdname")) { #ifdef ENABLE_RPZ_NSDNAME return (0); #else return (1); #endif } fputs(USAGE, ...
false
false
false
false
false
0
editjournal ( void ) { MultilineEdit ej ( actmap->newJournal, "Journal" ); ej.init (); ej.run (); if ( ej.changed() ) actmap->lastjournalchange.set ( actmap->time.turn(), actmap->actplayer ); ej.done (); }
false
false
false
false
false
0
p_goto_prev(P *ptr) { P *p = pdup(ptr, USTR "p_goto_prev"); struct charmap *map=ptr->b->o.charmap; int c = prgetc(p); if (joe_isalnum_(map,c)) { while (joe_isalnum_(map,(c=prgetc(p)))) /* Do nothing */; if (c != NO_MORE_DATA) pgetc(p); } else if (joe_isspace(map,c) || joe_ispunct(map,c)) { while ((c=p...
false
false
false
false
false
0
orinoco_hw_get_bitratelist(struct orinoco_private *priv, int *numrates, s32 *rates, int max) { struct hermes *hw = &priv->hw; struct hermes_idstring list; unsigned char *p = (unsigned char *)&list.val; int err = 0; int num; int i; unsigned long flags; if (orinoco_lock(priv, &flags) != 0) return -EB...
false
false
false
false
false
0
Include(const FMVector3& point) { if (point.x < minimum.x) minimum.x = point.x; else if (point.x > maximum.x) maximum.x = point.x; if (point.y < minimum.y) minimum.y = point.y; else if (point.y > maximum.y) maximum.y = point.y; if (point.z < minimum.z) minimum.z = point.z; else if (point.z > maximum.z) max...
false
false
false
false
false
0
venus_mkdir(struct super_block *sb, struct CodaFid *dirfid, const char *name, int length, struct CodaFid *newfid, struct coda_vattr *attrs) { union inputArgs *inp; union outputArgs *outp; int insize, outsize, error; int offset; offset = INSIZE(mkdir); insize = max_t(unsign...
false
false
false
false
false
0
key_invalidate(struct key *key) { kenter("%d", key_serial(key)); key_check(key); if (!test_bit(KEY_FLAG_INVALIDATED, &key->flags)) { down_write_nested(&key->sem, 1); if (!test_and_set_bit(KEY_FLAG_INVALIDATED, &key->flags)) key_schedule_gc_links(); up_write(&key->sem); } }
false
false
false
false
false
0
GLEScaleSimpleLineProperties(double scale, bool dir, GLEPropertyStore* prop) { if (prop != NULL && scale > 0) { double wd = prop->getRealProperty(GLEDOPropertyLineWidth); if (dir) { wd *= scale; } else { wd /= scale; } prop->setRealProperty(GLEDOPropertyLineWidth, wd); } }
false
false
false
false
false
0
text() const { return type == ActionType ? action->text() : collection->text(); }
false
false
false
false
false
0
validate_index(struct mlx4_dev *dev, struct mlx4_mac_table *table, int index) { int err = 0; if (index < 0 || index >= table->max || !table->entries[index]) { mlx4_warn(dev, "No valid Mac entry for the given index\n"); err = -EINVAL; } return err; }
false
false
false
false
false
0
sh_veu_is_streamer(struct sh_veu_dev *veu, struct sh_veu_file *veu_file, enum v4l2_buf_type type) { return (type == V4L2_BUF_TYPE_VIDEO_CAPTURE && veu_file == veu->capture) || (type == V4L2_BUF_TYPE_VIDEO_OUTPUT && veu_file == veu->output); }
false
false
false
false
false
0
e_shelf_orient_string_get(E_Shelf *es) { const char *sig = ""; switch (es->gadcon->orient) { case E_GADCON_ORIENT_FLOAT: sig = "float"; break; case E_GADCON_ORIENT_HORIZ: sig = "horizontal"; break; case E_GADCON_ORIENT_VERT: sig = "vertical"; ...
false
false
false
false
false
0
MakeMergable() { for (int i = 0; i < element_count(); i++) { FrameElement element = elements_[i]; // In all cases we have to reset the number type information // to unknown for a mergable frame because of incoming back edges. if (element.is_constant() || element.is_copy()) { if (element.is_sync...
false
false
false
false
false
0
ion_page_pool_free(struct ion_page_pool *pool, struct page *page) { int ret; BUG_ON(pool->order != compound_order(page)); ret = ion_page_pool_add(pool, page); if (ret) ion_page_pool_free_pages(pool, page); }
false
false
false
false
false
0
OnProjectFileChanged(CodeBlocksEvent& event) { if (IsAttached() && m_InitDone) { // TODO (Loaden#5#) make sure the event.GetProject() is valid. cbProject* project = event.GetProject(); wxString filename = event.GetString(); if (!project) project = m_NativeParser.GetPr...
false
false
false
false
false
0
encode_spdif_bits(struct snd_aes_iec958 *diga) { unsigned int val, rbits; val = diga->status[0] & 0x03; /* professional, non-audio */ if (val & 0x01) { /* professional */ if ((diga->status[0] & IEC958_AES0_PRO_EMPHASIS) == IEC958_AES0_PRO_EMPHASIS_5015) val |= 1U << 3; rbits = (diga->status[4] >> 3) ...
false
false
false
false
false
0
logmatch_update_filename(const char * pattern, char * currentFilename) { time_t t; struct tm *tmp; char newFilename[256]; /* * ------------------------------------------------------------------- * if the filename pattern doesn't have the "%" character just return, * since there is no nee...
false
false
false
false
false
0
install_equiv_cpu_table(const u8 *buf) { unsigned int *ibuf = (unsigned int *)buf; unsigned int type = ibuf[1]; unsigned int size = ibuf[2]; if (type != UCODE_EQUIV_CPU_TABLE_TYPE || !size) { pr_err("empty section/" "invalid type field in container file section header\n"); return -EINVAL; } equiv_c...
false
false
false
false
false
0