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
MPI_Bcast(void* buf, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT root, MPI_Comm comm) { VT_MPI_INT result; uint32_t tid; GET_THREAD_ID(tid); if (IS_MPI_TRACE_ON(tid)) { uint64_t time; uint8_t was_recorded; uint64_t matchid = 0; MPI_TRACE_OFF(tid); ...
false
false
false
false
false
0
isInSegmentEnvelopes(const Coordinate& intPt) const { Envelope env0(*inputLines[0][0], *inputLines[0][1]); Envelope env1(*inputLines[1][0], *inputLines[1][1]); return env0.contains(intPt) && env1.contains(intPt); }
false
false
false
false
false
0
stringio_getstate(stringio *self) { PyObject *initvalue = stringio_getvalue(self); PyObject *dict; PyObject *state; if (initvalue == NULL) return NULL; if (self->dict == NULL) { Py_INCREF(Py_None); dict = Py_None; } else { dict = PyDict_Copy(self->dict); ...
false
false
false
false
false
0
xaccTransWarnReadOnly (const Transaction *trans) { GtkWidget *dialog; const gchar *reason; const gchar *format = _("Cannot modify or delete this transaction. This transaction is " "marked read-only because:\n\n'%s'"); if (!trans) return FALSE; reason = xaccTransGetReadOnly (trans...
false
false
false
false
false
0
drct_get_info (int * bitrate, int * samplerate, int * channels) { if (playing) wait_until_ready (); * bitrate = current_bitrate; * samplerate = current_samplerate; * channels = current_channels; }
false
false
false
false
false
0
stop() { if (!isFinished()) { fRunning = false; wait(); } }
false
false
false
false
false
0
read (std::string &line, gboolean print, gboolean check) { // Do not allow writing to a closed, or invalid socket. This causes // SEGV in SSL. if (sd_ == SD_CLOSE) return SOCKET_STATUS_ERROR; char buffer; int status = 0; line = ""; status_ = -1; gint cnt = 1 + prevdos_line_length_; // TEMP_FAILURE_RETRY w...
false
false
false
false
false
0
__mtk_rtc_read_time(struct mt6397_rtc *rtc, struct rtc_time *tm, int *sec) { int ret; u16 data[RTC_OFFSET_COUNT]; mutex_lock(&rtc->lock); ret = regmap_bulk_read(rtc->regmap, rtc->addr_base + RTC_TC_SEC, data, RTC_OFFSET_COUNT); if (ret < 0) goto exit; tm->tm_sec = data[RTC_OFFSET_SEC]; tm...
false
false
false
false
false
0
append_to_get_fork_parms_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) { GVfsAfpVolume *volume = G_VFS_AFP_VOLUME (source_object); GVfsJobOpenForWrite *job = G_VFS_JOB_OPEN_FOR_WRITE (user_data); AfpHandle *afp_handle = (AfpHandle *)job->backend_handle; GFileInfo *info; GError *err = NUL...
false
false
false
false
false
0
cupsGetDestMediaByName( http_t *http, /* I - Connection to destination */ cups_dest_t *dest, /* I - Destination */ cups_dinfo_t *dinfo, /* I - Destination information */ const char *media, /* I - Media name */ unsigned flags, /* I - Media matching flags */ cups_size_t *size...
false
false
false
false
false
0
puzzle_view_finalize (GObject* obj) { PuzzleView * self; self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PUZZLE_VIEW, PuzzleView); _g_object_unref0 (self->priv->tiles_handle); _g_free0 (self->priv->image_filepath); _cairo_surface_destroy0 (self->priv->surface); _puzzle_unref0 (self->priv->_puzzle); G_OBJECT_CLASS (...
false
false
false
false
false
0
__dce_turn_chg_store_on(struct mod_t *in_mdp, struct dcevnt_t *dcep, int32 all_insts) { register int32 ii; struct mod_t *mdp; struct net_t *np; if (dcep->dce_1inst) { mdp = dcep->dce_matchitp->itip->imsym->el.emdp; /* DBG remove -- */ if (in_mdp != mdp) __misc_terr(__FILE__, __LINE__); /* --- */ ...
false
false
false
false
false
0
cgraph_summary(struct call_graph *graph) { int i; int j = 0; /* Edge from index */ int k = 0; /* Edge to index */ for (i = 0; i < graph->node_list.size; i++) { struct cg_node *n = CG_NODE(graph, i); int from_count = 0; int to_count = 0; char name[64]; address_t o; while (j < graph->edge_from.size && ...
true
true
false
false
false
1
selection(void) { MSString buffer; viewFormatOutput(buffer,selectedRow(),selectedColumn()); return buffer; }
false
false
false
false
false
0
__eq__(const Basic &o) const { if (is_a<Integer>(o)) { const Integer &s = static_cast<const Integer &>(o); return this->i == s.i; } return false; }
false
false
false
false
false
0
giggle_rev_list_view_get_selection (GiggleRevListView *list) { GList *result = NULL; GtkTreeSelection *selection; GtkTreeModel *model; GList *rows; g_return_val_if_fail (GIGGLE_IS_REV_LIST_VIEW (list), NULL); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list)); rows = gtk_t...
false
false
false
false
false
0
start_timer ( struct retry_timer *timer ) { if ( ! timer->running ) list_add ( &timer->list, &timers ); timer->start = currticks(); timer->running = 1; /* 0 means "use default timeout" */ if ( timer->min_timeout == 0 ) timer->min_timeout = DEFAULT_MIN_TIMEOUT; /* We must never be less than MIN_TIMEOUT under ...
false
false
false
false
false
0
kmc_set_play_rate(int fd, int fps, int palvideo) { int i, prev_playrate, new_playrate; int new_position=-1; int prev_position=-1; int relative_position; int *display_rates; /* * Set display_rates list depending on PAL or NTSC */ if (palvideo == 0) display_rates = &DISPLAY_RATES_NTSC; if (palvideo == 1) di...
false
false
false
false
true
1
convolve (lpyramid_t *pyramid, float *a, float *b) /* convolves image b with the filter kernel and stores it in a */ { int y,x,i,j,nx,ny; const float Kernel[] = {0.05f, 0.25f, 0.4f, 0.25f, 0.05f}; int width = pyramid->width; int height = pyramid->height; for (y=0; y<height; y++) { for (x=0; x<widt...
false
false
false
false
false
0
trimWhitespace( const std::string& s) { size_t left = 0; // Trim from left while ((left < s.length()) && iswspace(s[left])) { ++left; } int right = s.length() - 1; // Trim from right while ((right > (int)left) && iswspace(s[right])) { --right; } ...
false
false
false
false
false
0
Solveable() { for (int i = 0; i < BOXES; ++i) { if (item[i].val < 0 && item[i].poss.num() == 0) return false; } for (int bb = 0; bb < BIGBOXES; ++bb) { const unsigned int bbcol = (bb % 3); const unsigned int bbrow = (bb / 3); const unsigned int bbstart = bbrow * 27 + bbcol * 3; Possible<i...
false
false
false
false
false
0
CheckCallback(const void* ptr, int* type, int dummy) { if ((*type & kDeallocatedTypeBit) == 0) { FromRawPointer(ptr)->CheckLocked(*type); } }
false
false
false
false
false
0
alloc_float(int n) { if (nalloc_f >= n) return; nalloc_f = n + 10; xf = G_realloc(xf, nalloc_f * sizeof(double)); yf = G_realloc(yf, nalloc_f * sizeof(double)); }
false
false
false
false
false
0
vala_plugin_real_activate (AnjutaPlugin* base) { ValaPlugin * self; gboolean result = FALSE; AnjutaReport* _tmp0_; AnjutaShell* _tmp1_ = NULL; AnjutaShell* _tmp2_; AnjutaShell* _tmp3_; GObject* _tmp4_ = NULL; GObject* _tmp5_; GObject* _tmp6_; AnjutaReport* _tmp7_; ValaParser* _tmp8_; ValaGenieParser* _tmp9_...
false
false
false
false
false
0
_wrap_svn_txdelta_target_push(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; svn_txdelta_window_handler_t arg1 = (svn_txdelta_window_handler_t) 0 ; void *arg2 = (void *) 0 ; svn_stream_t *arg3 = (svn_stream_t *) 0 ; apr_pool_t *arg4 = (apr_pool_t *) 0 ; apr_pool_t *_global_pool =...
false
false
false
false
false
0
mime_header_decoder_delete(struct mime_header_decoder_data *pd) { if (pd) { mbfl_convert_filter_delete(pd->conv2_filter); mbfl_convert_filter_delete(pd->conv1_filter); mbfl_convert_filter_delete(pd->deco_filter); mbfl_memory_device_clear(&pd->outdev); mbfl_memory_device_clear(&pd->tmpdev); mbfl_free((void*...
false
false
false
false
false
0
psres_escape(char *s, unsigned len) { unsigned pos = 0, delta = 0; while (pos < len) { if (s[pos] == '\\') pos++, delta++; if (delta) s[pos-delta] = s[pos]; pos++; } s[pos-delta] = 0; return len-delta; }
false
false
false
false
false
0
isl_morph_ran_params(__isl_take isl_morph *morph) { unsigned n; morph = isl_morph_cow(morph); if (!morph) return NULL; n = isl_basic_set_dim(morph->ran, isl_dim_set); morph = isl_morph_remove_ran_dims(morph, isl_dim_set, 0, n); if (!morph) return NULL; morph->ran = isl_basic_set_params(morph->ran); if (mor...
false
false
false
false
false
0
wb_wip_has_conflict (wb_inode_t *wb_inode, wb_request_t *req) { wb_request_t *each = NULL; if (req->stub->fop != GF_FOP_WRITE) /* non-writes fundamentally never conflict with WIP requests */ return _gf_false; list_for_each_entry (each, &wb_inode->wip, wip) { if (each == req) /* request n...
false
false
false
false
false
0
replace(size_type pos, size_type n, const cxxtools::Char* str, size_type n2) { cxxtools::Char* p; if (n != n2) { size_type l = length(); privreserve(l - n + n2); p = privdata_rw(); traits_type::move(p + pos + n2, p + pos + n, l - pos - n); setLength(l - n + n2); }...
false
false
false
false
false
0
change_mtu (struct net_device *dev, int new_mtu) { struct netdev_private *np = netdev_priv(dev); int max = (np->jumbo) ? MAX_JUMBO : 1536; if ((new_mtu < 68) || (new_mtu > max)) { return -EINVAL; } dev->mtu = new_mtu; return 0; }
false
false
false
false
false
0
init_gpio_ne(struct nvbios_init *init) { struct nvkm_bios *bios = init->bios; struct nvkm_gpio *gpio = bios->subdev.device->gpio; struct dcb_gpio_func func; u8 count = nvbios_rd08(bios, init->offset + 1); u8 idx = 0, ver, len; u16 data, i; trace("GPIO_NE\t"); init->offset += 2; for (i = init->offset; i < ini...
false
false
false
false
false
0
getZip() const { return p->internal ? NULL : p->zip; }
false
false
false
false
false
0
fl_popup_do( FL_POPUP * popup ) { /* Check that the popup exists */ if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_do", "Invalid popup" ); return NULL; } /* We don't interact directly with sub-popups */ if ( popup->parent != NULL ) { M_err( "fl_popup_do"...
false
false
false
false
false
0
group_adjust_blocks(struct super_block *sb, int group_no, struct ext2_group_desc *desc, struct buffer_head *bh, int count) { if (count) { struct ext2_sb_info *sbi = EXT2_SB(sb); unsigned free_blocks; spin_lock(sb_bgl_lock(sbi, group_no)); free_blocks = le16_to_cpu(desc->bg_free_blocks_count); desc->bg_free...
false
false
false
false
false
0
add_to_dominance_info (enum cdi_direction dir, basic_block bb) { unsigned int dir_index = dom_convert_dir_to_idx (dir); gcc_checking_assert (dom_computed[dir_index] && !bb->dom[dir_index]); n_bbs_in_dom_tree[dir_index]++; bb->dom[dir_index] = et_new_tree (bb); if (dom_computed[dir_index] == DOM_OK) do...
false
false
false
false
false
0
iwl_mvm_rm_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct ieee80211_sta *sta) { struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); int ret; lockdep_assert_held(&mvm->mutex); if (vif->type == NL80211_IFTYPE_STATION && ...
false
false
false
false
false
0
H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr, size_t size, const void *buf) { H5FD_sec2_t *file = (H5FD_sec2_t *)_file; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT ...
false
false
false
false
false
0
stonith_send_command(stonith_t * stonith, const char *op, xmlNode * data, xmlNode ** output_data, int call_options, int timeout) { int rc = 0; int reply_id = -1; enum crm_ipc_flags ipc_flags = crm_ipc_client_none; xmlNode *op_msg = NULL; xmlNode *op_reply = NULL; stonith_p...
false
false
false
false
false
0
authnone_marshal(AUTH *client, XDR *xdrs) { register struct authnone_private *ap = authnone_private; if (ap == 0) return (0); return ((*xdrs->x_ops->x_putbytes)(xdrs, ap->marshalled_client, ap->mcnt)); }
false
false
false
false
false
0
evd_connection_flush_and_shutdown (EvdConnection *self, GCancellable *cancellable) { GOutputStream *stream; g_return_if_fail (EVD_IS_CONNECTION (self)); stream = g_io_stream_get_output_stream (G_IO_STREAM (self)); g_object_ref (self); g_output_stream_flush_async (strea...
false
false
false
false
false
0
STREAM_close(STREAM *stream) { int fd; STREAM_release(stream); if (!stream->type) return; fd = STREAM_handle(stream); if (fd >= 0) GB_Watch(fd, GB_WATCH_NONE, NULL, 0); if (stream->common.standard || !(*(stream->type->close))(stream)) stream->type = NULL; #if DEBUG_STREAM _nopen--; fprintf(stderr,...
false
false
false
false
false
0
gf_isom_svc_config_del(GF_ISOFile *the_file, u32 trackNumber, u32 DescriptionIndex) { GF_TrackBox *trak; GF_Err e; GF_MPEGVisualSampleEntryBox *entry; e = CanAccessMovie(the_file, GF_ISOM_OPEN_WRITE); if (e) return e; trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak || !trak->Media || !Descr...
false
false
false
false
false
0
on_msg_get_rsc_providers(lrmd_client_t* client, struct ha_msg* msg) { struct ha_msg* ret = NULL; struct RAExecOps * RAExec = NULL; GList* providers = NULL; GList* provider = NULL; const char* rclass = NULL; const char* rtype = NULL; CHECK_ALLOCATED(client, "client", HA_FAIL); CHECK_ALLOCATED(msg, "message", HA...
false
false
false
true
false
1
jack_controller_patchbay_find_port_by_id( struct jack_controller_patchbay *patchbay_ptr, uint64_t port_id) { struct list_head *node_ptr; struct jack_graph_port *port_ptr; list_for_each(node_ptr, &patchbay_ptr->graph.ports) { port_ptr = list_entry(node_ptr, struct jack_graph_port, siblin...
false
false
false
false
false
0
_eef_inst_func_incdec_reg (eef_addr_t opnd_addr, gchar r, gboolean is_inc) { gint bytes_consumed = 0; gint dx = -1; eef_data_t *rloc; if (is_inc) dx = +1; rloc = eef_loc_of_reg (r); /* if memory loc */ if (!rloc) { /* use from hl pair */ eef_addr_t ta; ta = eef_regpair_get ('H'); _eef_flag_...
false
false
false
false
false
0
gwy_selection_clone_default(GObject *source, GObject *copy) { GwySelection *selection, *clone; gint object_size; g_return_if_fail(GWY_IS_SELECTION(source)); g_return_if_fail(GWY_IS_SELECTION(copy)); /* is-a relation is cheched by gwy_serlizable_clone() */ selection = GWY_SELECTION(source); ...
false
false
false
false
false
0
nvkm_engine_ref(struct nvkm_engine *engine) { if (engine) { mutex_lock(&engine->subdev.mutex); if (++engine->usecount == 1) { int ret = nvkm_subdev_init(&engine->subdev); if (ret) { engine->usecount--; mutex_unlock(&engine->subdev.mutex); return ERR_PTR(ret); } } mutex_unlock(&engine->subd...
false
false
false
false
false
0
gmp_util_load_builder_file (const char *filename, GtkWindow *error_dialog_parent, GError **err) { static GtkWidget *no_glade_dialog = NULL; gchar *path; GtkBuilder *builder; GError *error = NULL; path = g_strconcat ("./", filename, NULL); builder = gtk_builder_new (); /* Try current dir,...
false
false
false
false
false
0
get_cwd(int force) { if (force || G.cwd == NULL) { /* xrealloc_getcwd_or_warn(arg) calls free(arg), * we must not try to free(bb_msg_unknown) */ if (G.cwd == bb_msg_unknown) G.cwd = NULL; G.cwd = xrealloc_getcwd_or_warn((char *)G.cwd); if (!G.cwd) G.cwd = bb_msg_unknown; } return G.cwd; }
false
false
false
false
false
0
should_compare_prop (NMSetting *setting, const char *prop_name, NMSettingCompareFlags comp_flags, GParamFlags prop_flags) { /* Fuzzy compare ignores secrets and properties defined with the FUZZY_IGNORE flag */ if ( (comp_flags & NM_SETTING_COMPARE_FLAG_...
false
false
false
false
false
0
sighup_handler( int signum ) { if( signum ) {} /* keep compiler happy */ if( mutex ) sighup_pending = true; else { const char hb[] = "ed.hup"; sighup_pending = false; if( last_addr() && modified() && write_file( hb, "w", 1, last_addr() ) < 0 ) { char * const s = getenv( "HO...
false
true
false
false
true
1
_try_make_writable_inplace_unix (hb_blob_t *blob) { #if defined(HAVE_SYS_MMAN_H) && defined(HAVE_MPROTECT) uintptr_t pagesize = -1, mask, length; const char *addr; #if defined(HAVE_SYSCONF) && defined(_SC_PAGE_SIZE) pagesize = (uintptr_t) sysconf (_SC_PAGE_SIZE); #elif defined(HAVE_SYSCONF) && defined(_SC_PAGESI...
false
false
false
false
false
0
gabedit_xyplot_set_ticks (GabeditXYPlot *xyplot, gint hmajor, gint hminor, gint vmajor, gint vminor, gint length) { g_return_if_fail (xyplot != NULL); g_return_if_fail (GABEDIT_IS_XYPLOT (xyplot)); xyplot_free_legends(xyplot); xyplot->hmajor_ticks=hmajor; xyplot->hminor_ticks=hminor; xyplot->vmajor_tick...
false
false
false
false
false
0
isl_basic_map_detect_inequality_pairs( __isl_take isl_basic_map *bmap, int *progress) { int duplicate; do { duplicate = 0; bmap = isl_basic_map_remove_duplicate_constraints(bmap, &duplicate, 0); if (progress && duplicate) *progress = 1; } while (duplicate); return bmap; }
false
false
false
false
false
0
grokbitfield (tree declarator, tree declspecs, tree width) { tree value = grokdeclarator (declarator, declspecs, BITFIELD, 0, NULL); if (! value) return NULL_TREE; /* friends went bad. */ /* Pass friendly classes back. */ if (TREE_CODE (value) == VOID_TYPE) return void_type_node; if (TREE_CODE (value...
false
false
false
false
false
0
add_qual(char **buf, size_t *buf_size, const char *prefix, const char *qual, int sanitize_qual) { size_t len; int prefix_len; if (!buf || !*buf || !buf_size || !*buf_size || !qual || !*qual) return; len = snprintf(*buf, *buf_size, "%s%n%s", prefix, &prefix_len, qual); ...
false
false
false
false
false
0
AssertStringFunction( void *theEnv, DATA_OBJECT_PTR returnValue) { DATA_OBJECT argPtr; struct fact *theFact; /*===================================================*/ /* Set the default return value to the symbol FALSE. */ /*===================================================*/ SetpType(returnVa...
false
false
false
false
false
0
tp_proxy_get_factory (gpointer self) { TpProxy *proxy = self; g_return_val_if_fail (TP_IS_PROXY (self), NULL); return proxy->priv->factory; }
false
false
false
false
false
0
check_backup_boot(DOS_FS * fs, struct boot_sector *b, int lss) { struct boot_sector b2; if (!fs->backupboot_start) { printf("There is no backup boot sector.\n"); if (CF_LE_W(b->reserved) < 3) { printf("And there is no space for creating one!\n"); return; } if (interactive) printf("1) Create ...
true
true
false
false
false
1
DestroyIntegerSequencer(GF_Node *n, void *eff, Bool is_destroy) { if (is_destroy) { s32 *st = (s32 *)gf_node_get_private(n); gf_free(st); } }
false
false
false
false
false
0
LoadTransformRotation(FCDObject* object, xmlNode* node) { FCDTRotation* tRotation = (FCDTRotation*)object; const char* content = FUDaeParser::ReadNodeContentDirect(node); FloatList factors; factors.reserve(4); FUStringConversion::ToFloatList(content, factors); if (factors.size() != 4) return false; ...
false
false
false
false
false
0
accept_ssh_client (GIOChannel *channel, GIOCondition cond, gpointer unused) { if (cond == G_IO_IN) gkd_ssh_agent_accept (); return TRUE; }
false
false
false
false
false
0
locate_object_entry(const unsigned char *sha1) { int i; if (!object_ix_hashsz) return NULL; i = locate_object_entry_hash(sha1); if (0 <= i) return &objects[object_ix[i]-1]; return NULL; }
false
false
false
false
false
0
mptsas_set_port(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info, struct sas_port *port) { if (phy_info->port_details) phy_info->port_details->port = port; if (port) { dsaswideprintk(ioc, dev_printk(KERN_DEBUG, &port->dev, MYIOC_s_FMT "add:", ioc->name)); dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "po...
false
false
false
false
false
0
pan_search_by_partial(PanWindow *pw, const gchar *text) { PanItem *pi; GList *list; GList *found; PanItemType type; gchar *buf; type = (pw->size > PAN_IMAGE_SIZE_THUMB_LARGE) ? PAN_ITEM_IMAGE : PAN_ITEM_THUMB; list = pan_item_find_by_path(pw, type, text, TRUE, FALSE); if (!list) list = pan_item_find_by_path(p...
false
false
false
false
false
0
udelln(BW *bw) { P *p = pdup(bw->cursor, USTR "udelln"); p_goto_bol(bw->cursor); pnextl(p); if (bw->cursor->byte == p->byte) { prm(p); return -1; } bdel(bw->cursor, p); prm(p); return 0; }
false
false
false
false
false
0
show(char *level,bool h) { flush() ; if (h) { *this << "[" << level << "] " ; } }
false
false
false
false
false
0
tracker_miner_manager_get_status (TrackerMinerManager *manager, const gchar *miner, gchar **status, gdouble *progress, gint *remain...
false
false
false
false
false
0
cmd_technologies(char *args[], int num, struct connman_option *options) { if (num > 1) return -E2BIG; return __connmanctl_dbus_method_call(connection, "/", "net.connman.Manager", "GetTechnologies", technology_print, NULL, DBUS_TYPE_INVALID); }
false
false
false
false
false
0
input_handler(int rq, void *dev_id) { struct xenkbd_info *info = dev_id; struct xenkbd_page *page = info->page; __u32 cons, prod; prod = page->in_prod; if (prod == page->in_cons) return IRQ_HANDLED; rmb(); /* ensure we see ring contents up to prod */ for (cons = page->in_cons; cons != prod; cons++) { unio...
false
false
false
false
false
0
lpfc_sli4_wait_bmbx_ready(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) { uint32_t db_ready; unsigned long timeout; struct lpfc_register bmbx_reg; timeout = msecs_to_jiffies(lpfc_mbox_tmo_val(phba, mboxq) * 1000) + jiffies; do { bmbx_reg.word0 = readl(phba->sli4_hba.BMBXregaddr); db_ready = bf_get(lpfc_...
false
false
false
false
false
0
gst_exif_writer_write_long_tag (GstExifWriter * writer, guint16 tag, guint32 value) { guint32 offset = 0; if (writer->byte_order == G_LITTLE_ENDIAN) { GST_WRITE_UINT32_LE ((guint8 *) & offset, value); } else { GST_WRITE_UINT32_BE ((guint8 *) & offset, value); } gst_exif_writer_write_tag_header (w...
false
false
false
false
false
0
bofm_en ( struct bofm_device *bofm, struct bofm_en *en ) { uint8_t mac[6]; int rc; /* Retrieve current MAC address */ if ( ( rc = bofm->op->harvest ( bofm, en->mport, mac ) ) != 0 ) { DBG ( "BOFM: " PCI_FMT " mport %d could not harvest: %s\n", PCI_ARGS ( bofm->pci ), en->mport, strerror ( rc ) ); retur...
false
false
false
false
false
0
windows_private_set_subtreepairs(const Repl_Agmt *ra, char **parray) { Dirsync_Private *dp; LDAPDebug0Args( LDAP_DEBUG_TRACE, "=> windows_private_set_subtreepairs\n" ); PR_ASSERT(ra); dp = (Dirsync_Private *) agmt_get_priv(ra); PR_ASSERT (dp); free_subtree_pairs(&(dp->subtree_pairs)); dp->subtree_pairs = cre...
false
false
false
false
false
0
_e_shelf_cb_hide_animator_timer(void *data) { E_Shelf *es; es = data; if (!es->hide_animator) es->hide_animator = ecore_animator_add(_e_shelf_cb_hide_animator, es); es->hide_timer = NULL; return ECORE_CALLBACK_CANCEL; }
false
false
false
false
false
0
client3_1_symlink (call_frame_t *frame, xlator_t *this, void *data) { clnt_local_t *local = NULL; clnt_conf_t *conf = NULL; clnt_args_t *args = NULL; gfs3_symlink_req req = {{0,},}; size_t dict_len = 0; int ...
false
false
false
true
false
1
rabtest0(x,n,u,aux) word2 *x, *aux; unsigned u; int n; { word2 *base, *ex, *y, *x1, *hilf; int exlen, ylen, n1; int i, t; base = aux; y = aux + n; x1 = y + 2*n; ex = x1 + n; hilf = ex + n; base[0] = u; cpyarr(x,n,x1); n1 = decarr(x1,n,1); cpyarr(x1,n1,ex); exlen = n...
false
false
false
false
false
0
load_ramdisk_compressed(const char *devpath, FILE * wfd, off_t ramdisk_start) { int rfd = -1; unsigned long long ramdisk_size, ramdisk_left; int disk = 1; ssize_t bytes; int rv; unsigned char in_buf[BUF_SZ], out_buf[BUF_SZ]; z_stream zs; zs.zalloc = Z_NULL; /* Use malloc() */ zs.zfree = Z_NULL; /* Use ...
false
false
false
false
false
0
Spbicubic(double x, double y, double coeffs[16], double df[2]) { double f,xn,yn,xn1,yn1,c; int i,j; f = 0.0; df[0] = 0.0; df[1] = 0.0; xn = 1.0; for (i = 0; i < 4; i++) { yn = 1.0; for (j = 0; j < 4; j++) { c = coeffs[i*4+j]; f += c*xn*yn; if (i > ...
false
false
false
false
false
0
ocfs2_alloc_write_ctxt(struct ocfs2_write_ctxt **wcp, struct ocfs2_super *osb, loff_t pos, unsigned len, struct buffer_head *di_bh) { u32 cend; struct ocfs2_write_ctxt *wc; wc = kzalloc(sizeof(struct ocfs2_write_ctxt), GFP_NOFS); if (!wc) return -ENOMEM; wc->w_cpos = pos >> osb->s_clustersize_bits;...
false
false
false
false
false
0
test_diff_workdir__untracked_directory_comes_last(void) { git_diff_options opts = GIT_DIFF_OPTIONS_INIT; git_diff_list *diff = NULL; g_repo = cl_git_sandbox_init("renames"); cl_git_mkfile("renames/.gitignore", "*.ign\n"); cl_git_pass(p_mkdir("renames/zzz_untracked", 0777)); cl_git_mkfile("renames/zzz_untracked/...
false
false
false
false
false
0
BinlogUpdateAttributes ( const char * sIndexName, int64_t iTID, const CSphAttrUpdate & tUpd ) { if ( m_bReplayMode || m_bDisabled ) return; MEMORY ( SPH_MEM_BINLOG ); Verify ( m_tWriteLock.Lock() ); const int64_t tmNow = sphMicroTimer(); const int uIndex = GetWriteIndexID ( sIndexName, iTID, tmNow ); // head...
false
false
false
false
false
0
udisks_daemon_launch_threaded_job (UDisksDaemon *daemon, UDisksObject *object, const gchar *job_operation, uid_t job_started_by_uid, UDisksThreadedJobFunc...
false
false
false
false
false
0
conn_start_shutdown(struct mrpc_connection *conn, enum mrpc_disc_reason reason) { int done; done=conn->sequence_flags & SEQ_SHUT_STARTED; conn->sequence_flags |= SEQ_SHUT_STARTED; if (!done) conn->disc_reason=reason; }
false
false
false
false
false
0
__env_print_thread(env) ENV *env; { BH *bhp; DB_ENV *dbenv; DB_HASHTAB *htab; DB_LOCKER *locker; DB_MPOOL *dbmp; DB_THREAD_INFO *ip; PIN_LIST *list, *lp; REGENV *renv; REGINFO *infop; THREAD_INFO *thread; u_int32_t i; char buf[DB_THREADID_STRLEN]; dbenv = env->dbenv; /* The thread table may not be conf...
false
false
false
false
false
0
os_pathconf_path_max(char *path) { long result; result = 1024; #ifdef HAVE_PATHCONF result = pathconf_wrapper(path, _PC_PATH_MAX, result); if (result < 0) { sub_context_ty *scp; scp = sub_context_new(); sub_errno_set(scp); sub_var_set_charstar(scp, "File...
false
false
false
false
false
0
parse_data(char *data, enum ast_presence_state *state, char **subtype, char **message, char **options) { char *state_str; /* data syntax is state,subtype,message,options */ *subtype = ""; *message = ""; *options = ""; state_str = strsep(&data, ","); if (ast_strlen_zero(state_str)) { return -1; /* state is re...
false
false
false
false
false
0
rollback_packet(struct kernel_queue *kq) { BUG_ON(!kq); kq->pending_wptr = *kq->queue->properties.write_ptr; }
false
false
false
false
false
0
gsl_histogram2d_equal_bins_p (const gsl_histogram2d * h1, const gsl_histogram2d * h2) { if ((h1->nx != h2->nx) || (h1->ny != h2->ny)) { return 0; } { size_t i; /* init ranges */ for (i = 0; i <= (h1->nx); i++) { if (h1->xrange[i] != h2->xrange[i...
false
false
false
false
false
0
getMRPTLicense() { if (!sLicenseTextReady) { // Automatically update the last year of the copyright to the compilation date: time_t rawtime; struct tm * timeinfo; time (&rawtime); timeinfo = localtime (&rawtime); char buf[1024]; ::strftime(buf,sizeof(buf),sLicenseTextF,timeinfo); sLicenseText = std::...
false
false
false
false
false
0
nhml_node_end(void *sax_cbck, const char *node_name, const char *name_space) { XMLBreaker *breaker = (XMLBreaker *)sax_cbck; char *node_id = (char *)gf_list_last(breaker->id_stack); gf_list_rem_last(breaker->id_stack); if (breaker->from_is_end && breaker->from_id && !strcmp(breaker->from_id, node_id)) { breaker->...
false
false
false
false
false
0
city_activated_callback(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *col, gpointer data) { GtkTreeModel *model; GtkTreeIter iter; GdkModifierType mask; model = gtk_tree_view_get_model(view); if (!gtk_tree_model_get_iter(model, &iter, path)) { return; } gdk_window_get_pointer(NUL...
false
false
false
false
false
0
operator= (const Matrix &A) { if(!isPEmpty ) (*this).del(); (*this).create(A.getRow() , A.getCol() , Empty ); int j=0; while( j != (*this).getRow() ) { int i=0; while( i != (*this).getCol() ) { (*this)(j,i)=A(j,i); ++i; } ++j; } /* mat=A.mat; isP...
false
false
false
false
false
0
Adobe_magic_loop_50(byte digest[16], int key_length) { gs_md5_state_t md5; int i; for (i = 0; i < 50; i++) { gs_md5_init(&md5); gs_md5_append(&md5, digest, key_length); gs_md5_finish(&md5, digest); } }
false
false
false
false
false
0
icmp_input(int fd, const void* input, const void* payload, int len) { const struct iphdr* iphdr = static_cast<const struct iphdr*>(input); const struct icmphdr* icmphdr = static_cast<const struct icmphdr*>(payload); // const int icmphdr_size = sizeof(*icmphdr); const int iphdr_len = iphdr->ihl*4; if (icmphdr...
false
false
false
false
false
0
shift_colors (uint8_t * dptr, uint8_t * sptr, unsigned w, unsigned dpi, unsigned pid, unsigned c, int * colshft, unsigned strshft) { unsigned i, sr, sg, sb, st; UNUSED(dpi); UNUSED(pid); sr = colshft[0]; sg = colshft[1]; sb = colshft[2]; /* PDBG (pixma_dbg (4, "*shift_colors***** c=%u, w=%i...
false
false
false
false
false
0
gst_rtsp_media_unprepare (GstRTSPMedia * media) { GstRTSPMediaClass *klass; gboolean success; if (media->status == GST_RTSP_MEDIA_STATUS_UNPREPARED) return TRUE; GST_INFO ("unprepare media %p", media); media->target_state = GST_STATE_NULL; klass = GST_RTSP_MEDIA_GET_CLASS (media); if (klass->unprep...
false
false
false
false
false
0
FtPpem_PtYChanged(GGadget *g, GEvent *e) { if ( e->type==et_controlevent && e->u.control.subtype == et_textchanged ) { FtSizeData *fsd = GDrawGetUserData(GGadgetGetWindow(g)); if ( GGadgetIsChecked(GWidgetGetControl(fsd->gw,CID_SameAs))) { const unichar_t *y = _GGadgetGetTitle(g); GGadgetSetTitle(GWidge...
false
false
false
false
false
0
PNMInteger(Image *image,const unsigned int base) { char *comment; int c; register char *p; size_t extent; unsigned int value; /* Skip any leading whitespace. */ extent=MaxTextExtent; comment=(char *) NULL; p=comment; do { c=ReadBlobByte(image); if (c == EOF) ...
false
false
false
false
false
0