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
gst_deinterlace_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) { gboolean res = TRUE; GstDeinterlace *self = GST_DEINTERLACE (parent); GST_LOG_OBJECT (pad, "received %s event: %" GST_PTR_FORMAT, GST_EVENT_TYPE_NAME (event), event); switch (GST_EVENT_TYPE (event)) { case GST_EVENT_CA...
false
false
false
false
false
0
readItem(DcmItem &dataset, const char *moduleName) { /* read BasicCodedEntryAttributes only */ OFCondition result = DSRTypes::getAndCheckStringValueFromDataset(dataset, DCM_CodeValue, CodeValue, "1", "1", moduleName); if (result.good()) result = DSRTypes::get...
false
false
false
false
false
0
c_parser_peek_token (c_parser *parser) { if (parser->tokens_avail == 0) { c_lex_one_token (parser, &parser->tokens[0]); parser->tokens_avail = 1; } return &parser->tokens[0]; }
false
false
false
false
false
0
getOpcodeAfterMemoryUnfold(unsigned Opc, bool UnfoldLoad, bool UnfoldStore, unsigned *LoadRegIndex) const { DenseMap<unsigned, std::pair<unsigned,unsigned> >::const_iterator I = MemOp2RegOpTable.find(Opc); if (I == MemOp2RegOpTable.end(...
false
false
false
false
false
0
tsf_write_file(struct b43legacy_wldev *dev, const char *buf, size_t count) { u64 tsf; if (sscanf(buf, "%llu", (unsigned long long *)(&tsf)) != 1) return -EINVAL; b43legacy_tsf_write(dev, tsf); return 0; }
false
false
false
false
false
0
config_order_namespace_table(void) { int i = 0; int error = 0; pthread_rwlock_wrlock(&cg_mount_table_lock); /* * Set everything to NULL */ for (i = 0; i < CG_CONTROLLER_MAX; i++) cg_namespace_table[i] = NULL; memset(cg_namespace_table, 0, CG_CONTROLLER_MAX * sizeof(cg_namespace_table[0])); /* * Now...
false
false
false
false
false
0
load_ihdr (int size, SFData * sf, FILE * fd) { int i, i2; SFInst *p, *pr = NULL; /* ptr to current & previous instrument */ unsigned short zndx, pzndx = 0; if (size % SFIHDRSIZE || size == 0) /* chunk size is valid? */ return (gerr (ErrCorr, _("Instrument header has invalid size"))); size = size / SFIHDRSIZE -...
false
false
false
false
false
0
paint_curtain () { if (cr) { cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); cairo_set_source_surface (cr, scaled_surface, 0, 0); cairo_rectangle (cr, min_x, min_y, max_x, max_y); cairo_fill (cr); cairo_stroke (cr); } paint_cross (); }
false
false
false
false
false
0
se_response_cb (GtkWidget *widget, int response, gpointer data) { switch (response) { case GTK_RESPONSE_REJECT: gtk_list_store_clear (GTK_LIST_STORE (se_error_store)); break; default: gtk_widget_hide (se_window); } }
false
false
false
false
false
0
kcmss_remove_cred(krb5_context context, krb5_ccache id, krb5_flags which, krb5_creds *cred) { krb5_error_code ret; kcm_ccache c = KCMCACHE(id); KCM_ASSERT_VALID(c); ret = kcm_ccache_remove_cred_internal(context, c, which, cred); return ret; }
false
false
false
false
false
0
findReplace(bool& bDoneEntireDocument) { UT_ASSERT(m_sFind && m_sReplace); UT_uint32* pPrefix = _computeFindPrefix(m_sFind); bool bRes = _findReplace(pPrefix, bDoneEntireDocument, false /* do update */); FREEP(pPrefix); updateScreen(); if (isSelectionEmpty()) { _updateInsertionPoint(); } else { _ensure...
false
false
false
false
false
0
__column_data_func_enabled(GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { gmpcPluginParent *plug; gtk_tree_model_get(GTK_TREE_MODEL(model), iter, 0, &plug, -1); if(plug) { gboolean active = gmpc_plugin_get_en...
false
false
false
false
false
0
get_current_iv (gcry_cipher_hd_t hd, void *buffer, size_t buflen) { unsigned char tmp[17]; if (gcry_cipher_ctl (hd, PRIV_CTL_GET_INPUT_VECTOR, tmp, sizeof tmp)) die ("error getting current input vector\n"); if (buflen > *tmp) die ("buffer too short to store the current input vector\n"); memcpy (buffer,...
true
true
false
false
false
1
EnterRow(Tcl_Interp *interp, Ns_Set *row, int flags, int *statusPtr) { if (row == NULL) { *statusPtr = NS_ERROR; } else { Ns_TclEnterSet(interp, row, flags); *statusPtr = NS_OK; } }
false
false
false
false
false
0
bam_copy1(bam1_t *bdst, const bam1_t *bsrc) { uint8_t *data = bdst->data; int m_data = bdst->m_data; // backup data and m_data if (m_data < bsrc->l_data) { // double the capacity m_data = bsrc->l_data; kroundup32(m_data); data = (uint8_t*)realloc(data, m_data); } memcpy(data, bsrc->data, bsrc->l_data); // co...
false
false
false
false
false
0
ath9k_hw_get_channel_centers(struct ath_hw *ah, struct ath9k_channel *chan, struct chan_centers *centers) { int8_t extoff; if (!IS_CHAN_HT40(chan)) { centers->ctl_center = centers->ext_center = centers->synth_center = chan->channel; return; } if (IS_CHAN_HT40PLUS(chan)) { centers->synth_cente...
false
false
false
false
false
0
_dl_check_caller (const void *caller, enum allowmask mask) { static const char expected1[] = LIBC_SO; static const char expected2[] = LIBDL_SO; #ifdef LIBPTHREAD_SO static const char expected3[] = LIBPTHREAD_SO; #endif static const char expected4[] = LD_SO; for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns) for ...
false
false
false
false
false
0
Value() const { if (IsDeadCheck("v8::External::Value()")) return 0; i::Handle<i::Object> obj = Utils::OpenHandle(this); return ExternalValueImpl(obj); }
false
false
false
false
false
0
hatsuda_wall_triangle_draw(tenm_object *my, int priority) { int status = 0; tenm_color color; double size; /* sanity check */ if (my == NULL) { fprintf(stderr, "hatsuda_wall_triangle_draw: my is NULL\n"); return 0; } if (priority != 0) return 0; /* body */ color = tenm_map_color(95, 1...
false
false
false
false
false
0
DoMonolingualSRLExtraction (const string& sent, const std::vector<SRLInformation>& srl, int contextLen) { this->srl_ = &srl; SentencePair * p; this->sent_ = p = new SentencePair(); vector<string> res; split(res,sent,is_any_of(" \t"), token_compress_on); p->french_.words_ = res; list<string> ret...
false
false
false
false
false
0
IsStopChar(char ch) { return ch && strchr(stopChars, ch); }
false
false
false
false
false
0
XORblock(const char *src1, const char *src2, char *dst, size_t n) { size_t j; for(j = 0; j < n; ++j) dst[j] = src1[j] ^ src2[j]; }
false
false
false
false
false
0
atk_component_interface_init (AtkComponentIface *iface) { g_return_if_fail (iface != NULL); iface->get_extents = component_interface_get_extents; iface->grab_focus = component_interface_grab_focus; }
false
false
false
false
false
0
max_ar_lag (Forecast *fc, const MODEL *pmod, int p) { int i, pmax = p; /* explicit AR order */ if (fc->dvlags != NULL) { for (i=0; i<pmod->ncoeff; i++) { if (fc->dvlags[i] > pmax) { pmax = fc->dvlags[i]; } } } return pmax; }
false
false
false
false
false
0
asn1_code_length(size_t length, chunk_t *code) { if (length < 128) { code->ptr[0] = length; code->len = 1; } else if (length < 256) { code->ptr[0] = 0x81; code->ptr[1] = (u_char) length; code->len = 2; } else if (length < 65536) { code->ptr[0] = 0x82; code->ptr[1] = length >> 8; code->ptr[2] = l...
false
false
false
false
false
0
buffindexed_open(int mode) { char *groupfn; struct stat sb; int i, flag = 0; static int uninitialized = 1; ULONG on, off; if (uninitialized) { on = 1; off = on; off ^= ULONG_MAX; for (i = (longsize * 8) - 1; i >= 0; i--) { onarray[i] = on; offarray[i] = off; on <<= 1; ...
false
false
false
false
false
0
datetime_isoformat(PyDateTime_DateTime *self, PyObject *args, PyObject *kw) { int sep = 'T'; static char *keywords[] = {"sep", NULL}; char buffer[100]; PyObject *result; int us = DATE_GET_MICROSECOND(self); if (!PyArg_ParseTupleAndKeywords(args, kw, "|C:isoformat", keywords, &sep)) retu...
false
false
false
false
false
0
new_apol_policy_path_t__SWIG_0(apol_policy_path_type_e type,char *primary,apol_string_vector_t *modules){ apol_policy_path_t *p; BEGIN_EXCEPTION if ((p = apol_policy_path_create(type, primary, (apol_vector_t*)modules)) == NULL) { {SWIG_JavaException(local_jenv, SWIG_MemoryError, "Out of memory"); goto fail;}; ...
false
false
false
false
false
0
deleteMutex(LOG4CPLUS_MUTEX_PTR_DECLARE m) { #if defined(LOG4CPLUS_USE_PTHREADS) ::pthread_mutex_destroy(m); #elif defined(LOG4CPLUS_USE_WIN32_THREADS) ::DeleteCriticalSection(m); #endif delete m; }
false
false
false
false
false
0
purge(struct mailbox *mp, struct message *m, long mc, struct cw *cw, const char *name) { unsigned long *contents; long i, j, contentelem; if (chdir(name) < 0) return; contents = builds(&contentelem); if (contents) { i = j = 0; while (j < contentelem) { if (i < mc && m[i].m_uid == contents[j]) { i++...
false
false
false
false
false
0
tick_broadcast_control(enum tick_broadcast_mode mode) { struct clock_event_device *bc, *dev; struct tick_device *td; int cpu, bc_stopped; td = this_cpu_ptr(&tick_cpu_device); dev = td->evtdev; /* * Is the device not affected by the powerstate ? */ if (!dev || !(dev->features & CLOCK_EVT_FEAT_C3STOP)) ret...
false
false
false
false
false
0
gf_w4_table_init(gf_t *gf) { int rt; gf_internal_t *h; int issse3 = 0; #ifdef INTEL_SSSE3 issse3 = 1; #endif h = (gf_internal_t *) gf->scratch; rt = (h->region_type); if (h->mult_type == GF_MULT_DEFAULT && !issse3) rt |= GF_REGION_DOUBLE_TABLE; if (rt & GF_REGION_DOUBLE_TABLE) { return gf_w4_dou...
false
false
false
false
false
0
GetFileStatusString() const { uint8 nFileStatus = FileStatus(); if ((nFileStatus == PS_HASHING) || (nFileStatus == PS_WAITINGFORHASH)) { return _("Hashing"); } else { switch (nFileStatus) { case PS_COMPLETING: ret...
false
false
false
false
false
0
find ( Time_sensitive *obj ) { if(data.size()==0) return 0; for(Temporal_sequence::iterator it=data.begin(); it!=data.end(); ++it) { if(it->handler==obj) return 1; } return 0; }
false
false
false
false
false
0
__ecerePropertySelfWatcher_1_master(struct __ecereNameSpace__ecere__com__Instance * this) { struct __ecereNameSpace__eda__TableEditor * __ecerePointer___ecereNameSpace__eda__TableEditor = (struct __ecereNameSpace__eda__TableEditor *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__eda__TableEditor->offset) : 0)...
false
false
false
false
false
0
CreateLayer( const char * pszLayerName, OGRSpatialReference *poSRS, OGRwkbGeometryType eType, char ** papszOptions ) { if (poGPXDS) return poGPXDS...
false
false
false
false
false
0
jp2_write_bpcc( opj_jp2_t *jp2, unsigned int * p_nb_bytes_written ) { unsigned int i; /* room for 8 bytes for box and 1 byte for each component */ int l_bpcc_size = 8 + jp2->numcomps; unsigned char * l_bpcc_data,* l_current_bpcc_ptr; // preconditions assert(jp...
false
false
false
false
false
0
pygi_source_scanner_parse_file (PyGISourceScanner *self, PyObject *args) { int fd; FILE *fp; if (!PyArg_ParseTuple (args, "i:SourceScanner.parse_file", &fd)) return NULL; #ifdef _WIN32 /* The file descriptor passed to us is from the C library Python * uses. That is msvcr71.dll for Python 2...
false
false
false
false
false
0
gck_object_set_finish (GckObject *self, GAsyncResult *result, GError **error) { SetAttributes *args; g_return_val_if_fail (GCK_IS_OBJECT (self), FALSE); g_return_val_if_fail (GCK_IS_CALL (result), FALSE); g_return_val_if_fail (!error || !*error, FALSE); /* Unlock the attributes we were using */ args = _gck_call...
false
false
false
false
false
0
cavan_window_find_by_point(struct double_link *link, struct cavan_input_message_point *point) { struct double_link_node *node; struct cavan_window *win, *child; node = double_link_find(link, point, cavan_window_find_by_point_matcher); if (node == NULL) { return NULL; } win = double_link_get_container(link, n...
false
false
false
false
false
0
btrfs_read_roots(struct btrfs_fs_info *fs_info, struct btrfs_root *tree_root) { struct btrfs_root *root; struct btrfs_key location; int ret; location.objectid = BTRFS_EXTENT_TREE_OBJECTID; location.type = BTRFS_ROOT_ITEM_KEY; location.offset = 0; root = btrfs_read_tree_root(tree_root, &location); if (I...
false
false
false
false
false
0
ext2fs_get_generic_bmap_range(ext2fs_generic_bitmap bmap, __u64 start, unsigned int num, void *out) { if (!bmap) return EINVAL; if (EXT2FS_IS_32_BITMAP(bmap)) { if ((start+num-1) & ~0xffffffffULL) { ext2fs_warn_bitmap2(bmap, EXT2FS_UNMARK_ERROR, 0xffffffff); return EINVAL; } return e...
false
false
false
false
false
0
yygrowstack(void) #else static int yygrowstack() #endif { int newsize, i; short *newss; YYSTYPE *newvs; if ((newsize = yystacksize) == 0) newsize = YYINITSTACKSIZE; else if (newsize >= YYMAXDEPTH) return -1; else if ((newsize *= 2) > YYMAXDEPTH) newsize = YYMAXDEPTH; ...
false
false
false
false
false
0
check_format_type(const char *ptr, int type) { int quad = 0; if (*ptr == '\0') { /* Missing format string; bad */ return -1; } switch (type) { case FILE_FMT_QUAD: quad = 1; /*FALLTHROUGH*/ case FILE_FMT_NUM: if (*ptr == '-') ptr++; if (*ptr == '.') ptr++; while (isdigit((unsigned char)*ptr)) ...
false
false
false
false
false
0
brcmf_fws_flow_control_check(struct brcmf_fws_info *fws, struct pktq *pq, u8 if_id) { struct brcmf_if *ifp = brcmf_get_ifp(fws->drvr, if_id); if (WARN_ON(!ifp)) return; if ((ifp->netif_stop & BRCMF_NETIF_STOP_REASON_FWS_FC) && pq->len <= BRCMF_FWS_FLOWCONTROL_LOWATER) brcmf_txflowblock_if(ifp, ...
false
false
false
false
false
0
ahd_unpause(struct ahd_softc *ahd) { /* * Automatically restore our modes to those saved * prior to the first change of the mode. */ if (ahd->saved_src_mode != AHD_MODE_UNKNOWN && ahd->saved_dst_mode != AHD_MODE_UNKNOWN) { if ((ahd->flags & AHD_UPDATE_PEND_CMDS) != 0) ahd_reset_cmds_pending(ahd); ahd_s...
false
false
false
false
false
0
before_each_mark(__isl_keep isl_id *mark, __isl_keep isl_ast_build *build) { if (!build) return -1; if (!build->before_each_mark) return 0; return build->before_each_mark(mark, build, build->before_each_mark_user); }
false
false
false
false
false
0
dce_v11_0_is_display_hung(struct amdgpu_device *adev) { u32 crtc_hung = 0; u32 crtc_status[6]; u32 i, j, tmp; for (i = 0; i < adev->mode_info.num_crtc; i++) { tmp = RREG32(mmCRTC_CONTROL + crtc_offsets[i]); if (REG_GET_FIELD(tmp, CRTC_CONTROL, CRTC_MASTER_EN)) { crtc_status[i] = RREG32(mmCRTC_STATUS_HV_COUN...
false
false
false
false
false
0
compare_dir_entries(const void *p1, const void *p2) { const struct de *a = (const struct de *) p1, *b = (const struct de *) p2; const char *query_string = a->conn->request_info.query_string; int cmp_result = 0; if (query_string == NULL) { query_string = "na"; } if (a->st.is_directory && !b->st.is_dire...
false
false
false
false
false
0
glusterd_op_bricks_select (glusterd_op_t op, dict_t *dict, char **op_errstr, struct list_head *selected) { int ret = 0; GF_ASSERT (dict); GF_ASSERT (op_errstr); GF_ASSERT (op > GD_OP_NONE); GF_ASSERT (op < GD_OP_MAX); switch (op) { ...
false
false
false
false
false
0
np_ubyte(char *p, PyObject *v, const formatdef *f) { long x; if (get_long(v, &x) < 0) return -1; if (x < 0 || x > 255){ PyErr_SetString(StructError, "ubyte format requires 0 <= number <= 255"); return -1; } *p = (char)x; return 0; }
false
false
false
false
false
0
SECKEY_SignatureLen(const SECKEYPublicKey *pubk) { unsigned char b0; unsigned size; switch (pubk->keyType) { case rsaKey: b0 = pubk->u.rsa.modulus.data[0]; return b0 ? pubk->u.rsa.modulus.len : pubk->u.rsa.modulus.len - 1; case dsaKey: return pubk->u.dsa.params.subPrime.len * 2; case...
false
false
false
false
false
0
_string_list_contains (string_list_t *list, const char *member, int *index) { string_node_t *node; int i; if (list == NULL) return 0; for (i = 0, node = list->head; node; i++, node = node->next) { if (strcmp (node->str, member) == 0) { if (index) *index = i; return 1; } } return 0; }
false
false
false
false
false
0
Clp_NewParser(int argc, const char * const *argv, int nopt, const Clp_Option *opt) { Clp_Parser *clp = (Clp_Parser *)malloc(sizeof(Clp_Parser)); Clp_Internal *cli = (Clp_Internal *)malloc(sizeof(Clp_Internal)); Clp_InternOption *iopt = (Clp_InternOption *)malloc(sizeof(Clp_InternOption) * nopt); if (cli...
false
true
false
false
false
1
_sfpopen(reg Sfio_t * f, int fd, int pid, int stdio) #else int _sfpopen(f, fd, pid, stdio) reg Sfio_t *f; int fd; int pid; int stdio; /* stdio popen() does not reset SIGPIPE handler */ #endif { reg Sfproc_t *p; if (f->proc) return 0; if (!(p = f->proc = (Sfproc_t *) malloc(sizeof(Sfproc_t)))) return -...
false
false
false
false
false
0
s_opjd_accumulate_input(stream_jpxd_state *state, stream_cursor_read * pr) { long in_size = pr->limit - pr->ptr; /* grow the input buffer if needed */ if (state->inbuf_size < state->inbuf_fill + in_size) { unsigned char *new_buf; unsigned long new_size = state->inbuf_size==0 ? in_size ...
false
false
false
false
false
0
twist (uint64_t mask) { while ( (1<<height) <= mask ) extend_range(); twist_mask = mask; }
false
false
false
false
false
0
gkrellm_set_piximage_border(GkrellmPiximage *piximage, GkrellmBorder *border) { GkrellmBorder *b; if (!piximage || !piximage->pixbuf) return; b = &piximage->border; *b = *border; if (b->left < 0) b->left = 0; if (b->right < 0) b->right = 0; if (b->top < 0) b->top = 0; if (b->bottom < 0) b->bottom = ...
false
false
false
false
false
0
rds_decode_a(struct rds_private_state *priv_state, struct v4l2_rds_data *rds_data) { struct v4l2_rds *handle = &priv_state->handle; uint32_t updated_fields = 0; uint16_t pi = (rds_data->msb << 8) | rds_data->lsb; /* data in RDS group is uninterpreted */ priv_state->rds_group.pi = pi; /* compare PI values to det...
false
false
false
false
false
0
nvdimm_bus_unregister(struct nvdimm_bus *nvdimm_bus) { if (!nvdimm_bus) return; mutex_lock(&nvdimm_bus_list_mutex); list_del_init(&nvdimm_bus->list); mutex_unlock(&nvdimm_bus_list_mutex); nd_synchronize(); device_for_each_child(&nvdimm_bus->dev, NULL, child_unregister); nvdimm_bus_destroy_ndctl(nvdimm_bus); ...
false
false
false
false
false
0
LI12__LOOP_NOTE_MINIMAX_OPERATION__loop(V54,V55) object V54;register object V55; { VMB11 VMS11 VMV11 goto TTL; TTL:; {object V58; base[0]= V54; base[1]= STREF(object,V55,32); vs_top=(vs_base=base+0)+2; Ladjoin(); vs_top=sup; V58= vs_base[0]; V59= Ct; STSET(object,V55,32, (V58)); (void)((V58));} if((CMPcdr...
false
false
false
false
false
0
toggle_firm_link(int linkId, int toggleFlag, char remoteAction, int setBoth) { if( !remoteAction && remote.is_enable() ) { // packet structure : <firm recno> <link Id> <toggle Flag> short *shortPtr = (short *)remote.new_send_queue_msg(MSG_FIRM_TOGGLE_LINK_FIRM, 3*sizeof(short)); shortPtr[0] = firm_recno; shor...
false
false
false
false
false
0
Init(const char* regex) { pattern_ = posix::StrDup(regex); // Reserves enough bytes to hold the regular expression used for a // full match. const size_t full_regex_len = strlen(regex) + 10; char* const full_pattern = new char[full_regex_len]; snprintf(full_pattern, full_regex_len, "^(%s)$", regex); is_...
false
false
false
false
false
0
glarea_reshape (GtkWidget* widget, GdkEventConfigure* event) { int w = widget->allocation.width; int h = widget->allocation.height; if (gtk_gl_area_make_current (GTK_GL_AREA(widget))) { glViewport (0, 0, w, h); glMatrixMode (GL_PROJECTION); glLoadIdentity (); gluOrtho2D (-(w>>1), (w>>1), -(h>>1...
false
false
false
false
false
0
GetLastChild(int lineParent, int level, int lastLine) { if (level == -1) level = GetLevel(lineParent) & SC_FOLDLEVELNUMBERMASK; int maxLine = LinesTotal(); int lookLastLine = (lastLine != -1) ? Platform::Minimum(LinesTotal() - 1, lastLine) : -1; int lineMaxSubord = lineParent; while (lineMaxSubord < maxLine - 1)...
false
false
false
false
false
0
run_queue(struct queue *queue) { struct qitem *it; if (LIST_EMPTY(&queue->queue)) return; it = go_background(queue); deliver(it); /* NOTREACHED */ }
false
false
false
false
false
0
User_moveaccounts_into_newhome(userrec *u, char *nick) /* * Update: Move accounts matching the nick 'nick' from the Luser record * to 'u'. Hostmasks which match other registered hostmasks in this acct * get their registered bit marked. */ { acctrec *a, *a_next; /* Update User MUST be registered, and not the lus...
false
false
false
false
false
0
infd_session_proxy_synchronization_failed_cb_before(InfSession* session, InfXmlConnection* conn, const GError* error, gpointer user_data) { InfdSessionProxy* prox...
false
false
false
false
false
0
__pyx_f_7sklearn_12linear_model_8sgd_fast_add(double *__pyx_v_w_data_ptr, double __pyx_v_wscale, double *__pyx_v_X_data_ptr, unsigned int __pyx_v_offset, unsigned int __pyx_v_n_features, double __pyx_v_c) { unsigned int __pyx_v_j; double __pyx_v_val; double __pyx_v_innerprod; double __pyx_v_xsqnorm; double __...
false
false
false
false
false
0
do_list(void) { ListIterator itr = NULL; ListIterator itr_step = NULL; slurmdb_job_rec_t *job = NULL; slurmdb_step_rec_t *step = NULL; if (!jobs) return; itr = list_iterator_create(jobs); while((job = list_next(itr))) { if (list_count(job->steps)) { int cnt = list_count(job->steps); job->stats.cpu_av...
false
false
false
false
false
0
free_label(textlabel_t * p) { if (p) { free(p->text); if (p->html) { if (p->u.html) free_html_label(p->u.html, 1); } else { free_textspan(p->u.txt.span, p->u.txt.nspans); } free(p); } }
false
false
false
false
false
0
AdvanceOneStep() { itkDebugMacro("AdvanceOneStep"); this->ModifyGradientByScales(); if ( this->m_CurrentIteration == 0 ) { this->EstimateLearningRate(); } InternalComputationValueType gamma = itk::NumericTraits< InternalComputationValueType >::Zero; InternalComputationValueType gammaDenom = inne...
false
false
false
false
false
0
mcp794xx_set_alarm(struct device *dev, struct rtc_wkalrm *t) { struct i2c_client *client = to_i2c_client(dev); struct ds1307 *ds1307 = i2c_get_clientdata(client); unsigned char *regs = ds1307->regs; int ret; if (!test_bit(HAS_ALARM, &ds1307->flags)) return -EINVAL; dev_dbg(dev, "%s, sec=%d min=%d hour=%d wday...
false
false
false
false
false
0
gdata_buffer_free (GDataBuffer *self) { GDataBufferChunk *chunk, *next_chunk; g_return_if_fail (self != NULL); for (chunk = self->head; chunk != NULL; chunk = next_chunk) { next_chunk = chunk->next; g_free (chunk); } g_cond_clear (&(self->cond)); g_mutex_clear (&(self->mutex)); g_slice_free (GDataBuffer,...
false
false
false
false
false
0
mcp320x_channel_to_tx_data(int device_index, const unsigned int channel, bool differential) { int start_bit = 1; switch (device_index) { case mcp3001: case mcp3201: case mcp3301: return 0; case mcp3002: case mcp3202: return ((start_bit << 4) | (!differential << 3) | (channel << 2)); case mcp3004:...
false
false
false
false
false
0
get_default_username (void) { const char *user; user = getenv ("USER"); if (user == NULL) user = getenv ("LOGNAME"); if (user == NULL) user = getenv ("USERNAME"); #if defined(HAVE_GETLOGIN) && !defined(POSIX_GETLOGIN) if (user == NULL) { user = (const char *)getlogin (); if (user != NULL) ...
false
false
false
false
false
0
gkm_data_der_read_basic_constraints (GBytes *data, gboolean *is_ca, gint *path_len) { GkmDataResult ret = GKM_DATA_UNRECOGNIZED; GNode *asn = NULL; GNode *node; gulong value; asn = egg_asn1x_create_and_decode (pkix_asn1_tab, "BasicConstrain...
false
false
false
false
false
0
S_ptr_table_find(PTR_TBL_t *const tbl, const void *const sv) { PTR_TBL_ENT_t *tblent; const UV hash = PTR_TABLE_HASH(sv); PERL_ARGS_ASSERT_PTR_TABLE_FIND; tblent = tbl->tbl_ary[hash & tbl->tbl_max]; for (; tblent; tblent = tblent->next) { if (tblent->oldval == sv) return tblent; } re...
false
false
false
false
false
0
ladish_graph_emit_port_appeared(struct ladish_graph * graph_ptr, struct ladish_graph_port * port_ptr) { ASSERT(graph_ptr->opath != NULL); cdbus_signal_emit( cdbus_g_dbus_connection, graph_ptr->opath, JACKDBUS_IFACE_PATCHBAY, "PortAppeared", "ttstsuu", &graph_ptr->graph_version, &port_pt...
false
false
false
false
false
0
snd_ali_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buf) { struct snd_ali *codec = entry->private_data; int i; for (i = 0; i < 256 ; i+= 4) snd_iprintf(buf, "%02x: %08x\n", i, inl(ALI_REG(codec, i))); }
false
false
false
false
false
0
ho_recognize_font_1_yud (const double *array_in) { double return_value = 0.0; double height_by_width = HEIGHT / WIDTH; if (TOP < 0.53 && TOP > 0.47) return_value += 0.1; if (BOTTOM > 0.55) return_value += 0.1; if (WIDTH < 0.3) return_value += 0.1; if (HEIGHT < 0.35) return_value += 0.1; ...
false
false
false
false
false
0
cp_lookup_utf8(JVM_CLASS *class, const void *value) { Dlist temp; CP_INFO * ctemp; if(!class || !value) { BAD_ARG(); return -1; } debug_msg("&&hit utf8 constant\n"); debug_msg("&&value = %s\n",(char *)value); dl_traverse(temp,class->constant_pool) { ctemp = ((CP_NODE *)(temp->val))->val; ...
false
false
false
false
false
0
MergeNetworks (CNet* merge, CNet* doomed, UList* nets) { if (nets == _hnets) { while (!doomed->IsEmpty()) { CNet* nw = doomed->First(); doomed->Remove(nw); merge->Append(nw); CCnxn* cnxn = nw->Cnxn(); cnxn->_lbConn->_csinfo->_hinfo->SetNetwork(mer...
false
false
false
false
false
0
_battery_dbus_ac_adapter_del(const char *udi) { Ac_Adapter *ac; ac = _battery_ac_adapter_find(udi); if (ac) { e_dbus_signal_handler_del(e_dbus_conn, ac->prop_change); device_ac_adapters = eina_list_remove(device_ac_adapters, ac); eina_stringshare_del(ac->udi); eina_strings...
false
false
false
false
false
0
tth_to_base32_buf(const struct tth *tth, char *dst, size_t size) { g_assert(tth); if (size > 0) { base32_encode(dst, size, tth->data, sizeof tth->data); dst[size - 1] = '\0'; } return dst; }
false
false
false
false
false
0
setData(const int ref, const QVariant &data, const int role) { Q_UNUSED(ref); if (role==Qt::EditRole) { if (data.canConvert<QDate>()) { m_Date->m_Date->setDate(data.toDate()); onValueChanged(); } else if (data.canConvert<QDateTime>()) { m_Date->m_Date->setDate...
false
false
false
false
false
0
addViewMenuItems(QMenu* menu) { menu->setTitle( i18nc("@item:inmenu", "&View" ) ); // Layout locking: QAction* lockAction = new QAction( i18n( "Lock Layout" ), this ); lockAction->setCheckable( true ); lockAction->setChecked( AmarokConfig::lockLayout() ); connect( lockAction, SIGNAL(toggled(boo...
false
false
false
false
false
0
GC_generic_malloc_ignore_off_page(size_t lb, int k) { void *result; size_t lg; size_t lb_rounded; word n_blocks; GC_bool init; DCL_LOCK_STATE; if (SMALL_OBJ(lb)) return GC_generic_malloc(lb, k); lg = ROUNDED_UP_GRANULES(lb); lb_rounded = GRANULES_TO_BYTES(lg); if (lb_rou...
false
false
false
false
false
0
gst_is_missing_plugin_message (GstMessage * msg) { if (GST_MESSAGE_TYPE (msg) != GST_MESSAGE_ELEMENT || gst_message_get_structure (msg) == NULL) return FALSE; return gst_structure_has_name (gst_message_get_structure (msg), "missing-plugin"); }
false
false
false
false
false
0
convert_set_attr_alternative (rtx exp, struct insn_def *id) { int num_alt = id->num_alternatives; rtx condexp; int i; if (XVECLEN (exp, 1) != num_alt) { error_with_line (id->lineno, "bad number of entries in SET_ATTR_ALTERNATIVE"); return NULL_RTX; } /* Make a COND with all test...
false
false
false
false
true
1
_rest_proxy_get_bound_url (RestProxy *proxy) { RestProxyPrivate *priv; g_return_val_if_fail (REST_IS_PROXY (proxy), NULL); priv = GET_PRIVATE (proxy); if (!priv->url && !priv->binding_required) { priv->url = g_strdup (priv->url_format); } return priv->url; }
false
false
false
false
false
0
P_Change_Active_Pointer_Grab (Object d, Object events, Object cursor, Object time) { Check_Type (d, T_Display); XChangeActivePointerGrab (DISPLAY(d)->dpy, Symbols_To_Bits (events, 1, Event_Syms), Get_Cursor (cursor), Get_Time (time)); return Void; }
false
false
false
false
false
0
rich_text_size(CFONT *_object, char *text, int len, int sw, int *w, int *h) { QTextDocument rt; rt.setDocumentMargin(0); rt.setHtml(QString::fromUtf8((const char *)text, len)); rt.setDefaultFont(*(THIS->font)); if (sw > 0) rt.setTextWidth(sw); if (w) *w = rt.idealWidth(); if (h) *h = rt.size().height(); ...
false
false
false
false
false
0
time_init_copy(VALUE copy, VALUE time) { struct time_object *tobj, *tcopy; if (copy == time) return copy; time_modify(copy); GetTimeval(time, tobj); GetNewTimeval(copy, tcopy); MEMCPY(tcopy, tobj, struct time_object, 1); return copy; }
false
false
false
false
false
0
check_all_modules(OPT *aod) { int i, found; const lam_ssi_t *ls; /* Call the open/query functions in every module and see if they want to run */ for (found = i = 0; lam_ssi_rpi_modules[i] != NULL; ++i) { ls = lam_ssi_rpi_modules[i]; if (lam_ssi_rpi_verbose > 0) lam_debug(lam_ssi_rpi_did, "o...
false
false
false
false
false
0
resize(unsigned int width, unsigned int height) { m_icon_container.resize(width, height); m_icon_container.setMaxTotalSize(m_icon_container.orientation() == FbTk::ROT0 || m_icon_container.orientation() == FbTk::ROT180 ? width : height); renderTheme(); }
false
false
false
false
false
0
base_pathname (string) char *string; { char *p; #if 0 if (absolute_pathname (string) == 0) return (string); #endif if (string[0] == '/' && string[1] == 0) return (string); p = (char *)strrchr (string, '/'); return (p ? ++p : string); }
false
false
false
false
false
0
name_commits(struct commit_list *list, struct commit **rev, char **ref_name, int num_rev) { struct commit_list *cl; struct commit *c; int i; /* First give names to the given heads */ for (cl = list; cl; cl = cl->next) { c = cl->item; if (c->util) continue; for (i = 0; i < num_rev; i++) { i...
true
true
false
false
false
1
atom_moov_add_uint_tag (AtomMOOV * moov, guint32 fourcc, guint32 flags, guint32 value) { guint8 data[8] = { 0, }; if (flags) { GST_WRITE_UINT16_BE (data, value); atom_moov_add_tag (moov, fourcc, flags, data, 2); } else { GST_WRITE_UINT32_BE (data + 2, value); atom_moov_add_tag (moov, fourcc, ...
false
false
false
false
false
0
__lambda66_ (BoxesTopbar* self) { gint _tmp0_ = 0; BoxesApp* _tmp1_ = NULL; gboolean _tmp2_ = FALSE; gboolean _tmp3_ = FALSE; GtkNotebook* _tmp5_ = NULL; gint _tmp6_ = 0; #line 86 "/extra-data/checkout/gnome/gnome-boxes/src/topbar.vala" _tmp1_ = boxes_app_app; #line 86 "/extra-data/checkout/gnome/gnome-boxes/src...
false
false
false
false
false
0