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
kIsObject(state_t *s, int funct_nr, int argc, reg_t *argv) { if (argv[0].offset == 0xffff) /* Treated specially */ return NULL_REG; else return make_reg(0, is_heap_object(s, argv[0])); }
false
false
false
false
false
0
__ecereProp___ecereNameSpace__eda__FieldDataBox_Set_editor(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * value) { struct __ecereNameSpace__eda__FieldDataBox * __ecerePointer___ecereNameSpace__eda__FieldDataBox = (struct __ecereNameSpace__eda__FieldDataBox *)(this ...
false
false
false
true
false
1
ExecGrant_Language(InternalGrant *istmt) { Relation relation; ListCell *cell; if (istmt->all_privs && istmt->privileges == ACL_NO_RIGHTS) istmt->privileges = ACL_ALL_RIGHTS_LANGUAGE; relation = heap_open(LanguageRelationId, RowExclusiveLock); foreach(cell, istmt->objects) { Oid langId = lfirst_oid(cell...
true
true
false
false
false
1
intrHandler(void* arg) { jmp_buf* jmpbufp = pthread_getspecific(intrJmpbufkey); if (jmpbufp != NULL) { volatile sys_thread_t* self = sysThreadSelf(); pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL); self->interrupted = TR...
false
false
false
false
false
0
LoadLadspaEffect(wxSortedArrayString &uniq, wxString fname, DL_Array &dls) { wxLogNull logNo; LADSPA_Descriptor_Function mainFn = NULL; // Since we now have builtin VST support, ignore the VST bridge as it // causes duplicate menu entries to appear. wxFileName f(fname); i...
false
false
false
false
false
0
updateParent(const tShowerParticlePtr theParent, const ShowerParticleVector & theChildren, bool angularOrder) const { // no z for angular ordering in backward branchings theParent->setEvolutionScale(scale()); if(angularOrder) theChildren[1]->setEvolutionScale((1.-z())*scale()); else theChil...
false
false
false
false
false
0
wl1271_rx_filter_clear_all(struct wl1271 *wl) { int i, ret = 0; for (i = 0; i < WL1271_MAX_RX_FILTERS; i++) { if (!test_bit(i, wl->rx_filter_enabled)) continue; ret = wl1271_rx_filter_enable(wl, i, 0, NULL); if (ret) goto out; } out: return ret; }
false
false
false
false
false
0
ocfs2_commit_cache(struct ocfs2_super *osb) { int status = 0; unsigned int flushed; struct ocfs2_journal *journal = NULL; journal = osb->journal; /* Flush all pending commits and checkpoint the journal. */ down_write(&journal->j_trans_barrier); flushed = atomic_read(&journal->j_num_trans); trace_ocfs2_commit...
false
false
false
false
false
0
ixgbevf_set_interrupt_capability(struct ixgbevf_adapter *adapter) { struct net_device *netdev = adapter->netdev; int err; int vector, v_budget; /* It's easy to be greedy for MSI-X vectors, but it really * doesn't do us much good if we have a lot more vectors * than CPU's. So let's be conservative and only ask...
false
false
false
false
false
0
crypt_keyslot_destroy(struct crypt_device *cd, int keyslot) { crypt_keyslot_info ki; log_dbg("Destroying keyslot %d.", keyslot); if (!isLUKS(cd->type)) { log_err(cd, _("This operation is supported only for LUKS device.\n")); return -EINVAL; } ki = crypt_keyslot_status(cd, keyslot); if (ki == CRYPT_SLOT_INV...
false
false
false
false
false
0
onReadyRead() { while (m_ioDevice->isReadable() && m_ioDevice->canReadLine()) { m_idleTimer->stop(); QString line = QString(m_ioDevice->readLine()); if (line.endsWith('\n')) line.chop(1); if (line.endsWith('\r')) line.chop(1); if (line.isEmpty()) continue; emit debugMessage(QString("<%1(%2): %3...
false
false
false
false
false
0
scsi_read_capacity_16 ( struct block_device *blockdev ) { struct scsi_device *scsi = block_to_scsi ( blockdev ); struct scsi_command command; struct scsi_cdb_read_capacity_16 *cdb = &command.cdb.readcap16; struct scsi_capacity_16 capacity; int rc; /* Issue READ CAPACITY (16) */ memset ( &command, 0, sizeof ( co...
false
false
false
false
false
0
merge_states (automaton_t automaton, VEC(state_t, heap) *equiv_classes) { state_t curr_state; state_t new_state; state_t first_class_state; alt_state_t alt_states; alt_state_t alt_state, new_alt_state; arc_t curr_arc; arc_t next_arc; size_t i; /* Create states corresponding to equivalence classes con...
false
false
false
false
false
0
conv_output_flusher(ScmPort *port, int cnt, int forcep) { ScmConvInfo *info = (ScmConvInfo*)port->src.buf.data; size_t outsize, inroom, outroom, result, len; const char *inbuf; char *outbuf; inbuf = port->src.buf.buffer; inroom = len = SCM_PORT_BUFFER_AVAIL(port); for (;;) { /* Conv...
false
false
false
false
false
0
make_ggobi (GGobiOptions * options, gboolean processEvents, ggobid * gg) { gboolean init_data = false; /*-- some initializations --*/ gg->displays = NULL; globals_init (gg); /*-- variables that don't depend on the data --*/ special_colors_init (gg); wvis_init (gg); svis_init (gg); make_ui (gg); /...
false
false
false
true
false
1
screen_bad_aux (const char *line, const DATASET *dset) { int n = gretl_namechar_spn(line); char word[FN_NAMELEN]; int ci, err = E_DATA; *word = '\0'; if (n > 0) { if (n > FN_NAMELEN - 1) { n = FN_NAMELEN - 1; } strncat(word, line, n); } ci = gretl_command_number(word); if (c...
true
true
false
false
false
1
buffer_list_calc_size (GstBuffer ** buf, guint group, guint idx, gpointer data) { guint *p_size = data; guint buf_size; buf_size = GST_BUFFER_SIZE (*buf); GST_TRACE ("buffer %u in group %u has size %u", idx, group, buf_size); *p_size += buf_size; return GST_BUFFER_LIST_CONTINUE; }
false
false
false
false
false
0
i_idle_add (GSourceFunc function, gpointer data, GMainContext* context) { GSource* source; guint id; g_return_val_if_fail(function != NULL, 0); source = g_idle_source_new(); g_source_set_callback(source, function, data, NULL); id = g_source_attach(source, context); g_source_unref(source); return id; }
false
false
false
false
false
0
read_buf (int fdes, char **buf) { char *readloc; int n; int nread = 0; int size = 1; int grow = 2; *buf = emalloc(size); readloc = *buf; while (1) { n = read (fdes, readloc, size - nread); if (n == 0) break; if (n == -1) eprintf ("Error in read_buf:", __FILE__, __LINE__); ...
false
false
false
false
false
0
maybe_emit_file (struct dwarf_file_data * fd) { if (! fd->emitted_number) { if (last_emitted_file) fd->emitted_number = last_emitted_file->emitted_number + 1; else fd->emitted_number = 1; last_emitted_file = fd; if (DWARF2_ASM_LINE_DEBUG_INFO) { fprintf (asm_out_file, "\t.file %u ",...
false
false
false
false
false
0
Hash_Locate(HashNode *t, int tbl_size, long key) { int n = Hash_Function(key, tbl_size); HashNode p; t += n; for (p = *t; p; p = p->next) { if (p->key == key) break; t = &p->next; } return t; }
false
false
false
false
false
0
mono_marshal_free_dynamic_wrappers (MonoMethod *method) { MonoImage *image = method->klass->image; g_assert (method->dynamic); /* This could be called during shutdown */ if (marshal_mutex_initialized) mono_marshal_lock (); /* * FIXME: We currently leak the wrappers. Freeing them would be tricky as * they ...
false
false
false
false
false
0
is_hilited_range(pos, epos) POSITION pos; POSITION epos; { struct hilite *hl; /* * Look at each highlight and see if any part of it falls in the range. */ for (hl = hilite_anchor.hl_first; hl != NULL; hl = hl->hl_next) { if (hl->hl_endpos > pos && (epos == NULL_POSITION || epos > hl->hl_startpos)) ...
false
false
false
false
false
0
isLive(unsigned RegNo) const { unsigned Slot = getSlot(RegNo); return Slot < StackTop && Stack[Slot] == RegNo; }
false
false
false
false
false
0
del_lang(char *lang) { lang_pri *lp = langpriority, *lpo = NULL; while (lp) { /* Found the language? */ if (!strcmp(lang, lp->lang)) { if (lpo) lpo->next = lp->next; else langpriority = lp->next; if (lp->lang) nfree(lp->lang); nfree(lp); debug1("LANG: L...
false
false
false
false
false
0
uuid() const { Q_D(const StorageVolume); return_SOLID_CALL(Ifaces::StorageVolume *, d->backendObject(), QString(), uuid().toLower()); }
false
false
false
false
false
0
globus_i_gram_parse_log_levels( const char * unparsed_string, int * log_levels, char ** error_string) { char * log_level_string = strdup(unparsed_string); char * level_string = NULL; ...
false
false
false
false
false
0
tok_next(tok_t *t) { const char *sep; char *token; /* initialising us with a NULL buffer is harmless */ if (!t->buf) return NULL; /* use the given separator or the default separator string */ sep = (t->sep ? t->sep : " \t\n\r"); if ((t->flags & TOK_EMPTY)) { if ((t->flags & _TOK_FIRST))...
false
false
false
false
false
0
adis16480_probe(struct spi_device *spi) { const struct spi_device_id *id = spi_get_device_id(spi); struct iio_dev *indio_dev; struct adis16480 *st; int ret; indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); if (indio_dev == NULL) return -ENOMEM; spi_set_drvdata(spi, indio_dev); st = iio_priv(indio...
false
false
false
false
false
0
smi_mod_timer(struct smi_info *smi_info, unsigned long new_val) { if (!smi_info->timer_can_start) return; smi_info->last_timeout_jiffies = jiffies; mod_timer(&smi_info->si_timer, new_val); smi_info->timer_running = true; }
false
false
false
false
false
0
gt_sam_alignment_cigar_length(GtSamAlignment *sam_alignment) { gt_assert(sam_alignment != NULL); return sam_alignment->s_alignment->core.n_cigar; }
false
false
false
false
false
0
erase_ata_device (UDisksBlock *block, UDisksObject *object, UDisksDaemon *daemon, uid_t caller_uid, gboolean enhanced, GError **error) { gboolean ret = FALSE; UDisksObject *drive_object = NULL; UDisksDrive...
false
false
false
false
false
0
addQualifiedEntry(const string& qualifier, const string& value) { // search for quotes size_t vlen = value.length(); gi_assert(vlen>0); stringCIter start = value.begin(); stringCIter end = start+vlen-1; if (*start == '"') { if (vlen == 1 || *end != '"') { throw GBS_globa...
false
false
false
false
false
0
clear() { for (size_t j = 0; j < length; ++j) delete list[j]; length = 0; }
false
false
false
false
false
0
p_tabw_update_selection(GapStbTabWidgets *tabw) { GapStbFrameWidget *fw; GapStbMainGlobalParams *sgpp; GdkColor *bg_color; GdkColor *fg_color; gint ii; if(tabw == NULL) { return; } sgpp = (GapStbMainGlobalParams *)tabw->sgpp; if(sgpp == NULL) { return; } for(ii=0; ii < tabw->fw_tab_siz...
false
false
false
false
false
0
vi_postprocess_pageviews(struct vih *vih) { void **table; int len = ht_used(&vih->pageviews), i; if ((table = ht_get_array(&vih->pageviews)) == NULL) { fprintf(stderr, "Out of memory in vi_postprocess_pageviews()\n"); return 1; } /* Run the hashtable in order to populate 'pageviews_grouped' */ for (i = 0; i ...
false
false
false
false
false
0
TreeLookup(map_ptrloc *Base,const char *Text, const char *TextEnd,unsigned long Size, unsigned int *Count,bool Insert) { pkgFLCache::Directory *Dir; // Check our last entry cache if (LastTreeLookup != 0 && LastLookupSize == Size) { Dir = (pkgFLCache::Directory *)(AnyP + LastTree...
false
false
false
false
false
0
ath9k_set_hw_capab(struct ath_softc *sc, struct net80211_device *dev __unused) { sc->hwinfo->flags = NET80211_HW_RX_HAS_FCS; sc->hwinfo->signal_type = NET80211_SIGNAL_DB; sc->hwinfo->signal_max = 40; /* 35dB should give perfect 54Mbps */ sc->hwinfo->channel_change_time = 5000; if (sc->sc_ah->caps.hw_caps & ATH9K_...
false
false
false
false
false
0
snd_usb_copy_string_desc(struct mixer_build *state, int index, char *buf, int maxlen) { int len = usb_string(state->chip->dev, index, buf, maxlen - 1); if (len < 0) return 0; buf[len] = 0; return len; }
false
false
false
false
false
0
NewBFCipher( const Interface &iface, int keyLen ) { if( keyLen <= 0 ) keyLen = 160; keyLen = BFKeyRange.closest( keyLen ); const EVP_CIPHER *blockCipher = EVP_bf_cbc(); const EVP_CIPHER *streamCipher = EVP_bf_cfb(); return shared_ptr<Cipher>( new SSL_Cipher(iface, BlowfishInterface, blockCi...
false
false
false
false
false
0
f300_xfer(struct dvb_frontend *fe, u8 *buf) { struct cx23885_tsport *port = fe->dvb->priv; struct cx23885_dev *dev = port->dev; u8 i, temp, ret = 0; temp = buf[0]; for (i = 0; i < buf[0]; i++) temp += buf[i + 1]; temp = (~temp + 1);/* get check sum */ buf[1 + buf[0]] = temp; f300_set_line(dev, F300_RESET, 1...
false
false
false
false
false
0
set(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) { char *varname; char *val; varname = strsep(&data, "="); val = data; if (ast_strlen_zero(varname) || !val) { ast_log(LOG_WARNING, "Syntax SET(<varname>=[<value>])\n"); return -1; } varname = ast_strip(varname); val...
false
false
false
false
false
0
test_index_tests__gitgit_index(void) { git_index *index; cl_git_pass(git_index_open(&index, TEST_INDEX2_PATH)); cl_assert(index->on_disk); cl_assert(git_index_entrycount(index) == (unsigned int)index_entry_count_2); cl_assert(index->entries.sorted); cl_assert(index->tree != NULL); git_index_free...
false
false
false
false
false
0
slotCopyNextTrackDone( ThreadWeaver::Job* job, const Meta::TrackPtr& track ) { Q_UNUSED( track ) enqueueNextCopyThread(); if ( job->success() ) slotFinalizeTrackCopy( track ); else { m_copyFailed = true; slotCopyTrackFailed( track ); } }
false
false
false
false
false
0
meta_data_connect_mark_with_keyword(GtkTreeModel *keyword_tree, GtkTreeIter *kw_iter, gint mark) { FileDataGetMarkFunc get_mark_func; FileDataSetMarkFunc set_mark_func; gpointer mark_func_data; gint i; for (i = 0; i < FILEDATA_MARKS_SIZE; i++) { file_data_get_registered_mark_func(i, &get_mark_func, &set_mar...
false
false
false
false
false
0
creature_set_conversion_type(creature_t *creature, creature_type type) { if (type < 0 || type >= CREATURE_TYPES) return 0; // Geht Umwandung ueberhaupt? if (creature_conversion_food(creature, type) == 0) return 0; // Beim Type Wechsel geht Food verloren if (creature->convert_ty...
false
false
false
false
false
0
window_page_up(struct view *view) { struct window *window = view->window; position_t start = screen_start(view); position_t end; int row; size_t bytes; if (start) { int overlap = page_overlap(window); for (row = 0; (end = start) && row + overlap < window->rows; row += count_rows(window, start, ...
false
false
false
false
false
0
check_files(FILE *stream, const char *checkfile_name, struct program_settings *settings) { size_t len; char *line; uint8_t expected_hash[64], actual_hash[64]; int binary; uint64_t bad_checksum_count = 0; uint64_t bad_line_count = 0; char *filename; int status_code = 0; while ((len = read_line(stream, &li...
false
false
false
false
true
1
steal_lock(BW *bw,int c,B *b,int *notify) { if (yncheck(steallock_key, c)) { unsigned char bf1[256]; unsigned char bf[300]; unlock_it(b->name); if (lock_it(b->name,bf1)) { int x; for(x=0;bf1[x] && bf1[x]!=':';++x); bf1[x]=0; if(bf1[0]) joe_snprintf_1(bf,sizeof(bf),joe_gettext(LOCKMSG1),bf1); ...
true
true
false
false
false
1
VSM_Free(const void *ptr) { AZ(pthread_mutex_lock(&vsm_mtx)); VSM__Free(ptr); AZ(pthread_mutex_unlock(&vsm_mtx)); }
false
false
false
false
false
0
TimerClick(int signal) { if(signal) { // // Do not report if less than <period> since last report. // if(time(0) - elapsed >= period) { fprintf(output, "%s\n", (const char*)Report()); elapsed = time(0); fflush(output); } } #ifndef _MSC_VER /* _WIN32 */ alarm(period); #endif }
false
false
false
false
false
0
getfds(int fd[2], int c, int default0, int default1) { int n; fd[0] = default0; fd[1] = default1; if (c != '[') { UNGETC(c); return TRUE; } if ((unsigned int) (n = GETC() - '0') > 9) { scanerror("expected digit after '['"); return FALSE; } while ((unsigned int) (c = GETC() - '0') <= 9) n = n * 10 + ...
false
false
false
false
false
0
op_v1_challenge (GkdSshAgentCall *call) { GckBuilder builder = GCK_BUILDER_INIT; gsize offset, n_data, n_result, n_hash; GckSession *session; GckAttributes *attrs; guchar session_id[16]; guint8 hash[16]; const guchar *data; guchar *result = NULL; GChecksum *checksum; GckObject *key = NULL; guint32 resp_type;...
false
false
false
false
false
0
hwp_properties_get_pages (NautilusPropertyPageProvider *provider, GList *files) { GError *error = NULL; GsfDocMetaData *meta_data; GList *pages = NULL; NautilusFileInfo *file; gchar *uri = NULL; gchar *mime_type = NULL; GtkWidget *page, *label; NautilusPropertyPage *property_page; /* only add properties p...
false
false
false
false
false
0
add_text_tag (GstId3v2Tag * id3v2tag, const GstTagList * list, const gchar * tag, guint num_tags, const gchar * frame_id) { const gchar **strings; guint n, i; GST_LOG ("Adding '%s' frame", frame_id); strings = g_new0 (const gchar *, num_tags + 1); for (n = 0, i = 0; n < num_tags; ++n) { if (gst_tag_...
false
false
false
false
false
0
dlt_to_linktype(int dlt) { int i; /* * Map the values in the matching range. */ if (dlt >= DLT_MATCHING_MIN && dlt <= DLT_MATCHING_MAX) return (dlt); /* * Map the values outside that range. */ for (i = 0; map[i].dlt != -1; i++) { if (map[i].dlt == dlt) return (map[i].linktype); } /* * If we d...
false
false
false
false
false
0
cpl_array_get_long_long(const cpl_array *array, cpl_size indx, int *null) { cpl_errorstate prestate = cpl_errorstate_get(); long long data = 0; if (array == 0x0) { cpl_error_set_(CPL_ERROR_NULL_INPUT); if (null) *null = -1; return data...
false
false
false
false
false
0
ArgusHandleData(struct ArgusSocketStruct *asock, unsigned char *buf, int len, void *client) { int retn = 0, i, status, pid; struct ArgusRecord *argus = (struct ArgusRecord *) buf; if (ArgusOutputTask->clienttags) { for (i = 0; i < ARGUS_MAXLISTEN; i++) { if (ArgusOutputTask->client[i].pid != -1...
false
false
false
false
false
0
get_memory_ranges(struct memory_range **range, int *ranges, unsigned long kexec_flags) { int ret, i; if (!efi_map_added() && !xen_present() && have_sys_firmware_memmap()) { ret = get_memory_ranges_sysfs(range, ranges); if (!ret) ret = fixup_memory_ranges(range, ranges); } else if (xen_present()) { ...
false
false
false
false
false
0
ntb_slab_allocate(struct ntb_slab_allocator *allocator, size_t size, int alignment) { struct ntb_slab *slab; size_t offset; offset = ntb_slab_align(allocator->slab_used, alignment); if (size + offset > NTB_SLAB_SIZE) { /* Start a new slab */ ...
false
false
false
false
false
0
go_get_mime_type (gchar const *uri) { #if defined(G_OS_WIN32) /* Do we really need that? */ LPWSTR wuri, mime_type; wuri = g_utf8_to_utf16 (uri, -1, NULL, NULL, NULL); if (wuri && find_mime_from_data () && (find_mime_from_data ()) (NULL, wuri, NULL, 0, NULL, FMFD_ENABLEMIMESNIFFING, &...
false
false
false
false
false
0
getMatrix(SoGetMatrixAction *action) // //////////////////////////////////////////////////////////////////////// { // If has effect on transform if (! whatToReset.isIgnored() && (whatToReset.getValue() & TRANSFORM)) { // Overwrite the current matrices with identity action->getMatrix().makeIdentity(); action...
false
false
false
false
false
0
Duplicate (Line& line) { Line LineX, LineY, LineZ ; LineX = line ; LineX.Move (- floor (LineX.Xmin ()-m_xmin + 1e-7), - floor (LineX.Ymin ()-m_ymin + 1e-7), - floor (LineX.Zmin ()-m_zmin + 1e-7)) ; while (LineX.Xmax () <= m_xmax + 1e-7) { LineY = LineX ; while (LineY.Ymax () <= m_ymax + 1e-7) { LineZ = LineY...
false
false
false
false
false
0
add_layout(int col, int row, const CL_Layout &layout, int span) { impl->elements.push_back(new CL_LayoutItem(layout.impl)); }
false
false
false
false
false
0
gwa_list_signals (GladeWidgetAdaptor *adaptor, GType real_type) { GList *signals = NULL; GType type, parent, *i, *p; g_return_val_if_fail (real_type != 0, NULL); for (type = real_type; g_type_is_a (type, G_TYPE_OBJECT); type = parent) { parent = g_type_parent (type); /* Add class signals */ ...
false
false
false
false
false
0
aacDecoder_Close ( HANDLE_AACDECODER self ) { if (self == NULL) return; if (self->hPcmUtils != NULL) { pcmDmx_Close( &self->hPcmUtils ); } if (self->hSbrDecoder != NULL) { sbrDecoder_Close(&self->hSbrDecoder); } if (self->hInput != NULL) { transportDec_Close(&self->hInput); } CAa...
false
false
false
false
false
0
find_modint_ring (const cl_I& m) { { Mutable(cl_I,m); m = abs(m); static modint_ring_cache cache; var cl_modint_ring* ring_in_table = cache.get_modint_ring(m); if (!ring_in_table) { var cl_modint_ring R = make_modint_ring(m); cache.store_modint_ring(R); ring_in_table = cache.get_modint_ring(m); if (!ring_i...
false
false
false
false
false
0
resetRobotDisplacementCounters(const CPose2D &new_pose) { m_distSinceLastICP.updatePose(new_pose); for (mrpt::aligned_containers<std::string,CMetricMapBuilderICP::TDist>::map_t::iterator it=m_distSinceLastInsertion.begin();it!=m_distSinceLastInsertion.end();++it) it->second.updatePose(new_pose); }
false
false
false
false
false
0
print_rate(uint32_t period) { unsigned int i; if (period == 0) { printf(" %f", INFINITY); return; } for (i = 1; i < ARRAY_SIZE(rates); ++i) if (period > rates[i].mult || rates[i].mult/period < rates[i].mult%period) break; printf(" %u/%s", rates[i-1].mult / period, rates[i-1].name); }
false
false
false
false
false
0
setAttr(C *attr_,A aval_) { ipcWarn(wrnlvl(),"%t TimrConnection::setAttr\n"); int idx=timrSetAttrIndex(attr_); I ival; switch(idx) { CSBOOL(0,aval_,turnDebugOn,turnDebugOff); CSR(1,return setOnExpire(aval_)); CSR(2,return setExpiry(aval_)); CSR(3,return setEventSymbol(aval_)); CSR(4,return s...
false
false
false
false
false
0
printResult(STD_NAMESPACE ostream &out, DcmStack &stack, size_t printFlags, const char*pixelFileName = NULL, size_t *pixelCounter = NULL) { unsigned long n = stack.card(); if (n == 0) { return; } if ...
false
false
false
false
false
0
read_http_payload(struct ledm_session *ps, char *payload, int max_size, int sec_timeout, int *bytes_read) { struct bb_ledm_session *pbb = ps->bb_session; int stat=1, total=0, len; int tmo=sec_timeout; enum HTTP_RESULT ret; int payload_length=-1; char *temp=NULL; *bytes_read = 0; if(http_read_header(pb...
false
false
false
false
false
0
krb5_cc_register(krb5_context context, const krb5_cc_ops *ops, krb5_boolean override) { int i; for(i = 0; i < context->num_cc_ops && context->cc_ops[i]->prefix; i++) { if(strcmp(context->cc_ops[i]->prefix, ops->prefix) == 0) { if(!override) { krb5_set_error_message(context, KRB5_CC_TYP...
false
false
false
false
false
0
gcalloc(int cnt,long size) { void *ret; while (( ret = calloc(cnt,size))==NULL ) trap(); return( ret ); }
false
false
false
false
false
0
snd_intel8x0_ali_codec_read(struct snd_ac97 *ac97, unsigned short reg) { struct intel8x0 *chip = ac97->private_data; unsigned short data = 0xffff; if (snd_intel8x0_ali_codec_semaphore(chip)) goto __err; reg |= ALI_CPR_ADDR_READ; if (ac97->num) reg |= ALI_CPR_ADDR_SECONDARY; iputword(chip, ICHREG(ALI_CPR_ADDR...
false
false
false
false
false
0
lgfs2_lang_result_print(struct lgfs2_lang_result *result) { int i; if (result->lr_mtype != NULL) { for (i = 0; i < result->lr_mtype->nfields; i++) { field_print(result->lr_bh, result->lr_mtype, &result->lr_mtype->fields[i]); } } else { printf("%"PRIu64": %s\n", result->lr_blocknr, bitstate_strings[result->l...
false
false
false
false
false
0
set_pattern(info, pattern, search_type) struct pattern_info *info; char *pattern; int search_type; { if (pattern == NULL) CLEAR_PATTERN(search_info.compiled); else if (compile_pattern(pattern, search_type, &info->compiled) < 0) return -1; /* Pattern compiled successfully; save the text too. */ if (info->text...
false
false
false
false
false
0
_e_fm2_volume_erase(E_Volume *v) { char buf[PATH_MAX] = {0}; const char *id; if (!v->storage) return; id = ecore_file_file_get(v->storage->udi); if (e_config->device_desktop) { snprintf(buf, sizeof(buf), "%s/|%s_%d.desktop", efreet_desktop_dir_get(), id, v->partition_number...
true
true
false
false
false
1
send_raw_client(int size, const unsigned char *data, struct sockaddr_in *addr_to, const struct sockaddr_in *addr_ourip) { #ifdef HAVE_PKTINFO struct iovec msg_iov; struct msghdr msg; char buffer[CMSG_SPACE(sizeof(struct in_pktinfo))]; struct cmsghdr *ip_msg = (struct cmsghdr *) buffer; struct in_pktinfo *pk...
true
true
false
false
false
1
findsimplematch(const Token *tok, const char pattern[]) { for (; tok; tok = tok->next()) { if (Token::simpleMatch(tok, pattern)) return tok; } return 0; }
false
false
false
false
false
0
sig_read_data(struct visorchannel *channel, u32 queue, struct signal_queue_header *sig_hdr, u32 slot, void *data) { int err; int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue, sig_hdr, slot); err = visorchannel_read(channel, signal_data_offset, data, sig_hdr->signal_size); if (er...
false
false
false
false
false
0
end_element (GMarkupParseContext *context, const gchar *element_name, gpointer user_data, GError **error) { ParseData *pd = user_data; if (!strcmp (element_name, "gegl") || !strcmp (element_name, "image...
false
false
false
false
false
0
map_4_get( const uint8_t* map, int index ) { map += index / 2; if (index % 2) return ((*(map) >> 4) & 0x08); else return (*(map) & 0x08); }
false
false
false
false
false
0
parser_toplevel_start (MobileParser *parser, const char *name, const char **attribute_names, const char **attribute_values) { int i; if (!strcmp (name, "serviceproviders")) { for (i = 0; attribute_names && attribute_names[i]; i++) { if (!strcm...
false
false
false
false
false
0
process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long elements, int objprops) { while (elements-- > 0) { zval *key, *data, **old_data; ALLOC_INIT_ZVAL(key); if (!php_var_unserialize(&key, p, max, NULL TSRMLS_CC)) { zval_dtor(key); FREE_ZVAL(key); return 0; } if (Z_TYPE_P(key) != IS_LONG ...
false
false
false
false
false
0
print_vma (bfd_vma vma, print_mode mode) { int nc = 0; switch (mode) { case FULL_HEX: nc = printf ("0x"); /* Drop through. */ case LONG_HEX: #ifdef BFD64 if (is_32bit_elf) return nc + printf ("%8.8" BFD_VMA_FMT "x", vma); #endif printf_vma (vma); return nc + 16; ca...
false
false
false
false
false
0
ss_rolldown() // new v.11.01 { int py; uint8 *pix3; double delay = 0.5 / ss_hh; for (py = 0; py < ss_hh; py++) { pix3 = PXMpix8(ss_pxmnew,0,py); gdk_draw_rgb_image(drWin->window, gdkgc, 0, py, ss_ww, 1, NODITHER, ...
false
false
false
false
false
0
set_spec (const char *name, const char *spec) { struct spec_list *sl; const char *old_spec; int name_len = strlen (name); int i; /* If this is the first call, initialize the statically allocated specs. */ if (!specs) { struct spec_list *next = (struct spec_list *) 0; for (i = ARRAY_SIZE (s...
false
false
false
false
false
0
CKYCardContext_ListReaders(CKYCardContext *ctx, CKYReaderNameList *readerNames) { unsigned long readerLen; unsigned long rv; char * readerStr = NULL; char *cur; char ** readerList; int count,i; /* return NULL in the case nothing is found, or there is an error */ *readerNames = NULL; ...
false
false
false
false
false
0
mud_telnet_handle_negative_nego(MudTelnet *telnet, const guchar opt_no, const guchar affirmative, const guchar negative, gint him) { const guint bitshift = him ? 4 : 0; guchar * opt = &(telnet->telopt_states[opt_no]); switch (mud_telnet_get_telopt_state(opt, bits...
false
false
false
false
false
0
bFormat( void ) { wxString os1; float f1; bool b1; os1 = wxT(".GENERATOR"); if( ! m_osAmplitude .IsEmpty( ) ) os1 << wxT(" AMP=") << m_osAmplitude; if( ! m_osOffset .IsEmpty( ) ) os1 << wxT(" OFFSET=") << m_osOffset; f1 = 0.0; b1 = ConvertType::bStrToFlt( m_osSinFreq, &f1 ); if( b1=...
false
false
false
false
false
0
Hash(const char* data, size_t n, uint32_t seed) { // Similar to murmur hash const uint32_t m = 0xc6a4a793; const uint32_t r = 24; const char* limit = data + n; uint32_t h = seed ^ (n * m); // Pick up four bytes at a time while (data + 4 <= limit) { uint32_t w = DecodeFixed32(data); data += 4; ...
false
false
false
false
false
0
ldbm_instance_destructor(void **arg) { ldbm_instance *inst = (ldbm_instance *) *arg; LDAPDebug(LDAP_DEBUG_ANY, "Destructor for instance %s called\n", inst->inst_name, 0, 0); slapi_counter_destroy(&(inst->inst_ref_count)); slapi_ch_free_string(&inst->inst_name); PR_DestroyLock(inst->...
false
false
false
false
false
0
collect_manager_entry_new(const gchar *path) { CollectManagerEntry *entry; entry = g_new0(CollectManagerEntry, 1); entry->path = g_strdup(path); collect_manager_entry_init_data(entry); collection_manager_entry_list = g_list_append(collection_manager_entry_list, entry); return entry; }
false
false
false
false
false
0
operator<(const InetAddrMask &a, const InetAddrMask &b) { if (a.getAddressPtr()->addressFamily() != b.getAddressPtr()->addressFamily()) return false; return *(a.getAddressPtr()) < *(b.getAddressPtr()); }
false
false
false
false
false
0
Consume_data_read(const int index, const int datatype, const size_t num_bytes_to_read, void *pData) { if(index < 0 || index >= IOTypes_table.num_registered) { fprintf(stderr, "STEER: ERROR: Consume_data_read: IOType " "index (%d) out of range\n", index); return REG_FAILURE;...
false
false
false
false
false
0
TestCommandDelAssoc( String ) char *String; { bddassoc *BddAssoc; bddnode *BddNodeIn; bddvar Variable; BddAssoc = BddLocalSystem->ASSOC; if ( BddAssoc != (bddassoc *)0 ) { if ( String != (char *)0 ) { String = TestGetName( String ); BddNodeIn = searchbddcircuitin( (bddcircuit...
false
false
false
false
false
0
hns_dsaf_alloc_dev(struct device *dev, size_t sizeof_priv) { struct dsaf_device *dsaf_dev; dsaf_dev = devm_kzalloc(dev, sizeof(*dsaf_dev) + sizeof_priv, GFP_KERNEL); if (unlikely(!dsaf_dev)) { dsaf_dev = ERR_PTR(-ENOMEM); } else { dsaf_dev->dev = dev; dev_set_drvdata(dev, dsaf_dev); } retur...
false
false
false
false
false
0
traceEventStartup_(int nocaps) { if (eventlog_enabled) { postEventStartup(nocaps); } }
false
false
false
false
false
0
x509_akid_note_kid(void *context, size_t hdrlen, unsigned char tag, const void *value, size_t vlen) { struct x509_parse_context *ctx = context; struct asymmetric_key_id *kid; pr_debug("AKID: keyid: %*phN\n", (int)vlen, value); if (ctx->cert->akid_skid) return 0; kid = asymmetric_key_generate...
false
false
false
false
false
0