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
e2_menu_add_radio (GtkWidget *menu, GSList **group, gchar *label, gboolean state, void *func, gpointer data) { GtkWidget *radio = gtk_radio_menu_item_new_with_mnemonic (*group, label); *group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (radio)); if (menu != NULL) gtk_menu_shell_append (GTK_MENU_SHELL (me...
false
false
false
false
false
0
alloc_sites(unsigned int n) { /* Sites storage. */ sites = (struct vertex *)G_calloc(n, sizeof(struct vertex)); if (sites == NULL) G_fatal_error(_("Not enough memory.")); }
false
false
false
false
false
0
do_cmd_run(cmd_code code, cmd_arg args[]) { int y, x, dir; dir = args[0].direction; /* Hack XXX XXX XXX */ if (p_ptr->timed[TMD_CONFUSED]) { msg_print("You are too confused!"); return; } /* Get location */ y = p_ptr->py + ddy[dir]; x = p_ptr->px + ddx[dir]; /* Verify legality */ if (!do_cmd_walk_tes...
false
false
false
false
false
0
Init() { sysinfo_.reset(new SystemInfo); cpus_ = sysinfo_->GetMaxCpus(); if (cpus_ == 0) { return false; } #ifdef WIN32 // Note that GetSystemTimes is available in Windows XP SP1 or later. // http://msdn.microsoft.com/en-us/library/ms724400.aspx // NtQuerySystemInformation is used as a fallback. if ...
false
false
false
false
false
0
CreateUVSpectrumTexture(const Transform &tex2world, const TextureParams &tp) { // Initialize 2D texture mapping _map_ from _tp_ TextureMapping2D *map = NULL; string type = tp.FindString("mapping", "uv"); if (type == "uv") { float su = tp.FindFloat("uscale", 1.); float sv = tp.Fin...
false
false
false
false
false
0
substitution_get (dm, n, template_p) demangling_t dm; int n; int *template_p; { struct substitution_def *sub; /* Make sure N is in the valid range. */ if (n < 0 || n >= dm->num_substitutions) return NULL; sub = &(dm->substitutions[n]); *template_p = sub->template_p; return sub->text; }
false
false
false
false
false
0
FDKaacEnc_CalcWindowEnergy(BLOCK_SWITCHING_CONTROL *RESTRICT blockSwitchingControl, INT windowLen) { INT i; UINT w; FIXP_SGL hiPassCoeff0 = hiPassCoeff[0]; FIXP_SGL hiPassCoeff1 = hiPassCoeff[1]; INT_PCM *timeSignal = blockSwitchingControl->timeSignal; /* sum up scalarproduct of timesignal a...
false
false
false
false
false
0
val_add_cred_impersonate_name_args( OM_uint32 *minor_status, gss_cred_id_t input_cred_handle, const gss_cred_id_t impersonator_cred_handle, gss_name_t desired_name, gss_OID desired_mech, gss_cred_usage_t cred_usage, OM_uint32 initiator_time_req, OM_uint32 acceptor_time_req, gss_cred_...
false
false
false
false
false
0
license_read_platform_challenge_packet(rdpLicense* license, STREAM* s) { DEBUG_LICENSE("Receiving Platform Challenge Packet"); stream_seek(s, 4); /* ConnectFlags, Reserved (4 bytes) */ /* EncryptedPlatformChallenge */ license->encrypted_platform_challenge->type = BB_ANY_BLOB; license_read_binary_blob(s, license-...
false
false
false
false
false
0
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); CuteChessApplication *_t = static_cast<CuteChessApplication *>(_o); switch (_id) { case 0: { MainWindow* _r = _t->newGameWindow(...
false
false
false
false
false
0
cgroup_release_agent_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off) { struct cgroup *cgrp; BUILD_BUG_ON(sizeof(cgrp->root->release_agent_path) < PATH_MAX); cgrp = cgroup_kn_lock_live(of->kn); if (!cgrp) return -ENODEV; spin_lock(&release_agent_path_lock); strlcpy(cgrp->root->r...
false
false
false
false
false
0
recover_master(struct dlm_rsb *r, unsigned int *count) { struct dlm_ls *ls = r->res_ls; int our_nodeid, dir_nodeid; int is_removed = 0; int error; if (is_master(r)) return 0; is_removed = dlm_is_removed(ls, r->res_nodeid); if (!is_removed && !rsb_flag(r, RSB_NEW_MASTER)) return 0; our_nodeid = dlm_our_n...
false
false
false
false
false
0
aosd_fade_func ( Ghosd * gosd , cairo_t * cr , void * user_data ) { GhosdFadeData *fade_data = user_data; if ( fade_data->surface == NULL ) { cairo_t *rendered_cr; fade_data->surface = cairo_surface_create_similar( cairo_get_target( cr ) , CAIRO_CONTENT_COLOR_ALPHA , fade_data-...
false
false
false
false
false
0
display_end(struct display *display) { struct display *d, *prev = NULL; if (!display) return; display_title(display, NULL); set_color(display, DEFAULT_FGRGBA, FG_COLOR); set_color(display, DEFAULT_BGRGBA, BG_COLOR); if (display->is_xterm) { outs(display, XTERM_REGSCREEN); if (display->get_initial_cursor_p...
false
false
false
false
false
0
_gcry_generate_elg_prime (int mode, unsigned pbits, unsigned qbits, gcry_mpi_t g, gcry_mpi_t **ret_factors) { gcry_mpi_t prime = NULL; if (prime_generate_internal ((mode == 1), &prime, pbits, qbits, g, ret_factors, GCRY_WEAK_RANDOM, 0, 0, NULL, NUL...
false
false
false
false
false
0
e_book_client_error_to_string (EBookClientError code) { switch (code) { case E_BOOK_CLIENT_ERROR_NO_SUCH_BOOK: return _("No such book"); case E_BOOK_CLIENT_ERROR_CONTACT_NOT_FOUND: return _("Contact not found"); case E_BOOK_CLIENT_ERROR_CONTACT_ID_ALREADY_EXISTS: return _("Contact ID already exists"); case E...
false
false
false
false
false
0
toObject(const char* sior, unsigned int) { omniObjRef* objref = omniObjRef::_fromString(sior); if (!objref) return CORBA::Object::_nil(); return (CORBA::Object_ptr)objref->_ptrToObjRef(CORBA::Object::_PD_repoId); }
false
false
false
false
false
0
LookupPerID (pers_id_t *perID) { ml_val_t p, id; for (p = PerIDList; p != ML_unit; p = REC_SEL(p, 2)) { id = REC_SEL(p, 0); if (memcmp((char *)perID, STR_MLtoC(id), PERID_LEN) == 0) return (REC_SEL(p, 1)); } { char buf[64]; ShowPerID (buf, perID); Die ("unable to find PerID %s", buf)...
false
false
false
false
false
0
sd_s_ctrl(struct v4l2_ctrl *ctrl) { struct gspca_dev *gspca_dev = container_of(ctrl->handler, struct gspca_dev, ctrl_handler); gspca_dev->usb_err = 0; if (!gspca_dev->streaming) return 0; switch (ctrl->id) { case V4L2_CID_BRIGHTNESS: setbrightness(gspca_dev, ctrl->val); break; case V4L2_CID_CONTRAST: ...
false
false
false
false
false
0
buildcommand (char *path, char *host, int infd, int outfd, char *fmt) { char buf[10]; char *s1, *s2; int bufi; cmdp[0] = '\000'; for (bufi = 0, s1 = fmt; *s1; s1++) { if (*s1 == '%') { if (*(s1 + 1) == 'e') { s1++; if (bufi + strlen (path) >= CMDI...
false
false
false
false
false
0
initialize_reloptions(void) { int i; int j; j = 0; for (i = 0; boolRelOpts[i].gen.name; i++) j++; for (i = 0; intRelOpts[i].gen.name; i++) j++; for (i = 0; realRelOpts[i].gen.name; i++) j++; for (i = 0; stringRelOpts[i].gen.name; i++) j++; j += num_custom_options; if (relOpts) pfree(relOpts); ...
false
false
false
false
false
0
on_actionSave_triggered() { /* empty text view has blockCount = 1 */ if (ui->textView->blockCount() < 2) { QMessageBox::warning(this, tr("Gqrx error"), tr("Nothing to save."), QMessageBox::Ok, QMessageBox::Ok); return; } QString fileName = QFileDialog::getSa...
false
false
false
false
false
0
v2_verify_message(gss_buffer_t in, unsigned char signkey[16], RC4_KEY *sealkey, uint32_t seq, const unsigned char checksum[16]) { OM_uint32 ret; unsigned char out[16]; ret = v2_sign_message(in, signkey, sealkey, seq, out); if (ret) return ret; if (memcmp(checksum, out, 16) != 0) ...
false
false
false
false
false
0
SetCubeInfoMoney(cubeinfo * pci, const int nCube, const int fCubeOwner, const int fMove, const int fJacoby, const int fBeavers, const bgvariation bgv) { if (nCube < 1 || fCubeOwner < -1 || fCubeOwner > 1 || fMove < 0 || fMove > 1) { /* FIXME also illegal if nCube is not a power of 2 */ ...
false
false
false
false
false
0
shepconf_deliver_signal_or_method(int sig, int pid, pid_t *ctrl_pid) { const char* method_name = shepherd_find_method(sig); int new_sig; dstring method = DSTRING_INIT; /* * There are three different ways to signal the processes: * * a) Userdefined signal * b) Userdefined metho...
true
true
false
false
false
1
set_object_line_pixels(GabeditXYPlot *xyplot, XYPlotObjectLine* objectLine) { if(!objectLine) return; value2pixel(xyplot, objectLine->x1,objectLine->y1, &objectLine->x1i, &objectLine->y1i); objectLine->y1i=xyplot->plotting_rect.height-objectLine->y1i; objectLine->x1i += xyplot->plotting_rect.x; objectLine->y1i += ...
false
false
false
false
false
0
end_ready_test_iterator (CutStreamParser *parser, CutStreamParserPrivate *priv, GMarkupParseContext *context, const gchar *element_name, GError **error) { if (!priv->ready_test_iterator) return; if (priv->run_context) { g_signal_emit_by_name(pri...
false
false
false
false
false
0
test_g_filename_from_uri (void) { int i; gchar *res; gchar *hostname; for (i = 0; i < G_N_ELEMENTS (from_uri_tests); i++) { res = g_filename_from_uri (from_uri_tests[i].uri, &hostname, NULL); cut_assert_equal_string (from_uri_tests[i].expected_filename, res); cut...
false
false
false
false
false
0
ShrinkTo(int new_capacity) { ASSERT(new_capacity >= initial_capacity_); ASSERT(new_capacity < capacity_); size_t delta = capacity_ - new_capacity; ASSERT(IsAligned(delta, OS::AllocateAlignment())); if (!MemoryAllocator::UncommitBlock(high() - delta, delta)) { return false; } capacity_ = new_capacity; ...
false
false
false
false
false
0
renderEPSToImageInternalFromMemory(GLEScript* script, double dpi, const QSize& area) { // Rendering EPS has started emit serverMessage(tr("Rendering PostScript")); // Render EPS from memory GLEPoint bb(script->getBoundingBox()); GLEPoint origin(script->getBoundingBoxOrigin()); bool newDPI = false; GSInterpreter...
false
false
false
false
false
0
wnck_pager_get_preferred_height_for_width (GtkWidget *widget, int width, int *minimum_height, int *natural_height) { WnckPager *pager; int n_spaces; int n_rows; int...
false
false
false
false
false
0
wait_for_stat(struct tpm_chip *chip, u8 mask, unsigned long timeout, wait_queue_head_t *queue, bool check_cancel) { unsigned long stop; int ret = 0; bool canceled = false; bool condition; u32 cur_intrs; u8 status; struct st33zp24_dev *tpm_dev; tpm_dev = (struct st33zp24_dev *)TPM_VPRIV(chip); /* check cur...
false
false
false
false
false
0
CurveDataIsTrivial(CurveData *curve) { if (curve->m_min_x != 0) return FALSE; if (curve->m_max_x != 1) return FALSE; if (curve->m_min_y != 0) return FALSE; if (curve->m_max_y != 1) return FALSE; if (curve->m_numAnchors < 2) return TRUE; if (curve->m_numAnchors != 2) return FALSE; if (curve->...
false
false
false
false
false
0
isToken(const char *token, const char *s) { const char *z; int32_t j; s=u_skipWhitespace(s); for(j=0;; ++j) { if(token[j]!=0) { if(s[j]!=token[j]) { break; } } else { z=u_skipWhitespace(s+j); if(*z==';' || *z==0) { ...
false
false
false
false
false
0
gdm_xdmcp_handle_managed_forward (GdmXdmcpDisplayFactory *factory, GdmAddress *address, int len) { ARRAY8 clnt_address; char *host; GdmAddress *disp_address; ...
false
false
false
false
false
0
mono_string_from_utf16 (gunichar2 *data) { MonoDomain *domain = mono_domain_get (); int len = 0; if (!data) return NULL; while (data [len]) len++; return mono_string_new_utf16 (domain, data, len); }
false
true
false
false
false
1
ca_cli_callback_setpreference (int argc, char **argv) { gint preference_id = atoi (argv[1]); gint value = atoi (argv[2]); gchar *message = NULL; if (preference_id != 0) { dialog_error (_("The given preference id is not valid")); return -1; } switch (preference_id) { case 0: message = g_strdup_printf (_("...
false
false
false
false
true
1
gr_opengl_start_instance_matrix(vec3d *offset, matrix *rotation) { if (Cmdline_nohtl) { return; } Assert( GL_htl_projection_matrix_set ); Assert( GL_htl_view_matrix_set ); if (offset == NULL) { offset = &vmd_zero_vector; } if (rotation == NULL) { rotation = &vmd_identity_matrix; } GL_CHECK_FOR_ERROR...
false
false
false
false
false
0
m_locops(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) { sendto_wallops_flags(UMODE_LOCOPS, source_p, "LOCOPS - %s", parv[1]); if(rb_dlink_list_length(&cluster_conf_list) > 0) cluster_generic(source_p, "LOCOPS", SHARED_LOCOPS, CAP_CLUSTER, ":%s", parv[1]); return 0; }
false
false
false
false
false
0
get_end_tag(gchar *text, gchar *tag_name, gchar *tag){ gchar buff[512]; gchar *p; gint i; #ifdef XML_TRACE LOG(LOG_DEBUG, "IN : get_end_tag(%s)", tag_name); #endif sprintf(buff, "</%s",tag_name); p = strstr(text, buff); if(p == NULL){ LOG(LOG_INFO, "get_end_tag: format error tag_name=%s", tag_name); tag[0...
false
false
false
false
false
0
crm_timer_popped(gpointer data) { fsa_timer_t *timer = (fsa_timer_t *) data; if (timer == wait_timer || timer == recheck_timer || timer == transition_timer || timer == finalization_timer || timer == election_trigger) { crm_info("%s (%s) just popped (%dms)", get_timer_de...
false
false
false
false
false
0
outflush (done) int done; { /* * in this case we are a floppy and want to write the floppy from one * buffer (to have a copy of the data to verify against) */ bufend = buffer + ((aruntil!=0) ? min ((ulonglong)buflen, arleft) : (ulonglong)buflen); if (Fflag && (done == NOTDONE) && ((bufend - bufidx) ...
false
false
false
false
false
0
driver_init_driver( CoreGraphicsDevice *device, GraphicsDeviceFuncs *funcs, void *driver_data, void *device_data, CoreDFB *core ) { CyberDriverData *cdrv = (CyberDriverData*) driver_data; ...
false
false
false
false
false
0
gres_plugin_job_test(List job_gres_list, List node_gres_list, bool use_total_gres, bitstr_t *cpu_bitmap, int cpu_start_bit, int cpu_end_bit, uint32_t job_id, char *node_name) { int i; uint32_t cpu_cnt, tmp_cnt; ListIterator job_gres_iter, node_gres_iter; gres_state_t *job_gres_ptr, *node...
false
false
false
false
false
0
ExecMarkPos(PlanState *node) { switch (nodeTag(node)) { case T_SeqScanState: ExecSeqMarkPos((SeqScanState *) node); break; case T_IndexScanState: ExecIndexMarkPos((IndexScanState *) node); break; case T_TidScanState: ExecTidMarkPos((TidScanState *) node); break; case T_ValuesScanState: ...
false
false
false
false
false
0
PythonPositionBearoff(PyObject * UNUSED(self), PyObject * args) { PyObject *pyBoard = NULL; int nChequers = 15; int nPoints = 6; TanBoard anBoard; memcpy(anBoard, msBoard(), sizeof(anBoard)); if (!PyArg_ParseTuple(args, "|Oii:positionbearoff", &pyBoard, &nPoints, &nChequers)) return NU...
false
false
false
false
false
0
snd_es1968_tea575x_get_pins(struct snd_tea575x *tea) { struct es1968 *chip = tea->private_data; struct snd_es1968_tea575x_gpio gpio = *get_tea575x_gpio(chip); u16 val = inw(chip->io_port + GPIO_DATA); u8 ret = 0; if (val & (1 << gpio.data)) ret |= TEA575X_DATA; if (val & (1 << gpio.most)) ret |= TEA575X_MOST...
false
false
false
false
false
0
PySeqIter_New(PyObject *seq) { seqiterobject *it; if (!PySequence_Check(seq)) { PyErr_BadInternalCall(); return NULL; } it = PyObject_GC_New(seqiterobject, &PySeqIter_Type); if (it == NULL) return NULL; it->it_index = 0; Py_INCREF(seq); it->it_seq = seq; _PyO...
false
false
false
false
false
0
enterAttr(const char *s1, const char *s2) { const char *p1, *p2 = NULL; p1 = lookupProp_(s1); if (s2) { VObject *a; p2 = lookupProp_(s2); a = addProp(curProp,p1); setVObjectStringZValue(a,p2); } else addProp(curProp,p1); if (stricmp(p1,VCBase64Prop) == 0 || (s2 && stricmp(p2,VCBase64Prop)=...
false
false
false
false
false
0
dynamic_remove (GstDynamic * dynamic) { GstDecodeBin *decode_bin = dynamic->decode_bin; /* remove the dynamic from the list of dynamics */ decode_bin->dynamics = g_list_remove (decode_bin->dynamics, dynamic); dynamic_free (dynamic); /* if we have no more dynamic elements, we have no chance of creating * ...
false
false
false
false
false
0
gnc_ttinfo_append_template_split(TTInfo *tti, TTSplitInfo *split_i) { g_return_if_fail(tti && split_i); tti->splits = g_list_append(tti->splits, split_i); return; }
false
false
false
false
false
0
eel_op_div(int argc, struct eel_data_t *argv) { eel_data_t *left = argv, *right = argv + 1; DBG(log_printf(DLOG, "div ");) if(argc != 2) { eel_error("Operator needs exactly two arguments!"); return -1; } switch(promote(left, right)) { case EDT_REAL: if(!right->value.r) { eel_error("Division by zero...
false
false
false
false
false
0
gdm_simple_slave_start_session_when_ready (GdmSimpleSlave *slave, const char *service_name) { if (slave->priv->start_session_when_ready) { slave->priv->waiting_to_start_session = FALSE; queue_start_session (slave, service_name); ...
false
false
false
false
false
0
debug_dispatch (sc_gameref_t game, sc_command_t command, sc_command_type_t type, sc_int arg1, sc_int arg2, sc_command_t help_topic) { /* Demultiplex debugging command, and call handlers. */ switch (command) { case DEBUG_HELP: debug_help (help_topic); break; ca...
false
false
false
false
false
0
getContextualCalendarItem() const { DayRangeBody *body = qobject_cast<DayRangeBody*>(m_d->m_body); if (body) return body->getContextualCalendarItem(); return CalendarItem(); }
false
false
false
false
false
0
be_set_channels(struct net_device *netdev, struct ethtool_channels *ch) { struct be_adapter *adapter = netdev_priv(netdev); int status; if (ch->rx_count || ch->tx_count || ch->other_count || !ch->combined_count || ch->combined_count > be_max_qs(adapter)) return -EINVAL; adapter->cfg_num_qs = ch->com...
false
false
false
false
false
0
del_PcaPathConf(PcaPathConf *ppc) { if(ppc) { ppc->pc = NULL; /* It is up to the caller to delete the cache */ /* * Delete the container. */ free(ppc); }; return NULL; }
false
false
false
false
false
0
SetTargetMol(const OBMol &targetmol) { _ptargetmol = &targetmol; _targetmol_coords.resize(0); OBAtom const *atom; for (unsigned int i=1; i<=targetmol.NumAtoms(); ++i) { atom = targetmol.GetAtom(i); if (_includeH || !atom->IsHydrogen()) _targetmol_coords.push_back(atom->GetVector()); ...
false
false
false
false
false
0
eRealloc (void *const ptr, const size_t size) { void *buffer; if (ptr == NULL) buffer = eMalloc (size); else { buffer = realloc (ptr, size); if (buffer == NULL) error (FATAL, "out of memory"); } return buffer; }
false
false
false
false
false
0
alignDataNew(ajint nseqs, AjBool external) { AlignPData data = NULL; AJNEW0(data); data->Nseqs = nseqs; AJCNEW0(data->Start, nseqs); AJCNEW0(data->End, nseqs); AJCNEW0(data->Len, nseqs); AJCNEW0(data->Offset, nseqs); AJCNEW0(data->Offend, nseqs); AJCNEW0(data->SubOffset, nseqs); ...
false
false
false
false
false
0
lib3ds_node_by_id(Lib3dsNode *node, Lib3dsWord node_id) { Lib3dsNode *p,*q; for (p=node->childs; p!=0; p=p->next) { if (p->node_id==node_id) { return(p); } q=lib3ds_node_by_id(p, node_id); if (q) { return(q); } } return(0); }
false
false
false
false
false
0
show_conflicts(ppd_file_t *ppd, /* I - PPD to check */ const char *prefix) /* I - Prefix string */ { int i, j; /* Looping variables */ ppd_const_t *c; /* Current constraint */ ppd_option_t *o1, *o2; /* Options */ ppd_choice_t *c1, *c2; /* Choices */ /* * Loop through all of the UI co...
false
false
false
false
false
0
msleep_minimum(uint64_t ms) { uint64_t stop_time = getcurrenttime() + ms; while (1) { uint64_t current_time = getcurrenttime(); if (current_time >= stop_time) { return; } msleep_approx(stop_time - current_time); } }
false
false
false
false
false
0
ymalloc(int size) { void *ptr; xassert(size > 0); ptr = malloc(size); if (ptr == NULL) xerror("MiniSat: no memory available\n"); return ptr; }
false
false
false
false
false
0
macb_tx_interrupt(struct macb_queue *queue) { unsigned int tail; unsigned int head; u32 status; struct macb *bp = queue->bp; u16 queue_index = queue - bp->queues; status = macb_readl(bp, TSR); macb_writel(bp, TSR, status); if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE) queue_writel(queue, ISR, MACB_BIT(TCOMP)...
false
false
false
false
false
0
msg2html(FILE *fp, struct rfc2045 *rfc, struct msg2html_info *info) { if (!info->mimegpgfilename) info->mimegpgfilename=""; showmsgrfc822_body(fp, rfc, NULL, 0, info); }
false
false
false
false
false
0
patternGenerated() { qsrand(m_pattern->seed()); m_words = m_pattern->solution(); QSize size = m_pattern->size(); setSceneRect(0, 0, size.width() * 34 + 2, size.height() * 34 + 34); for (int x = 0; x < size.width(); ++x) { QList<Cell*> cells; for (int y = 0; y < size.height(); ++y) { cells.append(0); } ...
false
false
false
false
false
0
tbbtdless(TBBT_TREE * tree, VOIDP key, TBBT_NODE ** pp) { if (tree == NULL) return (NULL); return (tbbtless(tree->root, key, tree->compar, tree->cmparg, pp)); }
false
false
false
false
false
0
SupportedMethods() { std::ostringstream s; std::vector< tString > methods; sn_GetSupportedMethods( methods); bool first = false; for( std::vector< tString >::iterator iter = methods.begin(); iter != methods.end(); ++iter ) { if ( !first ) { s << ", "; } ...
false
false
false
false
false
0
meas_find_next(lt_op_type lt, const struct sample *s, struct coord ref, const struct bitset *qual) { const struct sample *next = NULL; while (s) { if (!qual || bitset_ge(s->frame_set, qual)) if (!next || better_next(lt, ref, next->pos, s->pos)) next = s; s = s->next; } return next; }
false
false
false
false
false
0
g15r_drawSprite(g15canvas *canvas, char *buf, int my_x, int my_y, int width, int height, int start_x, int start_y, int total_width) { int y,x,val; unsigned int pixel_offset = 0; unsigned int byte_offset, bit_offset; for (y=0; y < height - 1; y++) for (x=0; x < width - 1; x++) { pixel_of...
false
false
false
false
false
0
ath10k_wmi_tlv_prepare_peer_qos(u8 uapsd_queues, u8 sp) { u32 peer_qos = 0; if (uapsd_queues & IEEE80211_WMM_IE_STA_QOSINFO_AC_VO) peer_qos |= WMI_TLV_TDLS_PEER_QOS_AC_VO; if (uapsd_queues & IEEE80211_WMM_IE_STA_QOSINFO_AC_VI) peer_qos |= WMI_TLV_TDLS_PEER_QOS_AC_VI; if (uapsd_queues & IEEE80211_WMM_IE_STA_QOS...
false
false
false
false
false
0
nextInput(ByteInStream & is, StdVnChar & stdChar, int & bytesRead) { unsigned char ch; if (!is.getNext(ch)) { bytesRead = 0; return 0; } stdChar = (m_stdMap[ch])? (VnStdCharOffset + m_stdMap[ch] - 1) : ch; bytesRead = 1; return 1; }
false
false
false
false
false
0
update_tint_uniform (ClutterColorizeEffect *self) { if (self->tint_uniform > -1) { float tint[3] = { self->tint.red / 255.0, self->tint.green / 255.0, self->tint.blue / 255.0 }; cogl_pipeline_set_uniform_float (self->pipeline, self-...
false
false
false
false
false
0
applyMove(const Move &move) { destroyRest(); // No forward history thanx! =) Board b(pos->first); int ret = b.applyMove(move, lookUp); BitBoard64 low61(0xFFFFFFFF, 0x1FFFFFFF); if(!(b.getBBBoard() & ~boardMask & low61).empty()) { std::cout << "VAFAN!!!!!\n"; } if(!ret) { board...
false
false
false
false
false
0
allocrest() { long i; y = (Char **)Malloc(spp*sizeof(Char *)); for (i = 0; i < spp; i++) y[i] = (Char *)Malloc((sites+1)*sizeof(Char)); nayme = (naym *)Malloc(spp*sizeof(naym)); weight = (steptr)Malloc((sites+1)*sizeof(long)); alias = (steptr)Malloc((sites+1)*sizeof(long)); aliasweight = (steptr)Mall...
false
false
false
false
false
0
block(int cc) { int c; c = cc; if(cflag&UCASE && c>='a' && c<='z') c += 'A'-'a'; if(cflag&LCASE && c>='A' && c<='Z') c += 'a'-'A'; c &= 0377; if(cbs == 0) { null(c); return; } if(cc == '\n') { while(cbc < cbs) { null(' '); cbc++; } cbc = 0; return; } if(cbc == cbs) ntrunc++; cbc++; ...
false
false
false
false
false
0
f_setline(argvars, rettv) typval_T *argvars; typval_T *rettv; { linenr_T lnum; char_u *line = NULL; list_T *l = NULL; listitem_T *li = NULL; long added = 0; linenr_T lcount = curbuf->b_ml.ml_line_count; lnum = get_tv_lnum(&argvars[0]); if (argvars[1].v_type == VAR_LIST) { l...
false
false
false
false
false
0
aw_xfig_font_changefont_cb(AW_root *aw_root){ char *file = aw_root->awar("vectorfont/file_name")->read_string(); // fprintf(stderr,"Changed to: %s\n", file); // irrelevant call? if ((file[0]=='\0') || (!GB_is_regularfile(file))) { delete file; return; } // this might be a file, so try to read it ...
false
false
false
false
false
0
murrine_rgba_draw_scrollbar_stepper (cairo_t *cr, const MurrineColors *colors, const WidgetParameters *widget, const ScrollBarParameters *scrollbar, int x, int y, ...
false
false
false
false
false
0
script(const opcode_ty *op, opcode_context_ty *icp) { opcode_status_ty status; const opcode_setenv_ty *this; string_list_ty *name; string_list_ty *value; string_ty *name1; string_ty *name2; string_ty *value1; string_ty *value2; trace(("opcode_setenv::script...
false
false
false
false
false
0
normalize_name(char *name) { char *t; /* Make lower case. */ for (t = name; *t; t++) if (isascii((unsigned char)*t) && isupper((unsigned char)*t)) *t = tolower((*t)&0xff); /* Remove trailing dots. */ while (t > name && t[-1] == '.') *--t = '\0'; }
false
false
false
false
false
0
ide_sysfs_register_port(ide_hwif_t *hwif) { int i, uninitialized_var(rc); for (i = 0; ide_port_attrs[i]; i++) { rc = device_create_file(hwif->portdev, ide_port_attrs[i]); if (rc) break; } return rc; }
false
false
false
false
true
1
EatIdentifier() { while (isalnum(c) || c == '_') { AddToBuffer(c); ExtractChar(); } IdentifyAndMake(); }
false
false
false
false
false
0
schedule_assign_vector(vvp_net_ptr_t ptr, unsigned base, unsigned vwid, const vvp_vector4_t&bit, vvp_time64_t delay) { struct assign_vector4_event_s*cur = new struct assign_vector4_event_s(bit); cur->ptr = ptr; cur->base = base; cur->vwid = vwid; schedule_event_(cur, d...
false
false
false
false
false
0
set_itext () { int r1, r2; r1 = r2 = 0; if (old_startup_hook) r1 = (*old_startup_hook) (); if (deftext) { r2 = rl_insert_text (deftext); deftext = (char *)NULL; rl_startup_hook = old_startup_hook; old_startup_hook = (rl_hook_func_t *)NULL; } return (r1 || r2); }
false
false
false
false
false
0
msdos_disk_get_partition_info (int fd, legacy_mbr *mbr, uint32_t num, uint64_t *start, uint64_t *size, char *signature, uint8_t *mbr_type, uint8_t *signature_type) { int rc; long disk_size=0; struct stat stat; struct timeval tv; if (!mbr) return 1; if (!is_mbr_valid(mbr)...
false
false
false
false
false
0
r5l_log_endio(struct bio *bio) { struct r5l_io_unit *io = bio->bi_private; struct r5l_log *log = io->log; unsigned long flags; if (bio->bi_error) md_error(log->rdev->mddev, log->rdev); bio_put(bio); spin_lock_irqsave(&log->io_list_lock, flags); __r5l_set_io_unit_state(io, IO_UNIT_IO_END); if (log->need_cac...
false
false
false
false
false
0
server3_3_rchecksum (rpcsvc_request_t *req) { server_state_t *state = NULL; call_frame_t *frame = NULL; gfs3_rchecksum_req args = {0,}; int ret = -1; int op_errno = 0; if (!req) return ret; ret =...
false
false
false
false
false
0
opacity_rectangle (TestConformSimpleFixture *fixture, gpointer dummy) { ClutterActor *stage; ClutterActor *rect; ClutterColor rect_color = { 0, 0, 255, 255 }; ClutterColor color_check = { 0, }; stage = clutter_stage_new (); rect = clutter_rectangle_new_with_color (&rect...
false
false
false
false
false
0
outhead (name, asb) reg char *name; reg Stat *asb; { reg uint namelen; auto char header[M_STRLEN + H_STRLEN + 1]; if ((name[0] == '/') && !abspaths) { if (name[1]) ++name; else name = "."; } namelen = (uint) strlen (name) + 1; VOID strcpy (header, M_ASCII); VOID sprintf (hea...
false
false
false
false
false
0
get_bool_config_value(struct collection_item *item, unsigned char def, int *error) { const char *str; int len; TRACE_FLOW_STRING("get_bool_config_value", "Entry"); /* Do we have the item ? */ if ((item == NULL) || (col_get_item_type(item) != COL_TYPE_STR...
false
false
false
false
false
0
copy_glist(struct glist *p) { if (p == NULL) return NULL; else { struct glist *q = get_glist(); q->v = p->v; q->next = copy_glist(p->next); return q; } }
false
false
false
false
false
0
add_princ(struct foreach_data *d, char *princ) { char **tmp; tmp = realloc(d->princs, (d->count + 1) * sizeof(*tmp)); if(tmp == NULL) return ENOMEM; d->princs = tmp; d->princs[d->count++] = princ; return 0; }
false
false
false
false
true
1
activate( const ASCString& pane ) { BulkGraphicUpdates bgu ( this ); for ( int i = 0; i < paneNum; ++i ) if ( ASCString( paneName[i]) != pane ) hide( paneName[i] ); for ( int i = 0; i < paneNum; ++i ) if ( ASCStr...
false
false
false
false
false
0
rsh_file_init(file_t* file, const char* path, int reuse_path) { memset(file, 0, sizeof(*file)); if (reuse_path) { file->path = (char*)path; file->mode = FILE_OPT_DONT_FREE_PATH; } else { file->path = rsh_strdup(path); } }
false
false
false
false
false
0
sort(){ std::sort( items.begin(), items.end(), itemLess ); // Remove duplicates. We assume that, after sorting, duplicates are // consecutive. This will be true if non-duplicates never overlap, // which is true if all the SegmentPairs are "optimal". iterator newEnd = std::unique( items.begin(), items.end()...
false
false
false
false
false
0
_entry_changed_signal_cb(void *data, Evas_Object *obj EINA_UNUSED, const char *emission EINA_UNUSED, const char *source EINA_UNUSED) { Evas_Object *object = data; E_Entry_Smart_Data *sd; if ((!object) || !(sd = evas_object_smart_data_get(object))) return; if (sd->changing) return; ...
false
false
false
false
false
0
newArtHolder (Article article) { ArtHolder a = ALLOC (struct art_holder_s, 1) ; ASSERT (a != NULL) ; a->article = article ; a->next = NULL ; return a ; }
false
false
false
true
false
1
nva3_get_intensity(struct backlight_device *bd) { struct nouveau_encoder *nv_encoder = bl_get_data(bd); struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev); struct nvif_object *device = &drm->device.object; int or = nv_encoder->or; u32 div, val; div = nvif_rd32(device, NV50_PDISP_SOR_PWM_DIV(or)); ...
false
false
false
false
false
0