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
alg2_add_hermconj(List vert_list) { List lagr, ord, toadd; toadd=NewList(); for(lagr=vert_list;lagr;lagr=ListTail(lagr)) { Term a2,a2c; List prt,l; int cf=0; a2=ListFirst(lagr); if(CompoundArgN(a2,4)) continue; if(is_empty_list(CompoundArg1(a2))) continue; if(CompoundArg2...
false
false
false
false
false
0
check(std::error_code Err) { if (Err) { report_fatal_error(Err.message()); } return Err; }
false
false
false
false
false
0
ObjectKeys() const { std::vector<std::wstring> keys; if (type == JSONType_Object) { JSONObject::const_iterator iter = object_value.begin(); while (iter != object_value.end()) { keys.push_back(iter->first); iter++; } } return keys; }
false
false
false
false
false
0
gnu_ptrace_close(void) { fprintf(TRACE, END_TRACE " %ld\n", (long)getpid()); if (TRACE != NULL) fclose(TRACE); return ; }
false
false
false
false
false
0
getDocSectionLayout(void) { fl_AnnotationLayout * pFL = static_cast<fl_AnnotationLayout *>(getSectionLayout()); fl_ContainerLayout * pDSL = pFL->myContainingLayout(); while(pDSL && pDSL->getContainerType() != FL_CONTAINER_DOCSECTION) { pDSL = pDSL->myContainingLayout(); } UT_ASSERT(pDSL && (pDSL->getContainerTy...
false
false
false
false
false
0
addGamePlayer(GamePlayerInterface * p) { if (mPlayerCount == mMaxCapacity) { return false; } maPlayerList[mPlayerCount] = new KBlocksNetPlayer(p, mServerIP, mLocalPort + mPlayerCount); mPlayerCount++; return true; }
false
false
false
false
false
0
midgard_config_set_loglevel(MidgardConfig *self, const gchar *loglevel) { g_assert (self != NULL && loglevel != NULL); if(self->loglevel) g_free (self->loglevel); self->loglevel = g_strdup(loglevel); }
false
false
false
false
false
0
_item_title_next_btn_set(Elm_Naviframe_Item *it, Evas_Object *btn) { if (it->title_next_btn == btn) return; if (it->title_next_btn) evas_object_del(it->title_next_btn); it->title_next_btn = btn; if (!btn) return; edje_object_part_swallow(VIEW(it), NEXT_BTN_PART, btn); edje_ob...
false
false
false
false
false
0
slotSyncQueryDone() { DEBUG_BLOCK; m_currentResultCount += 1; if( m_currentResultCount < 2 ) return; m_currentResultCount = 0; m_timer.stop(); if( m_state == Syncing ) { doSynchronization( m_trackResultOnlyInA, OnlyInA, m_collectionA, m_collectionB ); doSynchronizati...
false
false
false
false
false
0
snd_atomic_read_wait(snd_atomic_read_t *t) { volatile const snd_atomic_write_t *w = t->write; unsigned int loops = 0; struct timespec ts; while (w->begin != w->end) { if (loops < MAX_SPIN_COUNT) { sched_yield(); loops++; continue; } loops = 0; ts.tv_sec = 0; ts.tv_nsec = SPIN_SLEEP_DURATION; na...
false
false
false
false
false
0
initFont(void) { if (fontCount()==0) { if (_afmInitialized==MSFalse&&afmfilesHashTable()==0) { _afmInitialized=MSTrue; initAfmfilesHashTable(fontPath()); } if (printFontID((char *)DefaultPrintFont)==BadFontName) { if (printFontID((char*)AltDefaultPrintFont)==BadFontName) { MSMe...
false
false
false
false
false
0
token_to_binary_expr_op() { CYG_REPORT_FUNCNAMETYPE("token_to_expr_op", "op %d"); CdlExprOp result = CdlExprOp_Invalid; switch(current_token) { case T_Minus: result = CdlExprOp_Subtract; break; case T_Plus: result = CdlExprOp_Add; break; case T_Times: ...
false
false
false
false
false
0
TransformBounds(vtkViewport *viewport, const double bounds[6], double pts[8][3]) { double x[3]; //loop over verts of bounding box for ( int k = 0; k < 2; ++ k ) { x[2] = bounds[4 + k]; for ( int j = 0; j < 2; ++ j ) {...
false
false
false
false
false
0
HTS_lsp2en(HTS_Vocoder * v, double *lsp, size_t m, double alpha) { size_t i; double en = 0.0; double *buff; if (v->spectrum2en_size < m) { if (v->spectrum2en_buff != NULL) HTS_free(v->spectrum2en_buff); v->spectrum2en_buff = (double *) HTS_calloc(m + 1 + IRLENG, sizeof(double)); ...
false
false
false
false
false
0
hkl_holder_add_rotation_axis(HklHolder * self, char const * name, double x, double y, double z) { HklAxis *axis = NULL; size_t i, idx; HklVector axis_v; axis_v.data[0] = x; axis_v.data[1] = y; axis_v.data[2] = z; idx = hkl_geometry_add_rotation(self->geometry, name, &axis_v); /* check that the axis...
false
false
false
false
false
0
estimate_rel_size(Relation rel, int32 *attr_widths, BlockNumber *pages, double *tuples) { BlockNumber curpages; BlockNumber relpages; double reltuples; double density; switch (rel->rd_rel->relkind) { case RELKIND_RELATION: case RELKIND_INDEX: case RELKIND_TOASTVALUE: /* it has storage, ok to cal...
false
false
false
false
false
0
MarkBranchDeleted( RecCursor * pBeforeCursor, RecCursor * pAfterCursor) { GRD_DifferenceData difference; FLMUINT uiStartLevel = pBeforeCursor->RawLevel(); difference.type = GRD_DeletedSubtree; difference.uiAbsolutePosition = pAfterCursor->AbsolutePosition(); difference.pBeforeRecord = pBeforeCursor->R...
false
false
false
false
false
0
duration() const { return m_player ? m_player->totalTime() : 0; }
false
false
false
false
false
0
dav_fs_copymove_state( int is_move, apr_pool_t * p, const char *src_dir, const char *src_file, const char *dst_dir, const char *dst_file, dav_buffer *pbuf) { apr_finfo_t src_finfo; /* finfo for source file */ apr_finfo_t dst_state_finfo; /* finfo for STATE directory */ apr_...
false
false
false
false
false
0
msdc_reset_hw(struct msdc_host *host) { u32 val; sdr_set_bits(host->base + MSDC_CFG, MSDC_CFG_RST); while (readl(host->base + MSDC_CFG) & MSDC_CFG_RST) cpu_relax(); sdr_set_bits(host->base + MSDC_FIFOCS, MSDC_FIFOCS_CLR); while (readl(host->base + MSDC_FIFOCS) & MSDC_FIFOCS_CLR) cpu_relax(); val = readl(ho...
false
false
false
false
false
0
update_window_color_style(FvwmWindow *fw, window_style *pstyle) { int cs = Scr.DefaultColorset; if (SUSE_COLORSET(&pstyle->flags)) { cs = SGET_COLORSET(*pstyle); fw->cs = cs; } else { fw->cs = -1; } if (SGET_FORE_COLOR_NAME(*pstyle) != NULL && !SUSE_COLORSET(&pstyle->flags)) { fw->colors.fore = G...
false
false
false
false
false
0
ubh_mark_buffer_dirty (struct ufs_buffer_head * ubh) { unsigned i; if (!ubh) return; for ( i = 0; i < ubh->count; i++ ) mark_buffer_dirty (ubh->bh[i]); }
false
false
false
false
false
0
show_lpm_concat(ivl_lpm_t net) { unsigned idx; unsigned width_sum = 0; unsigned width = ivl_lpm_width(net); fprintf(out, " LPM_CONCAT %s: <width=%u, inputs=%u>\n", ivl_lpm_basename(net), width, ivl_lpm_size(net)); fprintf(out, " O: %p\n", ivl_lpm_q(net,0)); for (idx = 0...
false
false
false
false
false
0
propfind_fromdb(const xmlChar *name, xmlNsPtr ns, struct propfind_ctx *fctx, xmlNodePtr resp __attribute__((unused)), struct propstat propstat[], void *rock __attribute__((unused))) { struct annotation_data attrib; xmlNodePtr node; int r = 0; buf_reset(&fctx->buf); buf_print...
false
false
false
false
false
0
nearest(double e0, double e1) { while (e0 - e1 > 180) e1 += 360.0; while (e1 - e0 > 180) e1 -= 360.0; return e1; }
false
false
false
false
false
0
prt_resource_name(filename, cookie) char_u *filename; void *cookie; { char_u *resource_filename = cookie; if (STRLEN(filename) >= MAXPATHL) *resource_filename = NUL; else STRCPY(resource_filename, filename); }
false
false
false
false
false
0
miner_applications_initable_init (GInitable *initable, GCancellable *cancellable, GError **error) { TrackerMinerFS *fs; TrackerMinerApplications *app; GError *inner_error = NULL; TrackerIndexingTree *indexing_tree; fs = TRACKER_MINER_F...
false
false
false
false
false
0
LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) const { // This nodes represent llvm.frameaddress on the DAG. // It takes one operand, the index of the frame address to return. // An index of zero corresponds to the current function's frame address. // An index of one t...
false
false
false
false
false
0
Run(int argc, char* argv[]) { // parse command line arguments Options::Parse(argc, argv, 1); // if no '-in' args supplied, default to stdin if ( !m_settings->HasInput ) m_settings->InputFiles.push_back(Options::StandardIn()); // open reader without index BamMultiReader reader; ...
false
false
false
false
false
0
gnome_get_language_from_locale (const char *locale, const char *translation) { GString *full_language; char *language_code; char *territory_code; char *codeset_code; char *langinfo_codeset; char *translated_language; char *translate...
false
false
false
false
false
0
tracker_tags_view_entry_tag_changed_cb (GtkEditable* source, TrackerTagsView* self) { const gchar* tag = NULL; GtkEntry* _tmp0_ = NULL; const gchar* _tmp1_ = NULL; GtkTreeIter iter = {0}; const gchar* _tmp2_ = NULL; GtkTreeIter _tmp3_ = {0}; gboolean _tmp4_ = FALSE; g_return_if_fail (self != NULL); g_return_if...
false
false
false
false
false
0
powercom_claim(HIDDevice_t *hd) { int status = is_usb_device_supported(powercom_usb_device_table, hd); switch (status) { case POSSIBLY_SUPPORTED: if (hd->ProductID == 0x0002) { upsdebugx(0, "This Powercom device (%04x/%04x) is not supported by usbhid-ups.\n" "Please use the 'powercom' driver instead.\...
false
false
false
false
false
0
gxconv (gadouble s, gadouble t, gadouble *x, gadouble *y, gaint level) { if (level>2 && gconv!=NULL) (*gconv)(s,t,&s,&t); if (level>1 && fconv!=0) (*fconv)(s,t,&s,&t); if (level>0) { s=s*xm+xb; t=t*ym+yb; } *x=s; *y=t; }
false
false
false
false
false
0
_MIDI_ProcessNextTick ( void ) { int event; int channel; int command; track *Track; int tracknum; int status; int c1 = 0; int c2 = 0; int TimeSet = FALSE; Track = _MIDI_TrackPtr; tracknum = 0; while( ( tracknum < _MIDI_NumTracks ) && ( Track != NULL ) ) ...
false
false
false
false
false
0
Transport_Delegate_CreateKeyDelegation(TSS_HCONTEXT tspContext, /* in */ TCS_KEY_HANDLE hKey, /* in */ UINT32 publicInfoSize, /* in */ BYTE *publicInfo, /* in */ TPM_ENCAUTH *encDelAuth, /* in */ TPM_AUTH *keyAuth, ...
false
false
false
false
false
0
restoreOptions() { if (!w) return; LookFeelToolbarsUI *d = (LookFeelToolbarsUI *)w; PsiOptions *o = PsiOptions::instance(); QStringList toolbarBases = o->getChildOptionNames("options.ui.contactlist.toolbars", true, true); foreach(QString base, toolbarBases) { ToolbarPrefs tb; tb.id = o->getOption(base + ...
false
false
false
false
false
0
print_duration(unsigned long duration) { unsigned long tmp; if (duration > 1000000) { tmp = duration % 10000; if (tmp >= 5000) duration += 10000; printf ("%u.%02u ms", ((unsigned int) duration/1000000), ((unsigned int) (duration%1000000)/10000)); } else if (duration > 100000) { tmp = duration % 1000; ...
false
false
false
false
false
0
test_same_voter(networkstatus_voter_info_t *v1, networkstatus_voter_info_t *v2) { test_streq(v1->nickname, v2->nickname); test_memeq(v1->identity_digest, v2->identity_digest, DIGEST_LEN); test_streq(v1->address, v2->address); test_eq(v1->addr, v2->addr); test_eq(v1->dir_port, v2->dir_port); ...
false
true
false
false
false
1
readcs (int fd, char cs) { char xcs; readall(fd, &xcs, sizeof xcs); if (xcs != cs) { fprintf (stderr, "readmtcp readcs: checkpoint section %d next, expected %d\n", xcs, cs); abort (); } }
false
false
false
false
false
0
dac33_soc_remove(struct snd_soc_codec *codec) { struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); if (dac33->irq >= 0) { free_irq(dac33->irq, dac33->codec); destroy_workqueue(dac33->dac33_wq); } return 0; }
false
false
false
false
false
0
suitable_migration_target(struct page *page) { /* If the page is a large free page, then disallow migration */ if (PageBuddy(page)) { /* * We are checking page_order without zone->lock taken. But * the only small danger is that we skip a potentially suitable * pageblock, so it's not worth to check order fo...
false
false
false
false
false
0
getVecVal(const UT_Vector *v, const gchar * szProp) const { UT_sint32 i = v->getItemCount(); if(i <= 0) return NULL; UT_sint32 j; const gchar * pszV = NULL; for(j= 0; j<i ;j=j+2) { pszV = (const gchar *) v->getNthItem(j); if( (pszV != NULL) && (strcmp( pszV,szProp) == 0)) break; } if( j < i ) return ...
false
false
false
false
false
0
_hoversel_position(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); Evas_Coord cx, cy, cw, ch, x, y, mw, mh; if (!wd) return; cx = cy = 0; cw = ch = 1; evas_object_geometry_get(wd->ent, &x, &y, NULL, NULL); if (wd->usedown) { cx = wd->downx - x; cy = wd->downy -...
false
false
false
false
false
0
sinfo_get_line_ratio_amoeba(cpl_table* obj, cpl_table* sky, double* r) { int i=0; const int MP=2; const int NP=1; double y[MP]; double p0[NP]; double** ap=NULL; int nfunc=0; int np=0; check_nomsg(np=cpl_table_get_nrow(obj)); check_nomsg(sa_ox...
false
false
false
false
false
0
dumptime(register const struct tm *timeptr) { static const char wday_name[][3] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; static const char mon_name[][3] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; register const char * wn; register const char * mn; ...
false
false
false
false
false
0
get_data_as_wkt(String *txt, const char **end) const { uint32 n_points; const char *data= m_data; if (no_data(data, 4)) return 1; n_points= uint4korr(data); data += 4; if (n_points < 1 || not_enough_points(data, n_points) || txt->reserve(((MAX_DIGITS_IN_DOUBLE + 1)*2 + 1) * n_points)) ...
false
false
false
false
false
0
aes_cfb1_cipher(EVP_CIPHER_CTX *ctx,unsigned char *out, const unsigned char *in,size_t len) { EVP_AES_KEY *dat = (EVP_AES_KEY *)ctx->cipher_data; if (ctx->flags&EVP_CIPH_FLAG_LENGTH_BITS) { CRYPTO_cfb128_1_encrypt(in,out,len,&dat->ks, ctx->iv,&ctx->num,ctx->encrypt,dat->block); return 1; } while (len>=MAX...
false
false
false
false
false
0
L28() {register object *base=vs_base; register object *sup=base+VM28; VC28 vs_check; {object V189; V189=(base[0]); vs_top=sup; goto TTL; TTL:; base[1]= (V189); vs_top=(vs_base=base+1)+1; (void) (*Lnk174)(); vs_top=sup; if((vs_base[0])==Cnil){ goto T578;} base[1]= (V189); vs_top=(vs_base=base+1)+1; (void)...
false
false
false
false
false
0
unlockThreads() { Locker locker(m_LockMutex); if (--m_iLockCount > 0) return; // pausetest m_iLockCount = 0; m_llTimeStart = 0; m_bHangup = false; m_bInitialized = true; AVM_WRITE("aviplay", 1, "Unlock threads\n"); m_QueueCond.Broadcast(); m_QueueMutex.Unlock(); ...
false
false
false
false
false
0
max14577_init_eoc(struct max14577_charger *chg, unsigned int uamp) { unsigned int current_bits = 0xf; u8 reg_data; switch (chg->max14577->dev_type) { case MAXIM_DEVICE_TYPE_MAX77836: if (uamp < 5000) return -EINVAL; /* Requested current is too low */ if (uamp >= 7500 && uamp < 10000) current_bits = 0x...
false
false
false
false
false
0
imapx_store_delete_folder_sync (CamelStore *store, const gchar *folder_name, GCancellable *cancellable, GError **error) { CamelIMAPXStore *imapx_store; CamelIMAPXServer *imapx_server; gboolean success = FALSE; imapx_sto...
false
false
false
false
false
0
cb_Graph_LineGraph (wxCommandEvent &event) { undoableAction (_("Line Graph")); Graph *orig = graph; graph = orig->line_graph (); delete orig; canvas->redraw (); }
false
false
false
false
false
0
get_best_auto_connection (NMDevice *dev, GSList *connections, char **specific_object) { GSList *iter; for (iter = connections; iter; iter = g_slist_next (iter)) { NMConnection *connection = NM_CONNECTION (iter->data); if (!nm_connection_is_type (connection, NM...
false
false
false
false
false
0
add_cache_entry(struct policy *p, struct wb_cache_entry *e) { insert_cache_hash_entry(p, e); if (e->dirty) list_add(&e->list, &p->dirty); else list_add(&e->list, &p->clean); }
false
false
false
false
false
0
camCompareDescriptors(const int *desc1, const int *desc2, const int s) { int i, j, distance = 0; __m128i sum, d1, d2, md, d, cmp; __m128i *p1 = (__m128i*)desc1, *p2 = (__m128i*)desc2; ALIGN(int out_sse[4], 16); /* Looks like a good idea... But this deteriorates performance... // Softwar...
false
false
false
false
false
0
file_checksum(const char *fname) { char buf[512]; int f, ret, n; unsigned int checksum = 0; f = open(fname, O_RDONLY); if (f == -1) return 0; n = 0; while ((ret = read(f, buf, sizeof(buf))) > 0) { while (ret-- > 0) checksum += buf[ret] << ((n++ & 3)*8); } close(f); return checksum;...
false
false
false
false
false
0
qmonExecHostShutdown(Widget w, XtPointer cld, XtPointer cad) { lList *lp = NULL; lList *alp = NULL; static lCondition *where = NULL; const char *default_cell = ctx->get_default_cell(ctx); DENTER(GUI_LAYER, "qmonExecHostShutdown"); if (!where) where = lWhere("%T(%I != %s)", EH_Type, EH_name, S...
false
false
false
false
false
0
acpi_ut_trace_u32(u32 line_number, const char *function_name, const char *module_name, u32 component_id, u32 integer) { acpi_gbl_nesting_level++; acpi_ut_track_stack_ptr(); /* Check if enabled up-front for performance */ if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_FUNCTIONS, component_id)) { acpi_debug_print(ACP...
false
false
false
false
false
0
destroy_right(BisTree *tree, BiTreeNode *node) { BiTreeNode **position; if(bitree_size(tree) == 0) return; if(node == NULL) position = &tree->root; else position = &node->right; if(*position != NULL) { destroy_left(tree, *position); destroy_right(tree, *position); if(tree->destroy != NULL) { ...
false
false
false
false
false
0
_e2_output_help_action (gpointer from, E2_ActionRuntime *art) { gchar *arg = (gchar *)art->data; if ((arg == NULL) || (*arg == '\0') || g_str_has_prefix (arg, _("commands"))) { e2_command_output_help (); return TRUE; } else if (g_str_has_prefix (arg, _("keys"))) //this must be translated same as in default ali...
false
false
false
false
false
0
ajVarfieldClear(AjPVarField var) { if(MAJSTRGETLEN(var->Id)) ajStrSetClear(&var->Id); if(MAJSTRGETLEN(var->Desc)) ajStrSetClear(&var->Desc); if(MAJSTRGETLEN(var->Field)) ajStrSetClear(&var->Field); var->Type = AJVAR_UNKNOWN; var->Number = 0; return; }
false
false
false
false
false
0
GetLocalizedText ( XMP_StringPtr schemaNS, XMP_StringPtr arrayName, XMP_StringPtr _genericLang, XMP_StringPtr _specificLang, XMP_StringPtr * actualLang, XMP_StringLen * langSize, XMP_StringPtr * itemValue, XMP_StringLen * valueSize, XMP_OptionBits * option...
false
false
false
false
false
0
mono_blob_entry_hash (const char* str) { guint len, h; const char *end; len = mono_metadata_decode_blob_size (str, &str); if (len > 0) { end = str + len; h = *str; for (str += 1; str < end; str++) h = (h << 5) - h + *str; return h; } else { return 0; } }
false
false
false
false
false
0
reverse (lrs_dic * P, lrs_dat * Q, long *r, long s) /* find reverse indices */ /* TRUE if B[*r] C[s] is a reverse lexicographic pivot */ { long i, j, enter, row, col; /* assign local variables to structures */ lrs_mp_matrix A = P->A; long *B = P->B; long *C = P->C; long *Row = P->Row; long *Col = P->Col;...
false
false
false
false
false
0
flashnode_fill_ipv4_addr(struct flashnode_rec *fnode, struct iovec *iov, int param_type) { struct iscsi_flashnode_param_info *fnode_param; struct nlattr *attr; int len; int rc; len = sizeof(struct iscsi_flashnode_param_info) + 4; iov->iov_base = iscsi_nla_alloc(param_type, len); if (!iov->iov_base) re...
false
false
false
false
false
0
document_scintilla_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { Document_ScintillaDetails *docdet = DOCUMENT_SCINTILLA_GET_PRIVATE(object); gboolean temp; gboolean untitled; gchar *content; gint p; switch (prop_id) { case P...
false
false
false
false
false
0
commonPrefix(const QStringList &strings) { switch (strings.size()) { case 0: return QString(); case 1: return strings.front(); default: break; } // Figure out common string part: "C:\foo\bar1" "C:\foo\bar2" -> "C:\foo\bar" int commonLength = INT_MAX; const int la...
false
false
false
false
false
0
dom_hierarchy(xmlNodePtr parent, xmlNodePtr child) { xmlNodePtr nodep; if (parent == NULL || child == NULL || child->doc != parent->doc) { return SUCCESS; } nodep = parent; while (nodep) { if (nodep == child) { return FAILURE; } nodep = nodep->parent; } return SUCCESS; }
false
false
false
false
false
0
asocket_connect(struct asocket *s, const struct sockaddr *addr, socklen_t addrlen, int timeout) { int ret; do { ret = connect(s->fd, addr, addrlen); } while (ret && errno == EINTR); if (ret && errno == EINPROGRESS) { /* ready to poll() */ socklen_t retlen; stru...
false
false
false
false
false
0
bcf_smpl_covered(const bcf1_t *b) { int i, j, n = 0; uint32_t tmp; bcf_ginfo_t *gi; // pinpoint PL tmp = bcf_str2int("PL", 2); for (i = 0; i < b->n_gi; ++i) if (b->gi[i].fmt == tmp) break; if (i == b->n_gi) return 0; // count how many samples having PL!=[0..0] gi = b->gi + i; for (i = 0; i < b->n_smpl; ++i)...
false
false
false
false
false
0
match_select(argc, argv, match) int argc; VALUE *argv; VALUE match; { if (argc > 0) { rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc); } else { struct re_registers *regs = RMATCH(match)->regs; VALUE target = RMATCH(match)->str; VALUE result = rb_ary_new(); int i; int t...
false
false
false
false
false
0
HandleQuestgiverCompleteQuest(WorldPacket& recv_data) { uint32 quest; ObjectGuid guid; recv_data >> guid >> quest; if (!CanInteractWithQuestGiver(guid, "CMSG_QUESTGIVER_COMPLETE_QUEST")) { return; } // All ok, continue DEBUG_LOG("WORLD: Received opcode CMSG_QUESTGIVER_COMPLETE_QUEST - ...
false
false
false
false
false
0
set_response(const string &r) { if (r == "DAS" || r == "das") { d_response = DAS_Response; d_action = "das" ; } else if (r == "DDS" || r == "dds") { d_response = DDS_Response; d_action = "dds" ; } else if (r == "DataDDS" || r == "dods") { d_response = DataDDS_Response; d_action = "dods" ; ...
false
false
false
false
false
0
fz_mesh_type3_process(fz_context *ctx, fz_shade *shade, fz_matrix ctm, fz_mesh_processor *painter) { fz_point p0, p1; float r0, r1; fz_point e; float er, rs; p0.x = shade->u.l_or_r.coords[0][0]; p0.y = shade->u.l_or_r.coords[0][1]; r0 = shade->u.l_or_r.coords[0][2]; p1.x = shade->u.l_or_r.coords[1][0]; p1.y ...
false
false
false
false
false
0
__attach_device(struct iommu_dev_data *dev_data, struct protection_domain *domain) { int ret; /* * Must be called with IRQs disabled. Warn here to detect early * when its not. */ WARN_ON(!irqs_disabled()); /* lock domain */ spin_lock(&domain->lock); ret = -EBUSY; if (dev_data->domain != NULL) go...
false
false
false
false
false
0
cb_emit_delete (cb_tree file) { if (file == cb_error_node) { return; } file = cb_ref (file); if (file == cb_error_node) { return; } current_statement->file = file; if (CB_FILE (file)->organization == COB_ORG_SORT) { cb_error_x (CB_TREE (current_statement), _("Operation not allowed on SORT files")); } c...
false
false
false
true
false
1
reset_gazel(struct IsdnCardState *cs) { unsigned long plxcntrl, addr = cs->hw.gazel.cfg_reg; switch (cs->subtyp) { case R647: writereg(addr, 0, 0); HZDELAY(10); writereg(addr, 0, 1); HZDELAY(2); break; case R685: plxcntrl = inl(addr + PLX_CNTRL); plxcntrl |= (RESET_9050 + RESET_GAZEL); outl(plxcntr...
false
false
false
false
false
0
__ibv_get_device_list(int *num) { struct ibv_device **l; int i; if (num) *num = 0; pthread_once(&device_list_once, count_devices); if (num_devices < 0) { errno = -num_devices; return NULL; } l = calloc(num_devices + 1, sizeof (struct ibv_device *)); if (!l) { errno = ENOMEM; return NULL; } for ...
false
false
false
false
false
0
cx8800_bit_setscl(void *data, int state) { struct cx88_core *core = data; if (state) core->i2c_state |= 0x02; else core->i2c_state &= ~0x02; cx_write(MO_I2C, core->i2c_state); cx_read(MO_I2C); }
false
false
false
false
false
0
cli_print_volume_status_fdtable (dict_t *dict, char *prefix) { int ret = -1; char key[1024] = {0,}; int refcount = 0; uint32_t maxfds = 0; int firstfree = 0; int openfds = 0; int fd_pid ...
false
false
false
false
false
0
setproctitle(const char *fmt, ...) { char buf[SPT_MAXTITLE + 1]; /* use buffer in case argv[0] is passed */ va_list ap; char *nul; int len, error; if (!SPT.base) return; if (fmt) { va_start(ap, fmt); len = vsnprintf(buf, sizeof buf, fmt, ap); va_end(ap); } else { len = snprintf(buf, sizeof buf, "%s",...
false
false
false
false
false
0
init_hard_regno_rename (int regno) { int cur_reg; SET_HARD_REG_BIT (sel_hrd.regs_for_rename[regno], regno); for (cur_reg = 0; cur_reg < FIRST_PSEUDO_REGISTER; cur_reg++) { /* We are not interested in renaming in other regs. */ if (!TEST_HARD_REG_BIT (sel_hrd.regs_ever_used, cur_reg)) co...
false
false
false
false
false
0
kernfs_get(struct kernfs_node *kn) { if (kn) { WARN_ON(!atomic_read(&kn->count)); atomic_inc(&kn->count); } }
false
false
false
false
false
0
pa_file_seek(pa_file_t *file, pa_seek_where_t where, pa_off_t *offset) { pa_off_t rv = lseek(file->handle, *offset, where); *offset = rv; return rv == -1? errno: PA_SUCCESS; }
false
false
false
false
false
0
emitComment(Scope *sc) { //printf("ConditionalDeclaration::emitComment(sc = %p)\n", sc); if (condition->inc) { AttribDeclaration::emitComment(sc); } else if (sc->docbuf) { /* If generating doc comment, be careful because if we're inside * a template, then include(NULL, N...
false
false
false
false
false
0
do_geom(char *dev, int silent) { int fd; struct geometry R; fd = my_open(dev, 0, silent); if (fd < 0) return; R = get_geometry(dev, fd, silent); if (R.cylinders) printf(_("%s: %ld cylinders, %ld heads, %ld sectors/track\n"), dev, R.cylinders, R.heads, R.sectors); close(fd); }
false
false
false
false
false
0
gst_data_uri_src_start (GstBaseSrc * basesrc) { GstDataURISrc *src = GST_DATA_URI_SRC (basesrc); GST_OBJECT_LOCK (src); if (src->uri == NULL || *src->uri == '\0' || src->buffer == NULL) goto no_uri; GST_OBJECT_UNLOCK (src); return TRUE; /* ERRORS */ no_uri: { GST_OBJECT_UNLOCK (src); GST_EL...
false
false
false
false
false
0
ParseFloatTextureParameter(FCDEffectStandard* effectStandard, xmlNode* parameterNode, FCDEffectParameterFloat* value, uint32 bucketIndex) { bool status = true; // Look for <texture> elements, they pre-empt everything else if (bucketIndex != FUDaeTextureChannel::UNKNOWN) { size_t originalSize = effectStand...
false
false
false
false
false
0
genhdrfile() { OutBuffer hdrbufr; hdrbufr.doindent = 1; hdrbufr.printf("// D import file generated from '%s'", srcfile->toChars()); hdrbufr.writenl(); HdrGenState hgs; memset(&hgs, 0, sizeof(hgs)); hgs.hdrgen = 1; toCBuffer(&hdrbufr, &hgs); // Transfer image to file hdrfile->...
false
false
false
false
false
0
get_buf(uint32_t addr, BUFHEAD *prev_bp, int newpage) { BUFHEAD *bp; uint32_t is_disk_mask; int is_disk, segment_ndx; SEGMENT segp; is_disk = 0; is_disk_mask = 0; if (prev_bp) { bp = prev_bp->ovfl; if (!bp || (bp->addr != addr)) bp = NULL; if (!newpage) is_disk = BUF_DISK; } else { /* G...
false
false
false
false
false
0
find_pal_layout(pal_class *layouts, const char *pal_class, int *lsize) { pal_layout *pl = NULL; while (layouts->layout && layouts->name) { if (strcmp(layouts->name, pal_class) == 0) { pl = layouts->layout; break; } layouts++; } int s = 0; if (pl) { pal_layout *p = pl; while (p->name) { p++; s...
false
false
false
false
false
0
upnp_service_gslist_find(GSList *services, enum upnp_service_type type) { GSList *sl; GM_SLIST_FOREACH(services, sl) { upnp_service_t *usd = sl->data; upnp_service_check(usd); if (usd->type == type) return usd; } return NULL; }
false
false
false
false
false
0
cls_copy_data_from_queue_to_uart(struct jsm_channel *ch) { u16 tail; int n; int qlen; u32 len_written = 0; struct circ_buf *circ; if (!ch) return; circ = &ch->uart_port.state->xmit; /* No data to write to the UART */ if (uart_circ_empty(circ)) return; /* If port is "stopped", don't send any data to th...
false
false
false
false
false
0
apply_implicit_conversion(const glsl_type *to, ir_rvalue * &from, struct _mesa_glsl_parse_state *state) { void *ctx = state; if (to->base_type == from->type->base_type) return true; /* This conversion was added in GLSL 1.20. If the compilation mode is * GLSL 1.10, the conversion is skipped. ...
false
false
false
false
false
0
ppa_interrupt(struct work_struct *work) { ppa_struct *dev = container_of(work, ppa_struct, ppa_tq.work); struct scsi_cmnd *cmd = dev->cur_cmd; if (!cmd) { printk(KERN_ERR "PPA: bug in ppa_interrupt\n"); return; } if (ppa_engine(dev, cmd)) { schedule_delayed_work(&dev->ppa_tq, 1); return; } /* Command mu...
false
false
false
false
false
0
evbuffer_free_trailing_empty_chains(struct evbuffer *buf) { struct evbuffer_chain **ch = buf->last_with_datap; /* Find the first victim chain. It might be *last_with_datap */ while ((*ch) && ((*ch)->off != 0 || CHAIN_PINNED(*ch))) ch = &(*ch)->next; if (*ch) { EVUTIL_ASSERT(evbuffer_chains_all_empty(*ch)); e...
false
false
false
false
false
0
dump(generic_file & f) const { infinint number = contents.size(); vector<tlv>::iterator it = const_cast<tlv_list *>(this)->contents.begin(); vector<tlv>::iterator fin = const_cast<tlv_list *>(this)->contents.end(); number.dump(f); while(it != fin) { it->write(f); it++; } }
false
false
false
false
false
0
gnc_sx_instances_free(GncSxInstances *instances) { GList *instance_iter; if (instances->variable_names != NULL) { g_hash_table_destroy(instances->variable_names); } instances->variable_names = NULL; instances->sx = NULL; for (instance_iter = instances->instance_list; instance_iter...
false
false
false
false
false
0
output_filter(const unsigned char *id, const unsigned char *prefix, unsigned short plen, unsigned int ifindex) { int res; res = do_filter(output_filters, id, prefix, plen, NULL, ifindex, 0); if(res < 0) res = 0; return res; }
false
false
false
false
false
0
destroy_cmdline_handler() { size_t i; for (i = 0; i < cmd_count; ++i) { loc_free(cmds[i].cmd); loc_free(cmds[i].help); } loc_free(cmds); loc_free(connect_hnds); loc_free(disconnect_hnds); }
false
false
false
false
false
0