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
find_confirmed_client(clientid_t *clid, bool sessions, struct nfsd_net *nn) { struct list_head *tbl = nn->conf_id_hashtbl; lockdep_assert_held(&nn->client_lock); return find_client_in_id_table(tbl, clid, sessions); }
false
false
false
false
false
0
disambiguate_loops_with_multiple_latches (void) { loop_iterator li; struct loop *loop; FOR_EACH_LOOP (li, loop, 0) { if (!loop->latch) disambiguate_multiple_latches (loop); } }
false
false
false
false
false
0
find_item_in_menu(GtkWidget *menu, gchar *name) { GList *children = gtk_container_get_children(GTK_CONTAINER(GTK_MENU_SHELL(menu))); GList *amenu = children; const gchar *existing_name; while (amenu) { GtkWidget *item = GTK_WIDGET(amenu->data); if ((existing_name = g_object_get_data(G_OBJECT(item), "s_name")) !...
false
false
false
false
false
0
GetOverview( int iOverview ) { if( apoOverviews.size() > 0 ) { if( iOverview < 0 || iOverview >= (int) apoOverviews.size() ) return NULL; if( apoOverviews[iOverview].poBand == NULL && !apoOverviews[iOverview].bTriedToOpen ) { apoOverviews[iOverview]...
false
false
false
false
false
0
Union(const geom::MultiPolygon* multipoly) { std::vector<geom::Polygon*> polys; typedef geom::MultiPolygon::const_iterator iterator; iterator end = multipoly->end(); for (iterator i = multipoly->begin(); i != end; ++i) polys.push_back(dynamic_cast<geom::Polygon*>(*i)); CascadedPolygonU...
false
false
false
false
false
0
posix_fork(s48_call_t call) { pid_t pid = fork(); if (pid < 0) s48_os_error_2(call, "posix_fork", errno, 0); return s48_enter_long_2(call, pid); }
false
false
false
false
false
0
ddk750_setModeTiming(mode_parameter_t *parm, clock_type_t clock) { pll_value_t pll; unsigned int uiActualPixelClk; pll.inputFreq = DEFAULT_INPUT_CLOCK; pll.clockType = clock; uiActualPixelClk = calcPllValue(parm->pixel_clock, &pll); if (getChipType() == SM750LE) { /* set graphic mode via IO method */ outb_p...
false
false
false
false
false
0
mprAddKey(MprHash *hash, cvoid *key, cvoid *ptr) { MprKey *sp, *prevSp; int index; if (hash == 0) { mprAssert(hash); return 0; } lock(hash); sp = lookupHash(&index, &prevSp, hash, key); if (sp != 0) { /* Already exists. Just update the data. ...
false
false
false
false
false
0
has_mate_threat(Color c) { UndoInfo u1, u2; Color stm = this->side_to_move(); // The following lines are useless and silly, but prevents gcc from // emitting a stupid warning stating that u1.lastMove and u1.epSquare might // be used uninitialized. u1.lastMove = lastMove; u1.epSquare = epSquare; if(thi...
false
false
false
false
false
0
unblockJobs() { // WORKAROUND: Queue an empty job to force ThreadWeaver to awaken threads if (searchJobs.isEmpty() && Weaver::instance()->isIdle()) { qDeleteAll(oldSearchJobs); oldSearchJobs.clear(); checkTearDown(); return; } DummyJob...
false
false
false
false
false
0
gausselim(bmp) BMDATA *bmp; { word2 *v, *vect, *vectb, *piv; unsigned pivot, minc; int i; int vn, v2n, baslen; size_t rk; minc = bmp->matinc; rk = bmp->rank; vn = bmp->vlen; v2n = 2*vn; baslen = bmp->baslen; vect = bmp->bitmat + rk * minc; vectb = vect + vn; setarr(...
false
false
false
false
false
0
basic_authorization_field(const char* user, const char* pass) { if(!user&& !pass) return 0; String combined; if(user) combined<<user; combined<<":"; if(pass) combined<<pass; String* result=new String("Basic "); *result<<pa_base64_encode(combined.cstr(), combined.length()); return result; }
false
false
false
false
false
0
CompileFile(const string& f, const string& untilPro, bool searchForPro) { ifstream in(f.c_str()); if( !in) return false; // maybe throw exception here RefDNode theAST; try { GDLLexer lexer(in, f, GDLParser::NONE, untilPro, searchForPro); GDLParser& parser=lexer.Parser(); // parsing ...
false
false
false
false
false
0
carl9170_unregister_hwrng(struct ar9170 *ar) { if (ar->rng.initialized) { hwrng_unregister(&ar->rng.rng); ar->rng.initialized = false; } }
false
false
false
false
false
0
ptn3460_select_edid(struct ptn3460_bridge *ptn_bridge) { int ret; char val; /* Load the selected edid into SRAM (accessed at PTN3460_EDID_ADDR) */ ret = ptn3460_write_byte(ptn_bridge, PTN3460_EDID_SRAM_LOAD_ADDR, ptn_bridge->edid_emulation); if (ret) { DRM_ERROR("Failed to transfer EDID to sram, ret=%d\n", r...
false
false
false
false
false
0
ink_comboboxentry_action_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { Ink_ComboBoxEntry_Action *action = INK_COMBOBOXENTRY_ACTION (object); switch(property_id) { case PROP_MODEL: action->model = GTK_TREE_MODEL( g_value_get_object( value )); break; case P...
false
false
false
false
false
0
jabber_params_split(const char *line, int allow_empty) { char **arr, **ret = NULL; int num = 0, i = 0, z = 0; if (!line) return NULL; arr = array_make(line, " ", 0, 1, 1); while (arr[i]) { ret = (char **)xrealloc (ret, (num + 2)*sizeof (char *)); if (!z) { if (arr[i][0] == '-' && arr[i][1] == '-' && xs...
false
false
false
false
false
0
firstattr(Agedge_t *e) { Agraph_t *g; if (!e) return NULL; g = agraphof(agtail(e)); return agnxtattr(g,AGEDGE,NULL); }
false
false
false
false
false
0
_pullBinPointAdd(pullContext *pctx, pullBin *bin, pullPoint *point) { static const char me[]="_pullBinPointAdd"; int pntI; pullPtrPtrUnion pppu; AIR_UNUSED(pctx); if (!(bin->pointArr)) { pppu.points = &(bin->point); bin->pointArr = airArrayNew(pppu.v, &(bin->pointNum), ...
false
false
false
false
false
0
totem_pl_item_free (gpointer data, gpointer user_data) { TotemPlItem *item = (TotemPlItem *) data; if (!item) return; g_free (item->uri); g_free (item->title); g_free (item->subtitle); g_slice_free (TotemPlItem, item); }
false
false
false
false
false
0
sshv2_buffer_get_string (gftp_request * request, sshv2_message * message, int return_string) { guint32 len, buflen; char *string; if (sshv2_buffer_get_int32 (request, message, 0, 0, &len) < 0) return (NULL); buflen = message->end - message->pos; if (len > SSH_MAX_STRING_SIZE || ...
false
false
false
false
false
0
setComposite(UChar32 composite, int32_t combMarkIndex) { fArray[fLastStarterIndex]=composite<<8; // Remove the combining mark that contributed to the composite. --fLength; while(combMarkIndex<fLength) { fArray[combMarkIndex]=fArray[combMarkIndex+1]; ++combMarkInde...
false
false
false
false
false
0
setInitialSize() { double w = m_modelPart->localProp("width").toDouble(); if (w == 0) { // set the size so the infoGraphicsView will display the size as you drag modelPart()->setLocalProp("width", 25.4 * OriginalWidth / GraphicsUtils::StandardFritzingDPI); modelPart()->setLocalProp("height", 25.4 * OriginalHei...
false
false
false
false
false
0
__ecereMethod_OptionBox_UnsetOption(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * options) { struct OptionBox * __ecerePointer_OptionBox = (struct OptionBox *)(this ? (((char *)this) + __ecereClass_OptionBox->offset) : 0); uint64 value = (uint64)0; (memcpy((uint6...
false
false
false
true
true
1
rerere_remaining(struct string_list *merge_rr) { int i; if (read_cache() < 0) return error("Could not read index"); for (i = 0; i < active_nr;) { int conflict_type; struct cache_entry *e = active_cache[i]; i = check_one_conflict(i, &conflict_type); if (conflict_type == PUNTED) string_list_insert(merge_...
false
false
false
false
false
0
defendel(struct Global *global, char *name, int delete) /* TRUE to delete a symbol */ { /* * Enter this name in the lookup table (delete = FALSE) * or delete this name (delete = TRUE). * Returns a pointer to the define block (delete = FALSE) * Returns NULL if the symbol wasn't defined (delete = TR...
false
false
false
false
false
0
operator==(const Collator& that) const { /* only checks for address equals here */ if (Collator::operator==(that)) return TRUE; if (getDynamicClassID() != that.getDynamicClassID()) return FALSE; /* not the same class */ RuleBasedCollator& thatAlias = (RuleBasedCollator&)that; // weiv: use C functi...
false
false
false
false
false
0
fh_decomp_raw(const unfs3_fh_t * fh) { int rec = 0; static char result[NFS_MAXPATHLEN]; /* valid fh? */ if (!fh) return NULL; /* special case for root directory */ if (fh->len == 0) return "/"; rec = fh_rec(fh, 0, "/", result); if (rec) return result; /* could not find object...
false
false
false
false
false
0
do_diagonale(rect_tab, nb_rect, xtab, ytab) rect_t rect_tab[]; type_l nb_rect; long xtab[], ytab[]; { register int i, j; register coord_t *tab; tab = (coord_t * )malloc(nb_rect * 2 * sizeof(coord_t)); if (tab == (coord_t * )NULL) { ruterror( RDS_NOT_ENOUGH_MEMORY, "do_diagonale"); return((coord_t ...
false
false
false
false
false
0
isDynamicAlloca(AllocaInst &AI) const { return AI.isArrayAllocation() || !AI.isStaticAlloca(); }
false
false
false
false
false
0
parse_option (int key, char *arg, struct argp_state *state) { char *endp; switch (key) { case 's': endp = strchr (arg, ':'); if (endp == NULL) /* No specific database, change them all. */ for (int i = 0; databases[i].name != NULL; ++i) __nss_configure_lookup (databases[i].name, arg); ...
false
false
false
false
false
0
at76_ledtrig_tx_timerfunc(unsigned long data) { static int tx_lastactivity; if (tx_lastactivity != tx_activity) { tx_lastactivity = tx_activity; led_trigger_event(ledtrig_tx, LED_FULL); mod_timer(&ledtrig_tx_timer, jiffies + HZ / 4); } else led_trigger_event(ledtrig_tx, LED_OFF); }
false
false
false
false
false
0
tomoyo_parse_name_union(struct tomoyo_acl_param *param, struct tomoyo_name_union *ptr) { char *filename; if (param->data[0] == '@') { param->data++; ptr->group = tomoyo_get_group(param, TOMOYO_PATH_GROUP); return ptr->group != NULL; } filename = tomoyo_read_token(param); if (!tomoyo_correct_word(file...
false
false
false
false
false
0
cursor_home() { Gtk::TextIter it = get_buffer()->get_insert()->get_iter(); it.set_line_offset( 0 ); get_buffer()->place_cursor( it ); }
false
false
false
false
false
0
exo_icon_view_real_activate_cursor_item (ExoIconView *icon_view) { GtkTreePath *path; GtkCellRendererMode mode; ExoIconViewCellInfo *info = NULL; if (!icon_view->priv->cursor_item) return FALSE; info = g_list_nth_data (icon_view->priv->cell_list, icon_view->priv->cursor_cell); ...
false
false
false
false
false
0
tx_start(struct slgt_info *info) { if (!info->tx_enabled) { wr_reg16(info, TCR, (unsigned short)((rd_reg16(info, TCR) | BIT1) & ~BIT2)); info->tx_enabled = true; } if (desc_count(info->tbufs[info->tbuf_start])) { info->drop_rts_on_tx_done = false; if (info->params.mode != MGSL_MODE_ASYNC) { if (info...
false
false
false
false
false
0
r128_get_line(struct r128_ctx *ctx, struct r128_image *im, int line, int rotation) { int min_len = ctx->min_len, max_gap = ctx->max_gap; u_int8_t *data; int len, start = 0, pixmult; struct r128_line *linetab = im->lines; if(rotation & 1) linetab += im->height; if(linetab[line].offset != 0xffffffff) ...
false
false
false
false
false
0
DefaultOpenEDB( std::string filename, std::string access ) { // it would be nice to be able to pass in an appropriate PCIDSKInterface! PCIDSKFile *file = PCIDSK::Open( filename, access, NULL ); return new PCIDSK_EDBFile( file ); }
false
false
false
false
false
0
add_action( const string & action_name, const string & result, const string & timestamp, const string & content ) { remove_action( action_name ); xml::element_ptr action( new xml::element(action_name) ); m_root->elements.push_back( act...
false
false
false
false
false
0
rtl2832u_frontend_callback(void *adapter_priv, int component, int cmd, int arg) { struct i2c_adapter *adapter = adapter_priv; struct device *parent = adapter->dev.parent; struct i2c_adapter *parent_adapter; struct dvb_usb_device *d; struct rtl28xxu_dev *dev; /* * All tuners are connected to demod muxed I2C a...
false
false
false
false
false
0
ksDel(KeySet *ks) { int rc; if (!ks) return -1; rc=ksClose(ks); kdbiFree(ks); return rc; }
false
false
false
false
false
0
blk_alloc_in_rg(struct gfs2_sbd *sdp, unsigned int type, struct rgrp_tree *rl, uint64_t *blkno) { struct gfs2_rindex *ri; struct gfs2_rgrp *rg; unsigned int block, bn = 0, x = 0, y = 0; unsigned int state; unsigned int release = 0; struct gfs2_buffer_head *bh; if (rl == NULL || rl->rg.rg_free == 0) { errno = ...
false
false
false
false
false
0
CheckAttributeNamesTypes(TupleDesc tupdesc, char relkind, bool allow_system_table_mods) { int i; int j; int natts = tupdesc->natts; /* Sanity check on column count */ if (natts < 0 || natts > MaxHeapAttributeNumber) ereport(ERROR, (errcode(ERRCODE_TOO_MANY_COLUMNS), errmsg("tables can have...
false
false
false
false
false
0
DES_InitContext(DESContext *cx, const unsigned char *key, unsigned int keylen, const unsigned char *iv, int mode, unsigned int encrypt, unsigned int unused) { DESDirection opposite; if (!cx) { PORT_SetError(SEC_ERROR_INVALID_ARGS); return SECFailure; } cx->direction = encrypt ? D...
false
false
false
false
false
0
FoldAll(int action) { pdoc->EnsureStyledTo(pdoc->Length()); int maxLine = pdoc->LinesTotal(); bool expanding = action == SC_FOLDACTION_EXPAND; if (action == SC_FOLDACTION_TOGGLE) { // Discover current state for (int lineSeek = 0; lineSeek < maxLine; lineSeek++) { if (pdoc->GetLevel(lineSeek) & SC_FOLDLEVELHE...
false
false
false
false
false
0
ReadGeometryVertexDeclaration(VertexData *dest) { if (!AtEnd()) { uint16_t id = ReadHeader(); while (!AtEnd() && id == M_GEOMETRY_VERTEX_ELEMENT) { ReadGeometryVertexElement(dest); if (!AtEnd()) id = ReadHeader(); } if (!AtEnd()) RollbackHeader(); } }
false
false
false
false
false
0
initMemOFile(OFile *fp, char *s, int len) { fp->fp = 0; fp->s = s; fp->len = 0; fp->limit = s?len:0; fp->alloc = s?0:1; fp->fail = 0; }
false
false
false
false
false
0
gnc_tree_view_account_set_selected_account (GncTreeViewAccount *view, Account *account) { GtkTreeModel *model, *f_model, *s_model; GtkTreePath *path, *f_path, *s_path, *parent_path; GtkTreeSelection *selection; ENTER("view %p, account %p (%s)", view, account, xaccAccountGetName (accou...
false
false
false
false
false
0
ajCvtSposToPosStart(size_t len, size_t imin, ajlong ipos) { ajlong jpos; ajlong jmin = imin; ajlong jlen = len; if(ipos < 0) jpos = len + ipos; else jpos = ipos; if(jpos >= jlen) jpos = len - 1; if(jpos < jmin) jpos = imin; return (size_t) jpos; }
false
false
false
false
false
0
cmdlookup(const char *name, int add) { unsigned int hashval; const char *p; struct tblentry *cmdp; struct tblentry **pp; p = name; hashval = (unsigned char)*p << 4; while (*p) hashval += (unsigned char)*p++; hashval &= 0x7FFF; pp = &cmdtable[hashval % CMDTABLESIZE]; for (cmdp = *pp; cmdp; cmdp = cmdp->next...
false
false
false
false
false
0
ext4_expand_extra_isize(struct inode *inode, unsigned int new_extra_isize, struct ext4_iloc iloc, handle_t *handle) { struct ext4_inode *raw_inode; struct ext4_xattr_ibody_header *header; if (EXT4_I(inode)->i_extra_isize >= new_extra_isize) return 0; raw_inode = ext4_raw_inode(&iloc); hea...
false
false
false
false
false
0
PyFF_Glyph_get_verticalComponents(PyFF_Glyph *self,void *closure) { if ( self->sc->vert_variants==0 || self->sc->vert_variants->part_cnt==0 ) Py_RETURN_NONE; return( BuildComponentTuple(self->sc->vert_variants )); }
false
false
false
false
false
0
handle_sigchld( int sig ) { const int oerrno = errno; pid_t pid; int status; #ifndef HAVE_SIGSET /* Set up handler again. */ (void) signal( SIGCHLD, handle_sigchld ); #endif /* ! HAVE_SIGSET */ /* Reap defunct children until there aren't any more. */ for (;;) { #ifdef HAVE_WAITPID pi...
false
false
false
false
false
0
FindFirstMap() { ASSERT(is_inline_cache_stub()); AssertNoAllocation no_allocation; int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); for (RelocIterator it(this, mask); !it.done(); it.next()) { RelocInfo* info = it.rinfo(); Object* object = info->target_object(); if (object->IsMap()) return...
false
false
false
false
false
0
roken_gethostbyaddr(const void *addr, size_t len, int type) { struct in_addr a; const char *p; struct hostent *he; he = gethostbyaddr(addr, len, type); if(he) return he; if(type != AF_INET || len != 4) return NULL; p = addr; a.s_addr = htonl((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | ...
false
false
false
false
false
0
gst_audio_rate_change_state (GstElement * element, GstStateChange transition) { GstAudioRate *audiorate = GST_AUDIO_RATE (element); switch (transition) { case GST_STATE_CHANGE_PAUSED_TO_READY: break; case GST_STATE_CHANGE_READY_TO_PAUSED: audiorate->in = 0; audiorate->out = 0; audio...
false
false
false
false
false
0
redrawStackPlot() { if (showStack->isChecked()) { // turn off display updates whilst we // do this, it takes a while and is prone // to screen flicker stackFrame->setUpdatesEnabled(false); // remove current plots - then recreate resetStackedDatas(); // now ...
false
false
false
false
false
0
jmpBVC(machine_6502 *machine, m6502_AddrMode adm){ Pointer ptr; BOOL isValue = getValue(machine, adm, &ptr); warnValue(isValue); if (bitOff(machine->regP,OVERFLOW_FL)) jumpBranch(machine, ptr.addr); }
false
false
false
false
false
0
isConnectorColor(ViewLayer::ViewID m_viewID, const QColor & color) { RatsnestColors * ratsnestColors = m_viewList.value(m_viewID, NULL); if (ratsnestColors == NULL) return false; foreach (RatsnestColor * ratsnestColor, ratsnestColors->m_ratsnestColorList) { if (ratsnestColor->m_ratsnest == color) { return (rat...
false
false
false
false
false
0
AddLODMapper(vtkMapper *mapper) { if (this->MediumMapper) { this->DeleteOwnLODs(); } if (this->Mapper == NULL) { this->SetMapper(mapper); } this->LODMappers->AddItem(mapper); }
false
false
false
false
false
0
dump_child_devices(int length) { struct bdb_block *block; struct bdb_child_devices *child_devs; struct child_device_config *child; int i; block = find_section(BDB_CHILD_DEVICE_TABLE, length); if (!block) { printf("No child device table found\n"); return; } child_devs = block->data; printf("Child devices...
false
false
false
false
false
0
OutputFeatureWeightsForHypergraph(size_t index, const FeatureFunction* ff, std::ostream &outputSearchGraphStream) { size_t numScoreComps = ff->GetNumScoreComponents(); if (numScoreComps != ScoreProducer::unlimited) { vector<float> values = StaticData::Instance().GetAllWeights().GetScoresForProducer(ff); if ...
false
false
false
false
false
0
octstr_case_nsearch(const Octstr *haystack, const Octstr *needle, long pos, long n) { long i, j; int c1, c2; seems_valid(haystack); seems_valid(needle); gw_assert(pos >= 0); /* Always "find" an empty string */ if (needle->len == 0) return 0; for (i = pos; i <= haystack->len - ...
false
false
false
false
false
0
parse_zph_mode(enum zph_mode *mode) { char *token = strtok(NULL, w_space); if (!token) self_destruct(); if (strcmp(token, "off") == 0) *mode = ZPH_OFF; else if (strcmp(token, "tos") == 0) *mode = ZPH_TOS; else if (strcmp(token, "priority") == 0) *mode = ZPH_PRIORITY; else if (strcmp(token, "...
false
false
false
false
false
0
flattenTo2D() { for( int iRing = 0; iRing < nRingCount; iRing++ ) papoRings[iRing]->flattenTo2D(); nCoordDimension = 2; }
false
false
false
false
false
0
alm_file_type_blacklist_populate_file_types (AlmFileTypeBlacklist* self) { AlmBlacklist* _tmp0_ = NULL; GHashTable* _tmp1_ = NULL; GHashTable* _tmp2_ = NULL; GList* _tmp3_ = NULL; g_return_if_fail (self != NULL); _tmp0_ = self->priv->blacklist_interface; _tmp1_ = alm_blacklist_get_all_templates (_tmp0_); _tmp2_...
false
false
false
false
false
0
strucsdist(const uint32_t* aary, size_t anum, const uint32_t* bary, size_t bnum) { _assert_(aary && anum <= MEMMAXSIZ && bary && bnum <= MEMMAXSIZ); return anum > UINT8MAX || bnum > UINT8MAX ? levdist<const uint32_t, uint32_t>(aary, anum, bary, bnum) : levdist<const uint32_t, uint8_t>(aary, anum, bary, bnum...
false
false
false
false
false
0
tracker_sparql_expression_escape_sql_string_literal (TrackerSparqlExpression* self, const gchar* literal) { gchar* result = NULL; const gchar* _tmp0_; gchar** _tmp1_; gchar** _tmp2_ = NULL; gchar** _tmp3_; gint _tmp3__length1; gchar* _tmp4_ = NULL; gchar* _tmp5_; gchar* _tmp6_ = NULL; gchar* _tmp7_; #line 71 ...
false
false
false
false
false
0
get_e ( uint16_t ioaddr, int offset ) { GO_WINDOW(ioaddr,0); if (!eeprom_rdy(ioaddr)) return (0xffff); outw(EEPROM_CMD_RD | offset, ioaddr + EP_W0_EEPROM_COMMAND); if (!eeprom_rdy(ioaddr)) return (0xffff); return (inw(ioaddr + EP_W0_EEPROM_DATA)); }
false
false
false
false
false
0
parse_rotation (ClutterActor *actor, JsonNode *node, RotationInfo *info) { JsonArray *array; guint len, i; gboolean retval = FALSE; if (JSON_NODE_TYPE (node) != JSON_NODE_ARRAY) { g_warning ("Invalid node of type '%s' found, expecting an array", js...
false
false
false
false
false
0
doTest(std::vector<std::string> &Prefix, std::vector<std::string> &Suffix, std::string &Error) { sys::Path PrefixOutput; Module *OrigProgram = 0; if (!Prefix.empty()) { outs() << "Checking to see if these passes crash: " << getPassesString(Prefix) << ":...
false
false
false
false
false
0
decode_test_stateid(struct xdr_stream *xdr, struct nfs41_test_stateid_res *res) { __be32 *p; int status; int num_res; status = decode_op_hdr(xdr, OP_TEST_STATEID); if (status) return status; p = xdr_inline_decode(xdr, 4); if (unlikely(!p)) goto out_overflow; num_res = be32_to_cpup(p++); if (num...
false
false
false
false
false
0
read_maps(unsigned long addr, char *buf) { FILE *f; char line[MAPS_BUF_SZ]; char *tmp; f = fopen("/proc/self/maps", "r"); if (!f) { ERROR("Failed to open /proc/self/maps: %s\n", strerror(errno)); return -1; } while (1) { unsigned long start, end, off, ino; int ret; tmp = fgets(line, MAPS_BUF_SZ, f);...
false
false
false
false
false
0
_wrap_svn_repos_fs_change_node_prop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_fs_root_t *arg1 = (svn_fs_root_t *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; svn_string_t *arg4 = (svn_string_t *) 0 ; apr_pool_t *arg5 = (apr_pool_t *) 0 ; apr_pool_t *_global...
false
false
false
false
false
0
ComputeFPSForThisFrame(void) { // In the following paragraph the framerate calculation is done. // There are basically two ways to do this: // The first way is to use SDL_GetTicks(), a function measuring milliseconds // since the initialisation of the SDL. // The second way is to use gettimeofday, a standard...
false
false
false
false
false
0
start (unsigned channels, unsigned samplerate, unsigned bits_per_sample) { yield = true; PWaitAndSignal m_pri(core_mutex[primary]); if (current_primary_config.active) { PTRACE(1, "AudioOutputCore\tTrying to start output device although already started"); return; } internal_set_manager(primary, desir...
false
false
false
false
false
0
exec_page_free(cpu_mips_t *cpu,insn_exec_page_t *p) { if (p) { p->next = cpu->exec_page_free_list; cpu->exec_page_free_list = p; cpu->exec_page_alloc--; } }
false
false
false
false
false
0
l2_connected(struct FsmInst *fi, int event, void *arg) { struct PStack *st = fi->userdata; struct sk_buff *skb = arg; int pr = -1; if (!get_PollFlag(st, skb)) { l2_mdl_error_ua(fi, event, arg); return; } dev_kfree_skb(skb); if (test_and_clear_bit(FLG_PEND_REL, &st->l2.flag)) l2_disconnect(fi, event, arg)...
false
false
false
false
false
0
ParseConditionalExpression(bool accept_IN, bool* ok) { // ConditionalExpression :: // LogicalOrExpression // LogicalOrExpression '?' AssignmentExpression ':' AssignmentExpression // We start using the binary expression parser for prec >= 4 only! Expression* expression = ParseBinaryExpression(4, accept_IN...
false
false
false
false
false
0
gst_tee_do_push (GstTee * tee, GstPad * pad, gpointer data, gboolean is_list) { GstFlowReturn res; /* Push */ if (pad == tee->pull_pad) { /* don't push on the pad we're pulling from */ res = GST_FLOW_OK; } else if (is_list) { res = gst_pad_push_list (pad, gst_buffer_list_ref (GST_BU...
false
false
false
false
false
0
buildBytes(UStringTrieBuildOption buildOption, UErrorCode &errorCode) { if(U_FAILURE(errorCode)) { return; } if(bytes!=NULL && bytesLength>0) { // Already built. return; } if(bytesLength==0) { if(elementsLength==0) { errorCode=U_INDEX_OUTOFBOUNDS_ERROR; ...
false
false
false
false
false
0
jswrap_graphics_fillPoly(JsVar *parent, JsVar *poly) { JsGraphics gfx; if (!graphicsGetFromVar(&gfx, parent)) return; if (!jsvIsIterable(poly)) return; const int maxVerts = 128; short verts[maxVerts]; int idx = 0; JsvIterator it; jsvIteratorNew(&it, poly); while (jsvIteratorHasElement(&it) && idx<maxVer...
false
false
false
false
false
0
destroy_queues (amb_dev * dev) { // all queues assumed empty void * memory = dev->cq.ptrs.start; // includes txq.in, txq.out, rxq[].in and rxq[].out PRINTD (DBG_FLOW, "destroy_queues %p", dev); PRINTD (DBG_INIT, "freeing queues at %p", memory); kfree (memory); return; }
false
false
false
false
false
0
ast_custom_function_find(const char *name) { struct ast_custom_function *acf = NULL; AST_RWLIST_RDLOCK(&acf_root); AST_RWLIST_TRAVERSE(&acf_root, acf, acflist) { if (!strcmp(name, acf->name)) break; } AST_RWLIST_UNLOCK(&acf_root); return acf; }
false
false
false
false
false
0
on_leave_event(GdkEventCrossing * ev) { if (tipTimeout.connected()) { tipTimeout.disconnect(); tooltips->hideTooltip(); } return false; }
false
false
false
false
false
0
component(int what) { switch (what) { case D_CLASS: return &name; case D_CXX_CLASS: return &cxx; case D_HEADER_FILE: return &header_file; case D_SOURCE_FILE: return &source_file; case D_PORT_COUNT: return &port_count_code; case D_PROCESSING: return &processing_code; case ...
false
false
false
false
false
0
mathmlize(MathStream & ms) const { std::string entity; switch (char_) { case '<': entity = "&lt;"; break; case '>': entity = "&gt;"; break; case '&': entity = "&amp;"; break; case ' ': { ms << from_ascii("&nbsp;"); return; } default: break; } if (ms.inText()) { if (entity.empty()) ms.os().p...
false
false
false
false
false
0
alloc_tnd(typ, init, lvl) int typ; struct node *init; int lvl; { register struct init_tend *tnd; if (lvl > 2) { /* * This declaration occurs in an inner compound statement. There * may be slots created for parallel compound statement, but were * freed and can be reused here. */ ...
false
false
false
false
false
0
getraw0vert( gamut *s, double pos[3], /* Return absolute position */ int ix /* Input index */ ) { if (ix < 0) return -1; /* Find then next used in the triangulation and direction 0 */ for (; ix < s->nv; ix++) { if (!(s->verts[ix]->f & GVERT_SET) || !(s->verts[ix]->k0 > 0)) continue; break; } if (...
false
false
false
false
false
0
DownloadPit(void) { deviceDetectedRadioButton->setChecked(false); utilityOutputPlainTextEdit->clear(); heimdallState = HeimdallState::DownloadingPit; heimdallFailed = false; QStringList arguments; arguments.append("download-pit"); arguments.append("--output"); arguments.append(pitDestinationLine...
false
false
false
false
false
0
isdn_info_update(void) { infostruct *p = dev->infochain; while (p) { *(p->private) = 1; p = (infostruct *) p->next; } wake_up_interruptible(&(dev->info_waitq)); }
false
false
false
false
false
0
gfire_buddy_proto_clan_alias_change(gfire_data *p_gfire, guint16 p_packet_len) { guint32 offset; guint32 clanid = 0; guint32 uid = 0; gchar *nick = NULL; gfire_buddy *gf_buddy = NULL; offset = XFIRE_HEADER_LEN; // grab the clanid offset = gfire_proto_read_attr_int32_bs(p_gfire->buff_in, &clanid, 0x6C, offset)...
false
false
false
false
false
0
con_send_alert(cnu user, char *text, char *subject, const char *status) { xmlnode msg = _con_send_alert(user, text, subject, status,0); if(msg) { deliver(dpacket_new(msg), NULL); } }
false
false
false
false
false
0
adt7316_i2c_read(void *client, u8 reg, u8 *data) { struct i2c_client *cl = client; int ret = 0; ret = i2c_smbus_write_byte(cl, reg); if (ret < 0) { dev_err(&cl->dev, "I2C fail to select reg\n"); return ret; } ret = i2c_smbus_read_byte(client); if (ret < 0) { dev_err(&cl->dev, "I2C read error\n"); retur...
false
false
false
false
false
0
get_hmdf_list_under(Hmdf_table *top) { List *list = NULL; List *list0; Hmdf_table *h; for (h = top->children; h != NULL; h = h->brothers) { list = list_append(list, h); list0 = get_hmdf_list_under(h); list = list_concat(list, list0); } return list; }
false
false
false
false
false
0
DeleteStuff() { delete thermal_; delete gray256_; delete gray16_; delete rainbow_; delete redblue16_; delete classic8_; delete topo256_; delete default_; delete userdefined_; std::vector<GRA_color*>::const_iterator end = namedColors_.end(); for( std::vector<GRA_color*>::const_iterator i=namedColor...
false
false
false
false
false
0
inverse( bool* pbIsSingular, float epsilon ) { float determinant = m_elements[ 0 ] * m_elements[ 3 ] - m_elements[ 2 ] * m_elements[ 1 ]; bool isSingular = ( fabs( determinant ) < epsilon ); if( isSingular ) { if( pbIsSingular != NULL ) { *pbIsSingular = true; } return Matrix2f(); } else ...
false
false
false
false
false
0
srv_result_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) { struct srv_result_datastore *srds; struct ast_datastore *datastore; struct srv_context *srv_context; char *parse; const char *host; unsigned short port, priority, weight; unsigned int num; AST_DECLARE_APP_ARGS(args, ...
false
false
false
false
false
0
gtm601_modem_real_createChannels (FsoGsmAbstractModem* base) { Gtm601Modem * self; FsoFrameworkTransport* transport = NULL; FsoFrameworkTransportSpec* _tmp0_ = NULL; FsoFrameworkTransportSpec* _tmp1_ = NULL; FsoFrameworkTransport* _tmp2_ = NULL; FsoGsmStateBasedAtParser* parser = NULL; FsoGsmStateBasedAtParser* ...
false
false
false
false
false
0
xudc_irq(int irq, void *_udc) { struct xusb_udc *udc = _udc; u32 intrstatus; u32 ier; u8 index; u32 bufintr; unsigned long flags; spin_lock_irqsave(&udc->lock, flags); /* * Event interrupts are level sensitive hence first disable * IER, read ISR and figure out active interrupts. */ ier = udc->read_fn(u...
false
false
false
false
false
0