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
AcpiUtCopyEsimpleToIsimple ( ACPI_OBJECT *ExternalObject, ACPI_OPERAND_OBJECT **RetInternalObject) { ACPI_OPERAND_OBJECT *InternalObject; ACPI_FUNCTION_TRACE (UtCopyEsimpleToIsimple); /* * Simple types supported are: String, Buffer, Integer */ switch (ExternalOb...
false
false
false
false
false
0
snd_ali_alloc_pcm_channel(struct snd_ali *codec, int channel) { unsigned int idx = channel & 0x1f; if (codec->synth.chcnt >= ALI_CHANNELS){ dev_err(codec->card->dev, "ali_alloc_pcm_channel: no free channels.\n"); return -1; } if (!(codec->synth.chmap & (1 << idx))) { codec->synth.chmap |= 1 << idx; ...
false
false
false
false
false
0
compare_by_search_relevance (NautilusFile *file_1, NautilusFile *file_2) { gdouble r_1, r_2; get_search_relevance (file_1, &r_1); get_search_relevance (file_2, &r_2); if (r_1 < r_2) { return -1; } if (r_1 > r_2) { return +1; } return 0; }
false
false
false
false
false
0
main_checkfds(void) { #ifdef HAVE_PIPE int fd[2] = { STDIN_FILENO, STDIN_FILENO }; while(fd[0] == STDIN_FILENO || fd[0] == STDOUT_FILENO || fd[0] == STDERR_FILENO || fd[1] == STDIN_FILENO || fd[1] == STDOUT_FILENO || fd[1] == STDERR_FILENO) if(pipe(fd) < 0) return; ...
false
false
false
false
false
0
caml_make_vect(value len, value init) { CAMLparam2 (len, init); CAMLlocal1 (res); mlsize_t size, wsize, i; double d; size = Long_val(len); if (size == 0) { res = Atom(0); } else if (Is_block(init) && Is_in_value_area(init) && Tag_val(init) == Double_tag) { d = Double_val(i...
false
false
false
false
false
0
ipr_build_ata_ioadl64(struct ipr_cmnd *ipr_cmd, struct ata_queued_cmd *qc) { u32 ioadl_flags = 0; struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb; struct ipr_ioadl64_desc *ioadl64 = ipr_cmd->i.ata_ioadl.ioadl64; struct ipr_ioadl64_desc *last_ioadl64 = NULL; int len = qc->nbytes; struct scatterlist *sg; unsign...
false
false
false
false
false
0
GetWebFile(void) { int retVal = 0; CURL *curl; CURLcode res; char proxy[1024]; int proxy_type = 0; if ( getenv("HTTP_PROXY") ) { proxy_type = 1; if (getenv("HTTP_PROXY_PORT") ) { sprintf(proxy, "%s:%s", getenv("HTTP_PROXY"), getenv("HTTP_PROXY_PORT")); } else { ...
false
false
false
false
false
0
kernel_init(unsigned char *mac_addr, int itf) { int rvalue; struct atmlec_msg msg; lec_socket = socket(PF_ATMSVC, SOCK_DGRAM, 0); if (lec_socket < 0) { diag(COMPONENT, DIAG_FATAL, "Kernel socket creation failed: %s", strerror(errno)); ...
false
true
false
false
false
1
set_rescaling_class(const FunctionOfPseudoJet<double> * rescaling_class_in) { // The rescaling is taken into account when particles are set. So // you need to call set_particles again if you set the rescaling // class. We thus warn if there are already some available // particles if (_has_particles) _warn...
false
false
false
false
false
0
MochaSyfFsmTreatRegister( FsmFigure, FbhFigure ) fsmfig_list *FsmFigure; fbfig_list *FbhFigure; { mochasyfinfo *MochaSyfInfo; mochasyfregstate *RegArray; int Index; fbreg_list *FbhReg; fbrin_list *FbhRin; fbbiabl_list *FbhBiAbl; fbbinode_list *FbhBiNode; ch...
false
false
false
false
false
0
freeLocation(Location *loc) { if (loc) { // label will be freed separatly delete loc->xrefs; freeComments(loc); delete loc->addr; delete loc; } }
false
false
false
false
false
0
spy_steal_popup(Widget w, XtPointer client_data, XtPointer call_data) { struct city *pvcity = game_city_by_number(diplomat_target_id); struct player *pvictim = NULL; if(pvcity) pvictim = city_owner(pvcity); /* it is concievable that pvcity will not be found, because something has...
false
false
false
false
false
0
get_result_status (ACE_POSIX_Asynch_Result *asynch_result, int &error_status, size_t &transfer_count) { transfer_count = 0; // Get the error status of the aio_ operation. // The following aio_ptr anathema is required to wor...
false
false
false
false
false
0
esl_msa_MarkFragments(ESL_MSA *msa, double fragthresh) { int i; int pos; for (i = 0; i < msa->nseq; i++) if (msa_get_rlen(msa, i) <= fragthresh * msa->alen) { #ifdef eslAUGMENT_ALPHABET if (msa->flags & eslMSA_DIGITAL) { for (pos = 1; pos <= msa->alen; pos++) { if (esl_abc_XIsResidue(m...
false
false
false
false
true
1
WrapWithGuard(const string& output_file, const string& header_entries) { string guard(string("TPL_") + output_file); ConvertToIdentifier(&guard); guard.append("_H_"); string out; out.append(string("#ifndef ") + guard + "\n"); out.append(string("#define ") + guard + "\n\n"); /...
false
false
false
false
false
0
rtl_hw_phy_config(struct net_device *dev) { struct rtl8169_private *tp = netdev_priv(dev); rtl8169_print_mac_version(tp); switch (tp->mac_version) { case RTL_GIGA_MAC_VER_01: break; case RTL_GIGA_MAC_VER_02: case RTL_GIGA_MAC_VER_03: rtl8169s_hw_phy_config(tp); break; case RTL_GIGA_MAC_VER_04: rtl8169s...
false
false
false
false
false
0
find_chain_entry (AdmEntry *chain, const char *key) { while (chain != NULL) { if (strcasecmp (chain->admFields[0], key) == 0) { return copy_adm_entry (chain); } chain = chain->next; } return NULL; }
false
false
false
false
false
0
yydestruct (int yytype, YYSTYPE yyvalue) #else yydestruct (yytype, yyvalue) int yytype; YYSTYPE yyvalue; #endif { /* Pacify ``unused variable'' warnings. */ (void) yyvalue; switch (yytype) { default: break; } }
false
false
false
false
false
0
vsmp_patch(u8 type, u16 clobbers, void *ibuf, unsigned long addr, unsigned len) { switch (type) { case PARAVIRT_PATCH(pv_irq_ops.irq_enable): case PARAVIRT_PATCH(pv_irq_ops.irq_disable): case PARAVIRT_PATCH(pv_irq_ops.save_fl): case PARAVIRT_PATCH(pv_irq_ops.restore_fl): return paravirt_patch_default(type,...
false
false
false
false
false
0
sreplace(cchar *str, cchar *pattern, cchar *replacement) { MprBuf *buf; cchar *s; ssize plen; buf = mprCreateBuf(-1, -1); if (pattern && *pattern && replacement) { plen = slen(pattern); for (s = str; *s; s++) { if (sncmp(s, pattern, plen) == 0) { ...
false
false
false
false
false
0
ComputeCentroid(const b2Vec2* vs, int32 count) { b2Assert(count >= 3); b2Vec2 c; c.Set(0.0f, 0.0f); qreal area = 0.0f; // pRef is the reference point for forming triangles. // It's location doesn't change the result (except for rounding error). b2Vec2 pRef(0.0f, 0.0f); #if 0 // This code would put the referenc...
false
false
false
false
false
0
get_mime_type(GF_Terminal *term, const char *url, GF_Err *ret_code, GF_DownloadSession **the_session) { char * ret = NULL; GF_DownloadSession * sess; (*ret_code) = GF_OK; if (strnicmp(url, "http", 4)) return NULL; /*don't use any NetIO and don't issue a HEAD command, always go for GET and store the session */ se...
false
false
false
false
false
0
my_log (void *ctx, enum GNUNET_ErrorType kind, const char *component, const char *date, const char *msg) { if (strncmp ("test-common-logging-dummy", component, 25) != 0) return; FPRINTF (stdout, "%s", msg); fflush (stdout); }
false
false
false
false
false
0
RetCC_Hexagon(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State) { if (LocVT == MVT::i1 || LocVT == MVT::i8 || LocVT == MVT::i16) { LocVT = MVT::i32; ValVT = MVT::i32; if (ArgFlags....
false
false
false
false
false
0
inp_seek(fd, posn) int fd; long posn; { if( lastfd != -1 ) lseek(lastfd, ftpos+in_start, 0); lastfd = -1; in_end = 0; if( fd >= 0 ) lseek(fd, posn, 0); }
false
false
false
false
false
0
use_parameter(Token *id) #else /* K&R style */ use_parameter(id) Token *id; #endif /* HAVE_STDC */ { int h=id->value.integer; Lsymtab *symt; if( (symt=hashtab[h].loc_symtab) == NULL) { symt = install_local(h,type_UNDECL,class_VAR); symt->line_declared = id->line_num; symt->file_declared = inctable_inde...
false
false
false
false
false
0
httpReadyRead() { // this slot gets called everytime the QNetworkReply has new data. // We read all of its new data and write it into the file. // That way we use less RAM than when reading it at the finished() // signal of the QNetworkReply if (!_useBuffer && file) file->write(reply->readAl...
false
false
false
false
false
0
SendState(FactionState const* faction, bool anyRankIncreased) { uint32 count = 1; WorldPacket data(SMSG_SET_FACTION_STANDING, 17); data << float(0); // refer-a-friend bonus reputation data << uint8(anyRankIncreased ? 1 : 0); // display visual effect ...
false
false
false
false
false
0
getAsString() const { std::string Result; switch (Opc) { case CAST: Result = "!cast<" + getType()->getAsString() + ">"; break; case HEAD: Result = "!head"; break; case TAIL: Result = "!tail"; break; case EMPTY: Result = "!empty"; break; } return Result + "(" + LHS->getAsString() + ")"; }
false
false
false
false
false
0
visitFDIV(SDNode *N) { SDValue N0 = N->getOperand(0); SDValue N1 = N->getOperand(1); ConstantFPSDNode *N0CFP = dyn_cast<ConstantFPSDNode>(N0); ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1); EVT VT = N->getValueType(0); // fold vector ops if (VT.isVector()) { SDValue FoldedVOp = SimplifyVBi...
false
false
false
false
false
0
_jsvCountJsVarsUsedRecursive(JsVar *v, bool resetRecursionFlag) { // Use IS_RECURSING flag to stop recursion if (resetRecursionFlag) { if (!(v->flags & JSV_IS_RECURSING)) return 0; v->flags &= ~JSV_IS_RECURSING; } else { if (v->flags & JSV_IS_RECURSING) return 0; v->flags |= JSV_IS_RE...
false
false
false
false
false
0
stop_io(void) { ECA_LOG_MSG(ECA_LOGGER::user_objects, "stop_io()"); clean_child(false); }
false
false
false
false
false
0
block_allocation_num_regions(struct block_allocation *alloc) { unsigned int i; struct region *reg = alloc->list.first; for (i = 0; reg != NULL; reg = reg->next) i++; return i; }
false
false
false
false
false
0
ARMMaterializeFP(const ConstantFP *CFP, MVT VT) { const APFloat Val = CFP->getValueAPF(); bool is64bit = VT == MVT::f64; // This checks to see if we can use VFP3 instructions to materialize // a constant, otherwise we have to go through the constant pool. if (TLI.isFPImmLegal(Val, VT)) { int Imm; uns...
false
false
false
false
false
0
main(int argc, char** argv) { if(argc!=7) { cout << "Usage: " << argv[0] << " <cache_size_inKB> <block_size_inB> <associativity> <matrix_n> <matrix_m> <matrix_p>\n"; return 1; } // Reading matrix lengths matrix_n = atoi(argv[4]); matrix_m = atoi(argv[5]); matrix_p = atoi(argv[6]); // Initialise accessor a...
false
false
false
false
false
0
ecore_con_event_client_data(Ecore_Con_Client *cl, unsigned char *buf, int num, Eina_Bool duplicate) { Ecore_Con_Event_Client_Data *e; e = ecore_con_event_client_data_alloc(); EINA_SAFETY_ON_NULL_RETURN(e); cl->event_count = eina_list_append(cl->event_count, e); cl->host_server->event_count = eina_list_...
false
true
false
false
false
1
alb_change_hw_addr_on_detach(struct bonding *bond, struct slave *slave) { int perm_curr_diff; int perm_bond_diff; struct slave *found_slave; perm_curr_diff = !ether_addr_equal_64bits(slave->perm_hwaddr, slave->dev->dev_addr); perm_bond_diff = !ether_addr_equal_64bits(slave->perm_hwaddr, bond->dev-...
false
false
false
false
false
0
__weak_ref_notify (gpointer data, GObject *object) { if (data != NULL && G_IS_OBJECT (data)) { MidgardDBObject *dbobject = MIDGARD_DBOBJECT (data); MGD_OBJECT_CNC (dbobject) = NULL; } }
false
false
false
false
false
0
fromString(const QString& s) { QString test = s.trimmed(); QRegExp regExp("^[\\?0-9]{4}([\\./]([\\?0-9]){1,2}){,2}$"); if(regExp.exactMatch(test) || test.isEmpty()) { QRegExp sep("[\\./]"); m_year = test.section(sep, 0, 0).toInt(); m_month = test.section(sep, 1, 1).toInt(); ...
false
false
false
false
false
0
main (int argc, char **argv) { struct timeval tv; int i; /* Initalize the event library */ event_init(); for (i = 0; i < NEVENT; i++) { ev[i] = malloc(sizeof(struct event)); /* Initalize one event */ evtimer_set(ev[i], time_cb, ev[i]); tv.tv_sec = 0; tv.tv_usec = rand_int(50000); evtimer_add(ev[i], ...
false
false
false
false
false
0
netio_desc_create_vde(char *nio_name,char *control,char *local) { netio_vde_desc_t *nvd; netio_desc_t *nio; if (!(nio = netio_create(nio_name))) return NULL; nvd = &nio->u.nvd; if (netio_vde_create(nvd,control,local) == -1) { netio_free(nio,NULL); return NULL; } nio->type ...
false
false
false
false
false
0
store_match_busid(struct device_driver *dev, const char *buf, size_t count) { int len; char busid[BUSID_SIZE]; if (count < 5) return -EINVAL; /* busid needs to include \0 termination */ len = strlcpy(busid, buf + 4, BUSID_SIZE); if (sizeof(busid) <= len) return -EINVAL; if (!strncmp(buf, "add ", 4)) ...
true
true
false
false
false
1
ujfs_complete_dmap(struct dmap *dmap_page, int64_t blkno, int8_t *treemax) { struct dmaptree *tp; int8_t *cp; int32_t index; dmap_page->start = blkno; tp = &dmap_page->tree; tp->height = 4; tp->leafidx = LEAFIND; tp->nleafs = LPERDMAP; tp->l2nleafs = L2LPERDMAP; tp->budmin = BUDMIN; /* * Pick up the poi...
false
false
false
false
false
0
SP_misc_viper_bomb (edict_t * self) { self->movetype = MOVETYPE_NONE; self->solid = SOLID_NOT; VectorSet (self->mins, -8, -8, -8); VectorSet (self->maxs, 8, 8, 8); self->s.modelindex = gi.modelindex ("models/objects/bomb/tris.md2"); if (!self->dmg) self->dmg = 1000; self->use = misc_viper_bomb_use;...
false
false
false
false
false
0
intreverse(unsigned long n) { unsigned long r = 0; while (n) { r *= 10; r += n % 10; n /= 10; } return r; }
false
false
false
false
false
0
__lambda37_ (BoxesCollectionView* self, GdMainView* view, const gchar* id, GtkTreePath* path) { BoxesCollectionItem* item = NULL; GtkTreePath* _tmp0_ = NULL; BoxesCollectionItem* _tmp1_ = NULL; BoxesApp* _tmp2_ = NULL; #line 313 "/extra-data/checkout/gnome/gnome-boxes/src/collection-view.vala" g_return_if_fail (vi...
false
false
false
false
false
0
open_module( const char* type, const char* name ) { lt_dlhandle handle = NULL; mpg123_module_t *module = NULL; char* module_path = NULL; size_t module_path_len = 0; char* module_symbol = NULL; size_t module_symbol_len = 0; char *workdir = NULL; char *moddir = NULL; workdir = get_the_cwd(); moddir = get_modu...
false
false
false
false
false
0
set_parameter(int param, CONTROLLER_SOURCE::parameter_t value) { switch (param) { case 1: set_id(static_cast<int>(value)); break; case 2: rms_mode_rep = static_cast<int>(value); break; } }
false
false
false
false
false
0
names_all_visible_channels(struct Client *source_p) { dlink_node *ptr = NULL; /* * First, do all visible channels (public and the one user self is) */ DLINK_FOREACH(ptr, global_channel_list.head) { /* Find users on same channel (defined by chptr) */ channel_member_names(source_p, ptr->data, 0); ...
false
false
false
false
false
0
skipOtherFiles() { while (Current != Records.end() && !Filename.empty() && Filename != Current->Filenames[0]) ++Current; if (Current == Records.end()) *this = FunctionRecordIterator(); }
false
false
false
false
false
0
mult_puzzle_get_num_addends (MultPuzzle* self) { guint result = 0U; g_return_val_if_fail (self != NULL, 0U); result = (guint) self->priv->addends_length1; return result; }
false
false
false
false
false
0
result(const PseudoJet &jet) const { // start by getting the list of subjets (including a list of sanity // checks) // NB: subjets is empty to begin with (see the comment for // _set_filtered_elements_cafilt) vector<PseudoJet> subjets; JetDefinition subjet_def; bool discard_area; // NB: on return, ...
false
false
false
false
false
0
main(int argc, char *argv[]) { char *args[] = { argv[0], argv[0], "Wow:", "execl,", "execlp,", "execle,", "execv,", "execvp", "-", "execute", "a", "file", NULL }; char *fake_env[] = { "USER=root (haha)", NULL }; if (argc == 2) { int type = atoi(argv[1]); switch (type) { case 1: if (execl(argv[0], argv...
false
false
false
false
false
0
imapx_transfer_messages_to_sync (CamelFolder *source, GPtrArray *uids, CamelFolder *dest, gboolean delete_originals, GPtrArray **transferred_uids, GCancell...
false
false
false
false
false
0
IoBlock_setScope_(IoBlock *self, IoObject *locals, IoMessage *m) { /*doc Block setScope(anObjectOrNil) If argument is an object, when the block is activated, it will set the proto and self slots of it's locals to the specified object. If Nil, it will set them to the target of the message. */ IoObject *scope = I...
false
false
false
false
false
0
fluid_list_sort_merge(fluid_list_t *l1, fluid_list_t *l2, fluid_compare_func_t compare_func) { fluid_list_t list, *l; l = &list; while (l1 && l2) { if (compare_func(l1->data,l2->data) < 0) { l = l->next = l1; l1 = l1->next; } else { l = l->next = l2; l2 = l2->next; } } l-...
false
false
false
false
false
0
tracker_query_perform_async (TrackerQuery* self, TrackerQueryType query_type, TrackerQueryMatch match_type, gchar** args, int args_length1, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) { TrackerQueryPerformAsyncData* _data_; TrackerQuery* _tmp0_; TrackerQueryType _tmp1_; TrackerQ...
false
false
false
false
false
0
DefaultInit() { AddAmplitudeBPF(); UpdateData(); Configure(EnvelopeConfig()); }
false
false
false
false
false
0
do_para_begin(bool allow_update) { filestruct *current_save = openfile->current; const size_t pww_save = openfile->placewewant; if (openfile->current != openfile->fileage) { do { openfile->current = openfile->current->prev; openfile->current_y--; } while (!begpar(openfile->current)); } ...
false
false
false
false
false
0
netsnmp_tcontainer_replace_row( container_table_data *table, netsnmp_index *old_row, netsnmp_index *new_row ) { if (!table || !table->table || !old_row || !new_row) return -1; netsnmp_tcontainer_remove_row( table, old_row ); netsnmp_tcontainer_add_row( table, new_r...
false
false
false
false
false
0
search(int argc, char * argv[]) { string index = ""; string seq = ""; short pam_right = 2; vector<uint64_t> matches; int c = -1; while ( (c = getopt(argc, argv, "s:n:i:")) != -1 ) { switch ( c ) { case 'p': pam_right = atoi( optarg ); break; case 's': seq = optar...
false
false
false
false
false
0
exportToWkt( char ** ppszDstText ) const { char szTextEquiv[140]; char szCoordinate[80]; if (nCoordDimension == 0) *ppszDstText = CPLStrdup( "POINT EMPTY" ); else { OGRMakeWktCoordinate(szCoordinate, x, y, z, nCoordDimension ); sprintf( szTextEquiv, "POINT (%s...
false
false
false
false
false
0
__ladd(word32 *res, word32 *u, word32 *v, int32 blen) { register word32 a2; register word32 *u_end, cy; int32 ublen, vblen, trimblen, wlen, hzwlen, verwlen; extern void __my_fprintf(FILE *, char *, ...); ublen = __trim1_0val(u, blen); vblen = __trim1_0val(v, blen); trimblen = (ublen >= vblen) ? ublen : vblen; ...
false
false
false
false
false
0
lmc_body_header_finish(void) { if(lmc.so && !lmc.all_written){ if(lmc.text_only && lmc.text_written && !so_puts(lmc.so, "Content-Type: TEXT/PLAIN\015\012")) return(FALSE); return(so_puts(lmc.so, "\015\012")); } return(TRUE); }
false
false
false
false
false
0
scan_fi (CamelStore *store, guint32 flags, const gchar *full, const gchar *name, GCancellable *cancellable) { CamelLocalSettings *local_settings; CamelSettings *settings; CamelService *service; CamelFolderInfo *fi; gchar *tmp, *cur, *new, *dir_name; gchar *path; struct stat st...
false
false
false
false
false
0
gdata_tear_down_async_test_data (GDataAsyncTestData *async_data, gconstpointer test_data) { g_assert (async_data->test_data == test_data); /* sanity check */ g_object_unref (async_data->cancellable); g_main_loop_unref (async_data->main_loop); }
false
false
false
false
false
0
add_to_milestones (const gchar *str) { gchar *str_copy; str_copy = g_strdup (str); if (milestones_tail) { milestones_tail = g_slist_append (milestones_tail, str_copy); milestones_tail = milestones_tail->next; } else { milestones_head = milestones_tail = g_slist_append (NULL, str_copy); } g_assert (milest...
false
false
false
false
false
0
NoritakeVFD_cursor_goto(Driver *drvthis, int x, int y) { PrivateData *p = drvthis->private_data; unsigned char out[4] = { 0x1B, 0x48, 0 }; /* set cursor position */ if ((x > 0) && (x <= p->width) && (y > 0) && (y <= p->height)) out[2] = (x-1) * p->width + (y-1); write(p->fd, out, 3); }
true
true
false
false
false
1
stacc_downtomdport(register struct expr_t *lhsx, register struct expr_t *rhsx, struct itree_t *down_itp) { byte *bp, *sbp; struct net_t *lhsnp; struct xstk_t *xsp; push_xstk_(xsp, 4*rhsx->szu.xclen); sbp = (byte *) xsp->ap; get_stwire_addr_(bp, rhsx->lu.sy->el.enp); memcpy(sbp, bp, rhsx->szu.xclen); /* assi...
false
false
false
false
false
0
GetSpeakerByEntry(uint32 uiEntry) override { switch (uiEntry) { case NPC_RANSHALLA: return m_creature; case NPC_VOICE_ELUNE: return m_creature->GetMap()->GetCreature(m_voiceEluneGuid); case NPC_PRIESTESS_DATA_1: retu...
false
false
false
false
false
0
generate ( ELG_secret_key *sk, unsigned int nbits, gcry_mpi_t **ret_factors ) { gcry_mpi_t p; /* the prime */ gcry_mpi_t p_min1; gcry_mpi_t g; gcry_mpi_t x; /* the secret exponent */ gcry_mpi_t y; unsigned int qbits; unsigned int xbits; byte *rndbuf; p_min1 = mpi_new ( nbits ); qbits = wiener...
false
true
false
false
false
1
prefixedToURI( PD_RDFModelHandle model ) const { PD_URI ret( model->prefixedToURI( toString() )); return ret; }
false
false
false
false
false
0
collect_procs_file(struct page *page, struct list_head *to_kill, struct to_kill **tkc, int force_early) { struct vm_area_struct *vma; struct task_struct *tsk; struct address_space *mapping = page->mapping; i_mmap_lock_read(mapping); read_lock(&tasklist_lock); for_each_process(tsk) { pgoff_t pgoff = pa...
false
false
false
false
false
0
resetRenderer(const QString & svg, QString & newSvg) { // use resetRenderer instead of reloadRender because if the svg size changes, with reloadRenderer the new image seems to be scaled to the old bounds // what I don't understand is why the old renderer causes a crash if it is deleted here FSvgRendere...
false
false
false
false
false
0
atom_moov_copy_data (AtomMOOV * atom, guint8 ** buffer, guint64 * size, guint64 * offset) { guint64 original_offset = *offset; GList *walker; if (!atom_copy_data (&(atom->header), buffer, size, offset)) return 0; if (!atom_mvhd_copy_data (&(atom->mvhd), buffer, size, offset)) return 0; walker =...
false
false
false
false
false
0
ReadTransitionMatrixParameters(FILE *f, char *filename, char *header, TStateModel *model) { FILE *f_in=f ? f : filename ? fopen(filename,"rt") : (FILE*)NULL; int rtrn=(f_in) ? sv_ReadTransitionMatrixParameters(f_in,model->sv,header) : 0; TransitionMatrixParametersChanged(model); if (!f && f_in) fclose(f_in...
false
false
false
false
true
1
cattle_tape_get_current_value (CattleTape *self) { gchar *chunk; g_return_val_if_fail (CATTLE_IS_TAPE (self), (gchar) 0); g_return_val_if_fail (!self->priv->disposed, (gchar) 0); chunk = (gchar *) self->priv->current->data; return chunk[self->priv->offset]; }
false
false
false
false
false
0
f_open(name, flags, buffer, buf_size) const char *name; char *buffer; int flags, buf_size; { register int fd; switch (F_MODE(flags)) { case F_READ: fd = open(name, O_RDONLY | O_BINARY); break; case F_APPEND: fd = open(name, O_WRONLY | O_BINARY); if (fd != -1) { (void) lseek(fd, (off_t)0, 2); break;...
false
false
false
false
false
0
snd_emux_hwdep_ioctl(struct snd_hwdep * hw, struct file *file, unsigned int cmd, unsigned long arg) { struct snd_emux *emu = hw->private_data; switch (cmd) { case SNDRV_EMUX_IOCTL_VERSION: return put_user(SNDRV_EMUX_VERSION, (unsigned int __user *)arg); case SNDRV_EMUX_IOCTL_LOAD_PATCH: return snd_emux_...
false
false
false
false
false
0
edit_chest_button_update(struct widget *w) { obstacle *o = single_tile_selection(OBJECT_OBSTACLE); if (o) { switch (o->type) { case ISO_H_CHEST_CLOSED: case ISO_V_CHEST_CLOSED: case ISO_E_CHEST2_CLOSED: case ISO_S_CHEST2_CLOSED: case ISO_N_CHEST2_CLOSED: case ISO_W_CHEST2_CLOSED: w->enabled = ...
false
false
false
false
false
0
SelectHeader (PrintContext *pc) { /* * To take care of what seems to be a firmware bug in the printer's grayscale path, * need printable width value later. So, save the PrintContext here. * Raghu */ COLORMODE eC = COLOR; MEDIATYPE eM; QUALITY_MODE eQ; BOOL bD; the...
false
false
false
false
false
0
hotplug_update_tasks(struct cpuset *cs, struct cpumask *new_cpus, nodemask_t *new_mems, bool cpus_updated, bool mems_updated) { if (cpumask_empty(new_cpus)) cpumask_copy(new_cpus, parent_cs(cs)->effective_cpus); if (nodes_empty(*new_mems)) *new_mems = parent_cs(cs)->effective_mems; spin_lock_irq(&...
false
false
false
false
false
0
printSynonyms(Aiksaurus& A) { int prev_meaning = -1; int meaning; for(const char* r = A.next(meaning); r[0]; r = A.next(meaning)) { checkError(A); if (meaning != prev_meaning) // new meaning. { string option1(r); // title option 1 string option2(A.n...
false
false
false
false
false
0
ensDatabaseentryadaptorFetchByAccession( EnsPDatabaseentryadaptor dbea, const AjPStr dbname, const AjPStr accession, EnsPDatabaseentry *Pdbe) { char *txtdbname = NULL; char *txtaccession = NULL; AjBool result = AJFALSE; AjPList dbes = NULL; AjPStr statement = NULL; EnsPDataba...
false
false
false
false
false
0
char_ucs2_encode(char *dest, size_t dest_len, const char *src, size_t len) { wchar_t wc; int i, o_len, length; MBSTATE mbs; MBSTATE_ENC_CLEAR(mbs); for (i = 0, o_len = 0; i < len && o_len < dest_len / UCS2_SIZE; o_len++, i++) { /* * We read input by convertible chunks. 'length' is length of * the read chu...
false
false
false
false
false
0
io(dns_name_t *name, int id, int alg, int type, isc_mem_t *mctx) { dst_key_t *key = NULL; isc_result_t ret; ret = dst_key_fromfile(name, id, alg, type, current, mctx, &key); printf("read(%d) returned: %s\n", alg, isc_result_totext(ret)); if (ret != 0) return; ret = dst_key_tofile(key, type, tmp); printf("writ...
false
false
false
false
false
0
lock_and_unlock_random_entry(H5F_t * file_ptr, int min_idx, int max_idx) { /* const char * fcn_name = "lock_and_unlock_random_entry()"; */ int idx; if ( nerrors == 0 ) { HDassert( file_ptr ); HDassert( 0 <= min_idx ); HDasse...
false
false
false
false
false
0
paintCell (const int i, const int j, const char type) { int index = i * m_tilesHigh + j; KGameRenderedItem * t = m_renderer->getTileItem (type, m_tiles.at(index)); m_tiles[index] = t; m_tileTypes[index] = type; if (t) { setTile (t, m_tileSize, i, j); } }
false
false
false
false
false
0
process_usbbuf(struct act2_eegdev* a2dev, uint32_t* buf, ssize_t bs) { int i, start, slen = a2dev->samplelen, inoffset = a2dev->inoffset; const struct core_interface* ci = &(a2dev->dev.ci); #if WORDS_BIGENDIAN for (i=0; i<bs; i++) buf[i] = bswap_32(buf[i]); #endif //WORDS_BIGENDIAN // check presence synchro cod...
false
false
false
false
false
0
fdisk_get_partitions(struct fdisk_context *cxt, struct fdisk_table **tb) { size_t i; if (!cxt || !cxt->label || !tb) return -EINVAL; if (!cxt->label->op->get_part) return -ENOSYS; DBG(CXT, ul_debugobj(cxt, " -- get table --")); if (!*tb && !(*tb = fdisk_new_table())) return -ENOMEM; for (i = 0; i < cxt-...
false
false
false
false
false
0
fcoe_ctlr_recv_flogi(struct fcoe_ctlr *fip, struct fc_lport *lport, struct fc_frame *fp) { struct fc_frame_header *fh; u8 op; u8 *sa; sa = eth_hdr(&fp->skb)->h_source; fh = fc_frame_header_get(fp); if (fh->fh_type != FC_TYPE_ELS) return 0; op = fc_frame_payload_op(fp); if (op == ELS_LS_ACC && fh->fh_r_c...
false
true
false
false
false
1
Type_Chromaticity_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems) { cmsCIExyYTRIPLE* chrm = (cmsCIExyYTRIPLE*) Ptr; if (!_cmsWriteUInt16Number(io, 3)) return FALSE; // nChannels if (!_cmsWriteUInt16Number(io, 0)) return FALSE; // Table if ...
false
false
false
false
false
0
gdome_xml_di_createDocFromURIWithEntitiesTable (GdomeDOMImplementation *self, const char *uri, const GdomeEntitiesTableEntry entityTable[], unsigned int mode, ...
false
false
false
false
false
0
blank_line() { int i; char *string; if(NULL == ( string = (calloc(62,sizeof(char))))) { error("print_info(): Out of memory !"); } strcat(string, "*"); for (i = 0; i != 58; ++i) { strcat(string, " "); } strcat(string, "*\n"); return string; }
false
false
false
false
false
0
handle_controlstreamfile(struct ast_channel *chan, AGI *agi, int argc, const char * const argv[]) { int res = 0, skipms = 3000; const char *fwd = "#", *rev = "*", *suspend = NULL, *stop = NULL; /* Default values */ if (argc < 5 || argc > 9) { return RESULT_SHOWUSAGE; } if (!ast_strlen_zero(argv[4])) { stop =...
false
false
false
false
false
0
nilfs_segbuf_new(struct super_block *sb) { struct nilfs_segment_buffer *segbuf; segbuf = kmem_cache_alloc(nilfs_segbuf_cachep, GFP_NOFS); if (unlikely(!segbuf)) return NULL; segbuf->sb_super = sb; INIT_LIST_HEAD(&segbuf->sb_list); INIT_LIST_HEAD(&segbuf->sb_segsum_buffers); INIT_LIST_HEAD(&segbuf->sb_payload...
false
false
false
false
false
0
matchmid(char *id, enum idfield idfield, int mesg) { struct name *np; char *cp; if ((cp = hfield("message-id", &message[mesg - 1])) != NULL) { switch (idfield) { case ID_REFERENCES: return msgidcmp(id, cp) == 0; case ID_IN_REPLY_TO: if ((np = extract(id, GREF)) != NULL) do { if (msgidcmp(np->n_...
true
true
false
false
false
1
gv_decimate_lines(geovect * gv) { int T_pts, A_ppl, N_s; float decim_factor, slength[MFAST_LNS], T_slength, A_slength; geoline *gln, *prev; /* should check if already exists & free if != gv->lines */ if (TFAST_PTS > (T_pts = gv_num_points(gv))) { gv->fastlines = gv->lines; return (1); } ...
false
false
false
false
false
0
os_banner_styles_apply (osbanid_t banner) { if (!banner || !(banner->valid)) return; glui32 propval = banner->status ? 0 : (banner->type == wintype_TextGrid ? 0 : 1); glui32 bgcustom = banner->bgtrans ? banner->bgcolor : banner->bgcustom; /* font style: monospace for text grid and tab ...
false
false
false
false
false
0
gt_priorityqueue_add(GtPriorityQueue *pq, unsigned long sortkey, unsigned long value) { gt_assert(pq != NULL && !gt_priorityqueue_is_full(pq)); if (pq->capacity < (unsigned long) GT_MINPQSIZE) { GtPriorityQueueElementType *ptr; /* store elements in reverse order, i.e.\ with the ...
false
false
false
false
false
0