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
evd_service_validate_conn_signal_acc (GSignalInvocationHint *hint, GValue *return_accu, const GValue *handler_return, gpointer data) { guint ret; guint acc_ret; ...
false
false
false
false
false
0
icalvalue_set_status(icalvalue* value, enum icalproperty_status v) { struct icalvalue_impl* impl; icalerror_check_arg_rv( (value!=0),"value"); icalerror_check_value_type(value, ICAL_STATUS_VALUE); impl = (struct icalvalue_impl*)value; impl->data.v_enum = v; }
false
false
false
false
false
0
CommandsetProcess(Data &cmd) { MAKE_JDWPPACKET(rpack, cmd); switch (rpack->u.command.commandset) { case JDWP_CMDSET_VIRTUALMACHINE: CommandsetVirtualMachineProcess(cmd); break; case JDWP_CMDSET_REFERECENTYPE: break; case JDWP_CMDSET_CLASSTYPE: break; case JDWP_CMDSET_ARRAYTYPE: break; ca...
false
false
false
false
false
0
read_pos_ll(const char *file, long long *value) { int fd, rd; char buf[50]; fd = open(file, O_RDONLY | O_CLOEXEC); if (fd == -1) return -1; rd = read(fd, buf, 50); if (rd == -1) { sys_errmsg("cannot read \"%s\"", file); goto out_error; } if (rd == 50) { errmsg("contents of \"%s\" is too long", file); ...
true
true
false
false
true
1
scatter_cb(void **src_buf/*out*/, size_t *src_buf_bytes_used/*out*/, void *_scatter_info) { scatter_info_t *scatter_info = (scatter_info_t *)_scatter_info; size_t nelmts; /* Number of elements to return in src_buf */ /* Calculate number of elements */ nelmts = MIN(scatter_info->block, scatter_...
false
false
false
false
false
0
bfa_plog_intarr(struct bfa_plog_s *plog, enum bfa_plog_mid mid, enum bfa_plog_eid event, u16 misc, u32 *intarr, u32 num_ints) { struct bfa_plog_rec_s lp; u32 i; if (num_ints > BFA_PL_INT_LOG_SZ) num_ints = BFA_PL_INT_LOG_SZ; if (plog->plog_enabled) { memset(&lp, 0, sizeof(struct bfa_plog_rec_s)); lp.mi...
false
false
false
false
false
0
remove_extradata(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe){ int cmd= args ? *args : 0; AVCodecParserContext *s; if(!bsfc->parser){ bsfc->par...
false
false
false
false
false
0
Perl_magic_getuvar(pTHX_ SV *sv, MAGIC *mg) { struct ufuncs * const uf = (struct ufuncs *)mg->mg_ptr; PERL_ARGS_ASSERT_MAGIC_GETUVAR; if (uf && uf->uf_val) (*uf->uf_val)(aTHX_ uf->uf_index, sv); return 0; }
false
false
false
false
false
0
CreateControls() { ////@begin CProjectProcessingPage content construction CProjectProcessingPage* itemWizardPage36 = this; wxBoxSizer* itemBoxSizer37 = new wxBoxSizer(wxVERTICAL); itemWizardPage36->SetSizer(itemBoxSizer37); m_pTitleStaticCtrl = new wxStaticText; m_pTitleStaticCtrl->Create( ite...
false
false
false
false
true
1
gt_ggc_mx_gimple_df (void *x_p) { struct gimple_df * const x = (struct gimple_df *)x_p; if (ggc_test_and_set_mark (x)) { gt_ggc_m_P9tree_node4htab ((*x).referenced_vars); gt_ggc_m_13VEC_gimple_gc ((*x).modified_noreturn_calls); gt_ggc_m_11VEC_tree_gc ((*x).ssa_names); gt_ggc_m_9tree_node...
false
false
false
false
false
0
objtocbmap(VALUE obj){ CBMAP *map; VALUE keys, key, val; int i, len; map = cbmapopenex(31); keys = rb_funcall(obj, rb_intern("keys"), 0); len = RARRAY_LEN(keys); for(i = 0; i < len; i++){ key = rb_ary_entry(keys, i); val = rb_hash_aref(obj, key); key = rb_String(key); val = rb_String(val);...
false
false
false
false
false
0
getCallCount(TraceFunction *f) const { QString str; if (f->calledCount() > 0) str = f->prettyCalledCount(); else { if (f == f->cycle()) str = QString("-"); else str = QString("(0)"); } return str; }
false
false
false
false
false
0
WMI_execute_u32(u32 method_id, u32 in, u32 *out) { struct acpi_buffer input = { (acpi_size) sizeof(u32), (void *)(&in) }; struct acpi_buffer result = { ACPI_ALLOCATE_BUFFER, NULL }; union acpi_object *obj; u32 tmp = 0; acpi_status status; status = wmi_evaluate_method(WMID_GUID1, 1, method_id, &input, &result); ...
false
false
false
false
false
0
parse_xml_push(void *state) { if (parse_xml_error.mesg != NULL || parse_xml_complete) return(PARSE_XML_ERROR); if (parse_xml_index == (PARSE_XML_MAX_STACK_DEPTH - 1)) { parse_xml_error.mesg = "Maximum XML stack depth reached"; return(PARSE_XML_ERROR); } parse_xml_stack[++parse_xml_index] = state; return...
false
false
false
false
false
0
gravityOffsets(int &xp, int &yp) { xp = 0; yp = 0; if (fSizeHints == 0) return; static struct { int x, y; } gravOfsXY[11] = { { 0, 0 }, /* ForgetGravity */ { -1, -1 }, /* NorthWestGravity */ { 0, -1 }, /* NorthGravity */ { 1, -1 }, /* NorthEa...
false
false
false
false
false
0
fso_gsm_at_unsolicited_response_handler_real_plusCUSD (FsoGsmAtUnsolicitedResponseHandler* self, const gchar* prefix, const gchar* rhs) { FsoGsmPlusCUSD* cusd = NULL; FsoGsmModem* _tmp0_ = NULL; FsoGsmModem* _tmp1_ = NULL; gpointer _tmp2_ = NULL; FsoGsmPlusCUSD* _tmp3_ = NULL; const gchar* _tmp4_ = NULL; const g...
false
false
false
false
false
0
_e_init_cb_exe_event_del(void *data __UNUSED__, int type __UNUSED__, void *event) { Ecore_Exe_Event_Del *ev; ev = event; if (ev->exe == init_exe) { /* init exited */ // ecore_exe_free(init_exe); init_exe = NULL; } return ECORE_CALLBACK_RENEW; }
false
false
false
false
false
0
cb_sort_field_menu_activate(GtkWidget *item, AddSortFieldMenuState *menu_state) { GtkWidget *menu = GTK_WIDGET (gtk_menu_item_get_submenu(GTK_MENU_ITEM (item))); if (menu_state->done_submenu == FALSE) { build_sort_field_menu(menu_state->start, menu_state->end, menu_state->index, menu,...
false
false
false
false
false
0
listn (int n, Tree e) { return (n<= 0) ? nil : cons(e, listn(n-1,e)); }
false
false
false
false
false
0
OnClickAppColour(wxCommandEvent &event) { wxListBox *list = XRCCTRL(*this, "lstColours", wxListBox); if (list->GetSelection() == wxNOT_FOUND) return; const AppColoursClientData *data; data = static_cast<AppColoursClientData*>(list->GetClientObject(list->GetSelection())); if (!data) r...
false
false
false
false
false
0
reserve_mem_notifier(struct notifier_block *nb, unsigned long action, void *data) { unsigned long tmp, free_kbytes; switch (action) { case MEM_ONLINE: /* Default max is 128MB. Leave alone if modified by operator. */ tmp = sysctl_user_reserve_kbytes; if (0 < tmp && tmp < (1UL << 17)) init_user_reser...
false
false
false
false
false
0
dump_template_bindings (tree parms, tree args, vec<tree, va_gc> *typenames) { bool need_semicolon = false; int i; tree t; while (parms) { tree p = TREE_VALUE (parms); int lvl = TMPL_PARMS_DEPTH (parms); int arg_idx = 0; int i; tree lvl_args = NULL_TREE; /* Don't crash i...
false
false
false
false
false
0
connectWithMaster(void) { int fd; fd = anetTcpNonBlockBestEffortBindConnect(NULL, server.masterhost,server.masterport,REDIS_BIND_ADDR); if (fd == -1) { redisLog(REDIS_WARNING,"Unable to connect to MASTER: %s", strerror(errno)); return REDIS_ERR; } if (aeCreateFi...
false
false
false
false
false
0
sprint_realloc_uinteger(u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const netsnmp_variable_list * var, const struct enum_list *enums, const char *hint, const char *units) { char *enum_...
true
true
false
false
false
1
cmLocalGeneratorShortenObjectName(std::string& objName, std::string::size_type max_len) { // Replace the beginning of the path portion of the object name with // its own md5 sum. std::string::size_type pos = objName.find('/', objName.size()-max_len+32); if(pos != objName.npos) ...
false
false
false
false
false
0
on_matcher_ok_clicked (GtkButton *button, GNCImportMainMatcher *info) { GtkTreeModel *model; GtkTreePath *path; GtkTreeRowReference *ref; GtkTreeIter iter; GNCImportTransInfo *trans_info; GSList *refs_list = NULL; g_assert (info); /* DEBUG ("Begin") */ mod...
false
false
false
false
false
0
loose_parse_oid(git_oid *oid, const char *filename, git_buf *file_content) { size_t len; const char *str; len = git_buf_len(file_content); if (len < GIT_OID_HEXSZ) goto corrupted; /* str is guranteed to be zero-terminated */ str = git_buf_cstr(file_content); /* we need to get 40 OID characters from the file...
false
false
false
false
false
0
fq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) { struct rtattr *tb[TCA_FQ_MAX + 1]; unsigned int plimit, flow_plimit; unsigned int buckets_log; int pacing; unsigned int rate, quantum; SPRINT_BUF(b1); if (opt == NULL) return 0; parse_rtattr_nested(tb, TCA_FQ_MAX, opt); if (tb[TCA_FQ_PLIMI...
false
false
false
false
false
0
lag_adjust(double *time, double net_lag) { double nolag_time = *time; *time -= net_lag; if (*time < MIN_THINK_WITH_LAG && nolag_time > MIN_THINK_WITH_LAG) *time = MIN_THINK_WITH_LAG; }
false
false
false
false
false
0
ecryptfs_delete_nvp(struct ecryptfs_name_val_pair *nvp_head, struct ecryptfs_name_val_pair *nvp) { int rc = 0; while (nvp_head) { if (nvp_head->next == nvp) { nvp_head->next = nvp->next; ecryptfs_destroy_nvp(nvp); goto out; } nvp_head = nvp_head->next; } rc = -EINVAL; out: return rc; }
false
false
false
false
false
0
on_break_insert(G_GNUC_UNUSED const MenuItem *menu_item) { GeanyDocument *doc = document_get_current(); GString *command = g_string_new("-break-insert "); if (doc && utils_source_document(doc)) g_string_append_printf(command, "%s:%d", doc->file_name, utils_current_line(doc)); view_command_line(command->str, _("...
false
false
false
false
false
0
wpt_container(const char* args, const char** unused) { int v; if (!args) { return; } switch (atoi(args)) { case 1: v = gc_unknown; break; case 2: v = gc_micro; break; case 3: v = gc_regular; break; case 4: v = gc_large; break; case 5: v = gc_virtual;; break...
false
false
false
false
false
0
GetInputAbstractArrayToProcess( int idx, int connection, vtkInformationVector **inputVector, int& association) { vtkInformationVector *inArrayVec = this->Information->Get(INPUT_ARRAYS_TO_PROCESS()); if (!inArrayVec) { vtkErrorMacro ("Attempt to get an input array for an index that has not been s...
false
false
false
false
false
0
Ns_ScheduleDaily(Ns_SchedProc * proc, void *clientData, int flags, int hour, int minute, Ns_SchedProc *cleanupProc) { int seconds; if (hour > 23 || hour < 0 || minute > 59 || minute < 0) { return NS_ERROR; } seconds = (hour * 3600) + (minute * 60); return Ns_ScheduleProcEx(proc, cl...
false
false
false
false
false
0
ims_pcu_flash_firmware(struct ims_pcu *pcu, const struct firmware *fw, unsigned int n_fw_records) { const struct ihex_binrec *rec = (const struct ihex_binrec *)fw->data; struct ims_pcu_flash_fmt *fragment; unsigned int count = 0; u32 addr; u8 len; int error; error = ims_pcu_execute_bl_command(pcu, E...
false
true
false
false
false
1
BZ2_u_File(char *source,char *target) { BZFILE *src; FILE *f_src; FILE *dst; char buf[GB_Z_BUFFER]; long len; int bzerror; if ( (f_src=fopen(source,"rb"))==NULL) { GB.Error ("Unable to open file for reading"); return; } src=BZ2_bzReadOpen(&bzerror,f_src,0,0,NULL,0); if (bzerror) { fclose (f_src); G...
true
true
false
false
true
1
GetNS() { if ( GetAttr("xmlns").empty() ) { if ( parant ) return static_cast<WokXMLTag*>(parant)->GetNS(); } else return GetAttr("xmlns"); return empty_str; }
false
false
false
false
false
0
AllocPacket(unsigned dataSize, const char *file, unsigned int line) { // Crashes when dataSize is 4 bytes - not sure why // unsigned char *data = (unsigned char *) rakMalloc_Ex(sizeof(PacketFollowedByData)+dataSize, file, line); // Packet *p = &((PacketFollowedByData *)data)->p; // p->data=((PacketFollowedByDa...
false
false
false
true
false
1
gfire_sq_quake_fixed_len_string(const gchar *p_str, guint p_len) { if(!p_str) return NULL; // Get the length without Quake 3 color codes guint len = 0; guint pos = 0; while(p_str[pos] != 0) { if(p_str[pos] == '^') { guint i = 0; while(q3codes[i].ch) { if(q3codes[i].ch == g_ascii_tolower(p_str[...
false
false
false
false
false
0
path_exists(list<term *> t, list<list<term *> > l) { for(list<list<term *> >::iterator i = l.begin(); i!=l.end(); i++) { for(list<term*>::iterator j = i->begin(); j != i->end(); j++) { if(path_cmp(t, *i, j, true, true)) { return true; } } } return false; }
false
false
false
false
false
0
gee_traversable_real_scan (GeeTraversable* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeFoldFunc f, void* f_target, gpointer seed) { GeeIterator* result = NULL; Block13Data* _data13_; GeeFoldFunc _tmp0_ = NULL; void* _tmp0__target = NULL; gconstpointer _tmp1_ = NULL; GeeIterato...
false
false
false
false
false
0
e_paned_set_vposition (EPaned *paned, gint vposition) { GtkOrientable *orientable; GtkOrientation orientation; g_return_if_fail (E_IS_PANED (paned)); if (vposition == paned->priv->vposition) return; paned->priv->vposition = vposition; g_object_notify (G_OBJECT (paned), "vposition"); ...
false
false
false
false
false
0
priority(FXint prio){ register pthread_t ttid=(pthread_t)tid; if(ttid){ sched_param sched={0}; int pcy=0; pthread_getschedparam(ttid,&pcy,&sched); #if defined(_POSIX_PRIORITY_SCHEDULING) int priomax=sched_get_priority_max(pcy); int priomin=sched_get_priority_min(pcy); sched.sched_priority=FX...
false
false
false
false
false
0
WriteTag(const CTag& tag) { try { WriteUInt8(tag.GetType()); if (!tag.GetName().IsEmpty()) { WriteString(tag.GetName(),utf8strNone); } else { WriteUInt16(1); WriteUInt8(tag.GetNameID()); } switch (tag.GetType()) { case TAGTYPE_HASH16: // Do NOT use this to transfer any tags for at le...
false
false
false
false
false
0
be_async_link_state_process(struct be_adapter *adapter, struct be_mcc_compl *compl) { struct be_async_event_link_state *evt = (struct be_async_event_link_state *)compl; /* When link status changes, link speed must be re-queried from FW */ adapter->phy.link_speed = -1; /* On BEx the FW does not send a sepa...
false
false
false
false
false
0
gtkwidget_gtk_widget_add_accelerator(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) { ScmObj widget_scm; GtkWidget* widget; ScmObj accel_signal_scm; const gchar * accel_signal; ScmObj accel_group_scm; GtkAccelGroup* accel_group; ScmObj accel_key_scm; u_int accel_key; ScmObj accel_mods_scm; int accel_m...
false
false
false
false
false
0
run() { OFReadWriteLocker locker(*rwlock); if ((0==mutex2->trylock())&&(OFReadWriteLock::busy == locker.trywrlock())) rw_cond5=1; if (0 == locker.wrlock()) { rw_cond6=1; mutex2->unlock(); OFStandard::sleep(1); // Explicite unlock(), check if this causes one unlock() too much ...
false
false
false
false
false
0
prepare_commit_comment( Blob *pComment, char *zInit, CheckinInfo *p, int parent_rid ){ Blob prompt; #if defined(_WIN32) || defined(__CYGWIN__) int bomSize; const unsigned char *bom = get_utf8_bom(&bomSize); blob_init(&prompt, (const char *) bom, bomSize); if( zInit && zInit[0]) { blob_append(&prom...
false
false
false
false
false
0
snd_atiixp_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { struct atiixp_modem *chip = snd_pcm_substream_chip(substream); struct atiixp_dma *dma = substream->runtime->private_data; int err; int i; err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_par...
false
false
false
false
false
0
assemble_real (REAL_VALUE_TYPE d, enum machine_mode mode, unsigned int align) { long data[4] = {0, 0, 0, 0}; int i; int bitsize, nelts, nunits, units_per; /* This is hairy. We have a quantity of known size. real_to_target will put it into an array of *host* longs, 32 bits per element (even if long ...
false
false
false
false
true
1
nn_AbsCriterion_forward(lua_State *L) { THTensor *input = luaT_checkudata(L, 2, torch_Tensor_id); THTensor *target = luaT_checkudata(L, 3, torch_Tensor_id); int sizeAverage = luaT_getfieldcheckboolean(L, 1, "sizeAverage"); double sum; sum = 0; TH_TENSOR_APPLY2(double, input, double, target, ...
false
false
false
false
false
0
checkRunLater(int &timeout) { mail::runLater *ptr; while (!runningLater.empty()) { ptr=runningLater.front(); runningLater.pop(); if (ptr) { timeout=0; ptr->RunningLater(); } } }
false
false
false
false
false
0
FoundTarget (edict_t * self) { // let other monsters see this monster for a while if (self->enemy->client) { level.sight_entity = self; level.sight_entity_framenum = level.framenum; level.sight_entity->light_level = 128; } self->show_hostile = level.time + 1; // wake up other monsters ...
false
false
false
false
false
0
mve_encode_0xd (GstMveEncoderData * enc, const guint16 * src, GstMveApprox * apx) { /* 4-color block encoding: each 4x4 block is a different color (8 bytes) */ guint i, x, y; guint16 *block; /* calculate median color for each 4x4 block */ for (i = 0; i < 4; ++i) { guint16 median = mve_median_...
false
false
false
false
false
0
ReferenceCountedObject_zeroWeakPointers() { // Tell all of my weak pointers that I'm gone. _WeakPtrLinkedList* node = ReferenceCountedObject_weakPointer; while (node != NULL) { // Notify the weak pointer that it is going away node->weakPtr->objectCollected(); // Free the node ...
false
false
false
false
false
0
ShowPrintPreviewDialog(const wxString& frameTitle) { wxCHECK_MSG(GetPlotCtrl(), false, wxT("Invalid plot window")); // Pass two printout objects: for preview, and possible printing. wxPrintDialogData printDialogData(*wxPlotPrintout::GetPrintData(true)); wxPrintPreview *preview = new wxPrintPreview(new w...
false
false
false
false
false
0
minerconfig(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __maybe_unused char *param, bool isjson, __maybe_unused char group) { struct api_data *root = NULL; bool io_open; int asccount = 0; int pgacount = 0; #ifdef HAVE_AN_ASIC asccount = numascs(); #endif #ifdef HAVE_AN_FPGA pgacount = numpgas(); #endi...
false
false
false
false
false
0
nodoka_draw_scrollbar_trough (cairo_t * cr, const NodokaColors * colors, const WidgetParameters * widget, const ScrollBarParameters * scrollbar, int x, int y, int width, int height) { NodokaRGB *bg = (NodokaRGB *) & colors->bg[widget->state_type]; NodokaRGB *border = (NodokaRGB *) & colors-...
false
false
false
false
false
0
eraTr(double r[3][3], double rt[3][3]) /* ** - - - - - - ** e r a T r ** - - - - - - ** ** Transpose an r-matrix. ** ** Given: ** r double[3][3] r-matrix ** ** Returned: ** rt double[3][3] transpose ** ** Note: ** It is permissible for r and rt to be the same array. ** ** Called:...
false
false
false
false
false
0
dump_pptp_outgoingrep(packet_t *pkt) { pptp_outgoingrep_t hdr; /* * Get the header */ if (get_packet_bytes((u_int8_t *) &hdr, pkt, sizeof(pptp_outgoingrep_t)) == 0) return; /* * Conversions */ hdr.call_id = ntohs(hdr.call_id); hdr.peer_call_id = ntohs(hdr.peer_call_id); hdr.ca...
false
false
false
false
false
0
openwindow(char *disp, int constell, int samplesperbit) { XSetWindowAttributes attr; XGCValues gr_values; XColor color, dummy; XSizeHints sizehints; if (!(display = XOpenDisplay(NULL))) return -1; XSetErrorHandler(x_error_handler); XAllocNamedColo...
false
false
false
false
false
0
episodeModel() { if (!d->m_EpisodeModel) d->m_EpisodeModel = new PmhEpisodeModel(this); return d->m_EpisodeModel; }
false
false
false
false
false
0
ram_read(struct _memory_segment *s, unsigned long *result, short size, unsigned long offset) { struct _mem_data *mem = (struct _mem_data *)s->data; #ifdef UNALIGNED_ACCESS unsigned long *ptr; TRACE("size=%d, offset=0x%08lx\n", size, offset); #ifndef WORDS_BIGENDIAN ptr = (unsigned long *)(mem->end - offset)...
false
false
false
false
false
0
toString() { QString res = _top->name(); foreach(TraceCall *c, _calls) res += "\n > " + c->called()->name(); return res; }
false
false
false
false
false
0
onenrminv(real_t **a, int n) { real_t *allocate_real_vector(int, int); void free_real_vector(real_t *, int); real_t matvec(int, int, int, real_t **, real_t []); int i,j; real_t norm,max,aid,*y; y=allocate_real_vector(1,n); norm=0.0; for (j=1; j<=n; j++) { for (i=1; i<=n; i++) y[i]=(i < j) ? 0 : ((i =...
false
false
false
false
false
0
addrharvest_build_entry( AddressHarvester* harvester, gchar *name ) { HeaderEntry *entry; entry = g_new0( HeaderEntry, 1 ); entry->header = name; entry->selected = FALSE; entry->folder = NULL; entry->count = 0; harvester->headerTable = g_list_append( harvester->headerTable, entry ); }
false
false
false
false
false
0
gtk_sheet_cell_draw_border (GtkSheet *sheet, gint row, gint col, gint mask) { GtkWidget *widget; GdkGC *fg_gc, *bg_gc; GtkSheetCellAttr attributes; GdkRectangle area; guint width; g_return_if_fail (sheet != NULL); /* bail now if we arn't drawable yet */ if (!GTK_WIDGET_DRAWABLE (sheet)) return; if ...
false
false
false
false
false
0
L8__STACK_LET__cmplet() {register object *base=vs_base; register object *sup=base+VM8; VC8 vs_check;vs_top=sup; {object V189=base[0]->c.c_cdr; base[2]= V189;} base[3]= make_cons(((object)VV[2]),base[2]); vs_top=(vs_base=base+3)+1; return; }
false
false
false
false
false
0
create_type_menu(GtkComboBox *combo) { GSList *formats = gdk_pixbuf_get_formats (); GSList *ptr; char *buf; int i=0, default_index=0; #if ((GTK_MAJOR_VERSION == 2) && (GTK_MINOR_VERSION < 6)) /* If GTK < 2.6, free the descriptions list */ free_image_type_descriptions_list(); #endif ptr = formats; whil...
false
false
false
false
false
0
getp_starts_with(VMG_ vm_val_t *retval, const vm_val_t *self_val, const char *str, uint *argc) { static CVmNativeCodeDesc desc(1); const char *str2; size_t len; size_t len2; /* check arguments */ if (get_prop_check_...
false
false
false
false
false
0
read_value_type(const char *string) { GConfValueType type = GCONF_VALUE_INVALID; switch (*string) { case 'i': case 'I': type = GCONF_VALUE_INT; break; case 'f': case 'F': type = GCONF_VALUE_FLOAT; break; case 'b': case 'B': type = GCONF_VALUE_BOOL; bre...
false
false
false
false
false
0
p_assv(li_object *args) { li_object *lst; assert_nargs(2, args); for (lst = li_cadr(args); lst; lst = li_cdr(lst)) { if (!li_is_pair(lst)) li_error("not a list", li_cadr(args)); if (li_is_eqv(li_car(args), li_caar(lst))) return li_car(lst); } return li_false;...
false
false
false
false
false
0
do_unescape (unsigned char *buffer, const unsigned char *string, int withplus, int nulrepl) { unsigned char *p = buffer; while (*string) { if (*string == '%' && string[1] && string[2]) { string++; *p = xtoi_2 (string); if (!*p) *p = nulrepl...
false
false
false
false
false
0
RespawnSoldier() { for (GuidZoneMap::const_iterator itr = m_zonePlayers.begin(); itr != m_zonePlayers.end(); ++itr) { // Find player who is in main zone (Nagrand) to get correct map reference if (!itr->second) continue; if (Player* player = sObjectMgr.GetPlayer(itr->first)) ...
false
false
false
false
false
0
render(render_guts_t* guts, int indentation) const { if (this->quoted) { return rope_t(this->value.c_str()); } else { const char *val = this->value.c_str(); size_t len = 0; for (const char* ii = val; *ii; ++ii) { if (*ii < 32) { switch (*ii) { case '\'': case '\\': case '\b':...
false
false
false
false
false
0
MFModelAddFunction (MFFunction func) { if ((_MFFunctions = (MFFunction *) realloc (_MFFunctions, (_MFFunctionNum + 1) * sizeof (MFFunction))) == (MFFunction *) NULL) { CMmsgPrint (CMmsgSysError,"Memory Allocation Error in: %s:%d\n",__FILE__,__LINE__); return (CMfailed); } _MFFunctions [_MFFunctionNum] = func; ...
false
false
false
false
false
0
license_read_product_info(STREAM* s, PRODUCT_INFO* productInfo) { stream_read_uint32(s, productInfo->dwVersion); /* dwVersion (4 bytes) */ stream_read_uint32(s, productInfo->cbCompanyName); /* cbCompanyName (4 bytes) */ productInfo->pbCompanyName = (uint8*) xmalloc(productInfo->cbCompanyName); stream_read(s, prod...
false
false
false
false
false
0
foreach_stop_list(t_list * list, bool (*function)(void *)) { if (list) { list->cur = list->begin; while (list->cur) { if (function(list->cur->data)) return (true); list->cur = list->cur->next; } } return (false); }
false
false
false
false
false
0
add_to_cache(const GP<DjVuFile> & f) { if (cache) { GMap<GURL, void *> map; ::add_to_cache(f, map, cache); } }
false
false
false
false
false
0
show_scale_available(struct device *dev, struct device_attribute *attr, char *buf) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct isl29018_chip *chip = iio_priv(indio_dev); int i, len = 0; for (i = 0; i < ARRAY_SIZE(isl29018_scales[chip->int_time]); ++i) len += sprintf(buf + len, "%d.%06d ", ...
false
true
false
false
false
1
doApply() { assert(m_text1); assert(m_text2); assert(m_text1->nextSibling() == m_text2); int exceptionCode = 0; m_text2->insertData(0, m_text1->data(), exceptionCode); assert(exceptionCode == 0); m_text2->parentNode()->removeChild(m_text1, exceptionCode); assert(exceptionCode == 0); ...
false
false
false
false
false
0
ar9300_otp_read_word(struct ath_hw *ah, int addr, u32 *data) { REG_READ(ah, AR9300_OTP_BASE + (4 * addr)); if (!ath9k_hw_wait(ah, AR9300_OTP_STATUS, AR9300_OTP_STATUS_TYPE, AR9300_OTP_STATUS_VALID, 1000)) return false; *data = REG_READ(ah, AR9300_OTP_READ_DATA); return true; }
false
false
false
false
false
0
compact_value(char *buf, size_t size, uint64 v, bool metric) { if (v < kilo(metric)) { str_bprintf(buf, size, "%u", (uint) v); } else { uint q, r; char c; c = norm_size_scale(v, &q, &r, metric); r = (r * 10) / kilo(metric); str_bprintf(buf, size, "%u.%u%c%s", q, r, c, metric ? "" : "i"); } return buf;...
false
false
false
false
false
0
compare(size_type pos, size_type n, const cxxtools::Char* str, size_type n2) const { const size_type size = n; const size_type osize = n2; size_type len = min(size , osize); const int result = traits_type::compare(privdata_ro() + pos, str, ...
false
false
false
false
false
0
cp_parser_new_expression (cp_parser* parser) { bool global_scope_p; VEC(tree,gc) *placement; tree type; VEC(tree,gc) *initializer; tree nelts; tree ret; /* Look for the optional `::' operator. */ global_scope_p = (cp_parser_global_scope_opt (parser, /*current_scope_valid_p=*/false) !...
false
false
false
false
false
0
checkOffset(MemoryBufferRef M, uintptr_t Addr, const uint64_t Size) { if (Addr + Size < Addr || Addr + Size < Size || Addr + Size > uintptr_t(M.getBufferEnd()) || Addr < uintptr_t(M.getBufferStart())) { return object_error::unexpected_eof; } return std::error_cod...
false
false
false
false
false
0
lan78xx_set_addr_filter(struct lan78xx_priv *pdata, int index, u8 addr[ETH_ALEN]) { u32 temp; if ((pdata) && (index > 0) && (index < NUM_OF_MAF)) { temp = addr[3]; temp = addr[2] | (temp << 8); temp = addr[1] | (temp << 8); temp = addr[0] | (temp << 8); pdata->pfilter_table[index][1] = temp; temp...
false
false
false
false
false
0
bcma_host_pci_block_write(struct bcma_device *core, const void *buffer, size_t count, u16 offset, u8 reg_width) { void __iomem *addr = core->bus->mmio + offset; if (core->bus->mapped_core != core) bcma_host_pci_switch_core(core); switch (reg_width) { case sizeof(u8): iowrite8_rep(addr, buffe...
false
false
false
false
false
0
hough(GwyContainer *data, GwyRunType run) { GwyDataField *dfield, *edgefield, *result, *f1, *f2; GwySIUnit *siunit; gboolean ok; HoughArgs args; gint newid; gchar title[30]; g_return_if_fail(run & HOUGH_RUN_MODES); gwy_app_data_browser_get_current(GWY_APP_DATA_FIELD, &dfield, ...
false
false
false
false
false
0
PEM_SealFinal(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *sig, int *sigl, unsigned char *out, int *outl, EVP_PKEY *priv) { unsigned char *s=NULL; int ret=0,j; unsigned int i; if (priv->type != EVP_PKEY_RSA) { PEMerr(PEM_F_PEM_SEALFINAL,PEM_R_PUBLIC_KEY_NO_RSA); goto err; } i=RSA_size(priv->pkey.rsa); ...
false
false
false
false
false
0
update_table_format(const char *table, const char *newschema, const char *select_columns) { char *sql; int err; sql = sqlite3_mprintf("ALTER TABLE %s RENAME TO %s_old;", table, table); err = do_sql(sql); sqlite3_free(sql); if (err != SQLITE_OK) return err;...
false
false
false
false
false
0
xgene_dma_init_ring_mngr(struct xgene_dma *pdma) { if (ioread32(pdma->csr_ring + XGENE_DMA_RING_CLKEN) && (!ioread32(pdma->csr_ring + XGENE_DMA_RING_SRST))) return 0; iowrite32(0x3, pdma->csr_ring + XGENE_DMA_RING_CLKEN); iowrite32(0x0, pdma->csr_ring + XGENE_DMA_RING_SRST); /* Bring up memory */ iowrite3...
false
false
false
false
false
0
filter_datespec_validate (EFilterElement *element, EAlert **alert) { EFilterDatespec *fds = E_FILTER_DATESPEC (element); gboolean valid; g_warn_if_fail (alert == NULL || *alert == NULL); valid = fds->type != FDST_UNKNOWN; if (!valid) { if (alert) *alert = e_alert_new ("filter:no-da...
false
false
false
false
false
0
sheet_object_populate_menu (SheetObject *so, GPtrArray *actions) { g_return_if_fail (NULL != so); SHEET_OBJECT_CLASS (G_OBJECT_GET_CLASS(so))->populate_menu (so, actions); }
false
false
false
false
false
0
printsod( FILE *stream, size_t len ) { (void)fseeko(stream, (off_t)len, SEEK_CUR); if( len ) { fprintf(fout,"\n" ); fprintf(fout,"Data : %zu bytes\n", len ); data_size += len; } }
false
false
false
false
false
0
mpgocandi_t_free (mpgocandi_t *go) { if (go->cpOrigExpr) free (go->cpOrigExpr); mpcandi_t_free (&(go->Candi)); go->Valid = 0; }
false
false
false
false
false
0
obj_nexttraverseoutlet(t_outconnect *lastconnect, t_object **destp, t_inlet **inletp, int *whichp) { t_pd *y; y = lastconnect->oc_to; if (ISINLET(y)) { int n; t_inlet *i = (t_inlet *)y, *i2; t_object *dest = i->i_owner; for (n = dest->ob_pd->c_firstin, i2 = dest->ob_i...
false
false
false
false
false
0
session_alloc(u32 tid) { struct session *session; struct target *target = target_find_by_id(tid); if (!target) return NULL; if (!(session = malloc(sizeof(*session)))) return NULL; memset(session, 0, sizeof(*session)); session->target = target; INIT_LIST_HEAD(&session->slist); insque(&session->slist, &targ...
false
false
false
false
false
0
table_DDT (struct GMTMATH_INFO *info, double **stack[], GMT_LONG *constant, double *factor, GMT_LONG last, GMT_LONG col, GMT_LONG n_row) /*OPERATOR: DDT 1 1 d(A)/dt Central 1st derivative. */ { GMT_LONG i; double c, left, next_left; /* Central 1st difference in t */ if (info->irregular) fprintf (stderr, "%s: War...
false
false
false
false
false
0
VTThrd_delete(VTThrd* thrd, uint32_t tid) { if ( !thrd ) return; #if !defined(VT_DISABLE_RFG) if ( thrd->rfg_regions ) RFG_Regions_free(thrd->rfg_regions); #endif /* VT_DISABLE_RFG */ /* must be called before VTGen_delete */ #if defined(VT_PLUGIN_CNTR) /* if we really use plugins and this thread also uses...
false
false
false
false
false
0