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
init(Solver&) { assert(solver_ && graph_ && "DefaultUnfoundedCheck::attachTo() not called!"); AtomVec::size_type startAtom = atoms_.size(); // set up new atoms atoms_.resize(graph_->numAtoms()); // set up new bodies for (uint32 i = (uint32)bodies_.size(); i != graph_->numBodies(); ++i) { bodies_.push_back(BodyD...
false
false
false
false
false
0
radeon_setup_i2c_bus(struct radeon_i2c_chan *chan, const char *name) { int rc; snprintf(chan->adapter.name, sizeof(chan->adapter.name), "radeonfb %s", name); chan->adapter.owner = THIS_MODULE; chan->adapter.algo_data = &chan->algo; chan->adapter.dev.parent = &chan->rinfo->pdev->dev; chan->algo.setsda = rad...
false
false
false
false
false
0
copy_uris_with_nautilus (const char *source, const char *src_name, const char *dest) { GError *error = NULL; GDBusProxyFlags flags; GDBusProxy *proxy; GFile *dest_file, *parent; char *dest_name, *dest_dir; g_return_if_fail (source != NULL); g_return_if_fail (dest != NULL); g_return_if_fail (src_name !=...
false
false
false
false
false
0
evas_software_xlib_outbuf_idle_flush(Outbuf *buf) { if (buf->priv.onebuf) { RGBA_Image *im; Outbuf_Region *obr; im = buf->priv.onebuf; buf->priv.onebuf = NULL; obr = im->extended_info; if (obr->xob) evas_software_xlib_x_output_buffer_free(obr->xob, 0); if (obr->mxob) evas_software_xlib_x_output_b...
false
false
false
false
false
0
RepresentationFromCharacter(const char *charBytes, size_t len) { PLATFORM_ASSERT(len <= 4); if (!startByteHasReprs[static_cast<unsigned char>(charBytes[0])]) return 0; MapRepresentation::iterator it = mapReprs.find(KeyFromString(charBytes, len)); if (it != mapReprs.end()) { return &(it->second); } return 0; }
false
false
false
false
false
0
ath10k_pci_remove(struct pci_dev *pdev) { struct ath10k *ar = pci_get_drvdata(pdev); struct ath10k_pci *ar_pci; ath10k_dbg(ar, ATH10K_DBG_PCI, "pci remove\n"); if (!ar) return; ar_pci = ath10k_pci_priv(ar); if (!ar_pci) return; ath10k_core_unregister(ar); ath10k_pci_free_irq(ar); ath10k_pci_kill_taskl...
false
false
false
false
false
0
printLpStats(const PreproStats& lp) const { printKeyValue("Atoms", "%-6u", lp.atoms); if (lp.trStats) { printf(" (Original: %u Auxiliary: %u)", lp.atoms-lp.trStats->auxAtoms, lp.trStats->auxAtoms); } printf("\n"); printKeyValue("Rules", "%-6u", lp.rules[0]); printf(" (1: %u", lp.rules[BASICRULE] - (lp.trStats?...
false
false
false
false
false
0
mprCreateCond() { MprCond *cp; if ((cp = mprAllocObj(MprCond, manageCond)) == 0) { return 0; } cp->triggered = 0; cp->mutex = mprCreateLock(); #if BLD_WIN_LIKE cp->cv = CreateEvent(NULL, FALSE, FALSE, NULL); #elif VXWORKS cp->cv = semCCreate(SEM_Q_PRIORITY, SEM_EMPTY); #else ...
false
false
false
false
false
0
FillValues_(Index n_entries, const ScaledMatrix& matrix, Number* values) { // ToDo: // This method can be made much more efficient for ScaledMatrix with GenTMatrix // contained // Get the matrix values FillValues(n_entries, *GetRawPtr(matrix.GetUnscaledMatrix()), values); // Scale the values...
false
false
false
false
false
0
IsLegal(void) { squareT stmKing = GetKingSquare(); squareT enemyKing = GetEnemyKingSquare(); if(square_Adjacent(stmKing, enemyKing)) { printf("Kings adjacent\n"); return false; } if(RankCount(WP, RANK_1) != 0) { return false; } if(RankCount(WP, RANK_8) != 0) ...
false
false
false
false
false
0
_lt_list_sort_merge(lt_list_t *l1, lt_list_t *l2, lt_compare_func_t func) { int result; lt_list_t list, *l = &list, *lprev = NULL; while (l1 && l2) { result = func(lt_list_value(l1), lt_list_value(l2)); if (result <= 0) { l->next = l1; l1 = lt_list_next(l1); } else { l->n...
false
false
false
false
false
0
rwl_writeunlock(brwlock_t *rwl) { int stat, stat2; if (rwl->valid != RWLOCK_VALID) { return EINVAL; } if ((stat = pthread_mutex_lock(&rwl->mutex)) != 0) { return stat; } if (rwl->w_active <= 0) { pthread_mutex_unlock(&rwl->mutex); Jmsg0(NULL, M_ABORT, 0, _("rwl_writeunlock cal...
false
false
false
false
false
0
mlx5_umr_cq_handler(struct ib_cq *cq, void *cq_context) { struct mlx5_ib_umr_context *context; struct ib_wc wc; int err; while (1) { err = ib_poll_cq(cq, 1, &wc); if (err < 0) { pr_warn("poll cq error %d\n", err); return; } if (err == 0) break; context = (struct mlx5_ib_umr_context *) (unsigned...
false
false
false
false
false
0
dump_quoted_path(const char *prefix, const char *path, const char *c_meta, const char *c_reset) { printf("%s%s", c_meta, prefix); if (quote_c_style(path, NULL, NULL, 0)) quote_c_style(path, NULL, stdout, 0); else printf("%s", path); printf("%s\n", c_reset); }
false
false
false
false
false
0
nilfs_btree_node_init(struct nilfs_btree_node *node, int flags, int level, int nchildren, int ncmax, const __u64 *keys, const __u64 *ptrs) { __le64 *dkeys; __le64 *dptrs; int i; nilfs_btree_node_set_flags(node, flags); nilfs_btree_node_set_level(node, level); nilfs_btree_node_set_nchildren(node, nchi...
false
false
false
false
false
0
test_center() { int i; struct js_event ev; if (ioctl(fd, JSIOCGAXES, &axes) < 0) { perror("jscal: error getting axes"); exit(1); } if (ioctl(fd, JSIOCGBUTTONS, &buttons) < 0) { perror("jscal: error getting buttons"); exit(1); } if (fcntl(fd, F_SETFL, O_NONBLOCK)) { perror("jscal: cannot set nonblock...
false
true
false
false
true
1
xdl_num_out(char *out, long val) { char *ptr, *str = out; char buf[32]; ptr = buf + sizeof(buf) - 1; *ptr = '\0'; if (val < 0) { *--ptr = '-'; val = -val; } for (; val && ptr > buf; val /= 10) *--ptr = "0123456789"[val % 10]; if (*ptr) for (; *ptr; ptr++, str++) *str = *ptr; else *str++ = '0'; *...
false
false
false
false
false
0
main() { MockDb db; MockDb::_serializer_context_t printer; test::TabBar t; //test::TabFoo f; { using T = decltype(update(t)); static_assert(sqlpp::is_regular<T>::value, "type requirement"); } { using T = decltype(update(t).set(t.gamma = false).where(t.beta != "transparent")); static_assert(sqlpp::is_r...
false
false
false
false
false
0
globus_gridftp_server_finished_session_start( globus_gfs_operation_t op, globus_result_t result, void * session_arg, char * username, char * home_dir) { globus_gfs_finished_inf...
false
false
false
false
false
0
do_get(GConfEngine* conf, const gchar** args) { GError* err = NULL; if (args == NULL) { g_printerr (_("Must specify a key or keys to get\n")); return 1; } while (*args) { GConfValue* value; gchar* s; err = NULL; value = get_maybe_without_default (conf, *ar...
false
false
false
false
false
0
place_zombie_mom(game *g, mission *miss) { int city_id = g->cur_om.closest_city( g->om_location() ); point house = g->cur_om.random_house_in_city(city_id); miss->target = house; // Make it seen on our map for (int x = house.x - 6; x <= house.x + 6; x++) { for (int y = house.y - 6; y <= house.y + 6; y++) g->cu...
false
false
false
false
false
0
if_convertible_gimple_assign_stmt_p (gimple stmt, VEC (data_reference_p, heap) *refs) { tree lhs = gimple_assign_lhs (stmt); basic_block bb; if (dump_file && (dump_flags & TDF_DETAILS)) { fprintf (dump_file, "-------------------------\n"); print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM)...
false
false
false
false
false
0
input() { int c; *yy_c_buf_p = yy_hold_char; if(*yy_c_buf_p == (char)0) { if(yy_c_buf_p < &(*yy_current_buffer).yy_ch_buf[yy_n_chars]) *yy_c_buf_p = '\0'; else { int offset = yy_c_buf_p - yytext; ++yy_c_buf_p; switch(yy_get_next_buffer()) { case 2: yyrestart(yyin); case 1: { if(yywrap()) return (-1); if(!yy_did_buffe...
false
false
false
false
false
0
populate_hover_window(GncDenseCal *dcal, gint doc) { GtkWidget *w; GDate *date; static const int MAX_STRFTIME_BUF_LEN = 64; gchar strftimeBuf[MAX_STRFTIME_BUF_LEN]; if (doc >= 0) { GObject *o; GtkListStore *model; GList *l; w = GTK_WIDGET(g_object_get_data(G_OBJ...
false
false
false
false
false
0
DetermineSequence( unsigned int m, unsigned int *pm, unsigned int *pa, unsigned int *pc ) { unsigned int fact[MAXFACT]; register unsigned int a=0, c; register unsigned int b; register int pot,best; register int count; register int flag; reg...
false
false
false
false
false
0
httpRemoveGroup(HttpAuth *auth, cchar *group) { if (auth->groups == 0 || !mprLookupKey(auth->groups, group)) { return MPR_ERR_CANT_ACCESS; } mprRemoveKey(auth->groups, group); return 0; }
false
false
false
false
false
0
powpan_initups(void) { int ret, i; upsdebugx(1, "Trying %s protocol...", powpan_binary.version); ser_set_speed(upsfd, device_path, B1200); /* This fails for many devices, so don't bother to complain */ ser_send_pace(upsfd, UPSDELAY, "\r\r"); for (i = 0; i < MAXTRIES; i++) { ser_flush_io(upsfd); /* * ...
false
false
false
false
true
1
launch_file(arg) CONST char *arg; { if (!launcher()) return(view_file(arg)); return(FNC_EFFECT); }
false
false
false
false
false
0
get_previous_sibling() { if(!cobj()->prev) return 0; Node::create_wrapper(cobj()->prev); return static_cast<Node*>(cobj()->prev->_private); }
false
false
false
false
false
0
ath9k_hw_setrxabort(struct ath_hw *ah, bool set) { u32 reg; if (set) { REG_SET_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT)); if (!ath9k_hw_wait(ah, AR_OBS_BUS_1, AR_OBS_BUS_1_RX_STATE, 0, AH_WAIT_TIMEOUT)) { REG_CLR_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_A...
false
false
false
false
false
0
enic_wq_devcmd2_alloc(struct vnic_dev *vdev, struct vnic_wq *wq, unsigned int desc_count, unsigned int desc_size) { int err; wq->index = 0; wq->vdev = vdev; wq->ctrl = vnic_dev_get_res(vdev, RES_TYPE_DEVCMD2, 0); if (!wq->ctrl) return -EINVAL; vnic_wq_disable(wq); err = vnic_dev_alloc_desc_ring(vdev, &w...
false
false
false
false
false
0
deleteInlineBoxes(RenderArena* arena) { if (m_firstLineBox) { if (!arena) arena = renderArena(); InlineRunBox *curr=m_firstLineBox, *next=0; while (curr) { next = curr->nextLineBox(); if (!curr->isPlaceHolderBox()) curr->detach(arena, true ...
false
false
false
false
false
0
flimage_ps_options( void ) { static SPEC *sp; if ( ! sp ) { extern float fli_dpi; /* I don't like this and will change it */ sp = fl_calloc( 1, sizeof *sp ); sp->orientation = FLPS_AUTO; sp->paper_w = 8.5; sp->paper_h = 11.0; sp->auto_fit = 1; sp->...
false
false
false
false
false
0
enet_protocol_remove_sent_reliable_command (ENetPeer * peer, enet_uint32 reliableSequenceNumber, enet_uint8 channelID) { ENetOutgoingCommand * outgoingCommand; ENetListIterator currentCommand; ENetProtocolCommand commandNumber; for (currentCommand = enet_list_begin (& peer -> sentReliableCommands); ...
false
false
false
false
false
0
checkout_entry(struct cache_entry *ce, const struct checkout *state, char *topath) { static char path[PATH_MAX + 1]; struct stat st; int len = state->base_dir_len; if (topath) return write_entry(ce, topath, state, 1); memcpy(path, state->base_dir, len); strcpy(path + len, ce->name); if (!lstat(path, &st)) {...
false
false
false
false
false
0
createBlockDuplicatedStringLiteral(Loc loc, Type *type, unsigned value, size_t dim, int sz) { utf8_t *s = (utf8_t *)mem.calloc(dim + 1, sz); for (size_t elemi = 0; elemi < dim; ++elemi) { switch (sz) { case 1: s[elemi] = value; break; case 2: ((unsigne...
false
false
false
false
false
0
cdb_make_addbegin(struct cdb_make *c,unsigned int keylen,unsigned int datalen) { unsigned char buf[8]; if (keylen > 0xffffffff) { errno = ENOMEM; return -1; } if (datalen > 0xffffffff) { errno = ENOMEM; return -1; } uint32_pack(keylen,buf); uint32_pack(datalen,buf + 4); if (!obuf_write(&c->b,(char*)buf,8)...
false
false
false
false
false
0
gee_force_abs_rel (GnmExprEntry *gee) { Rangesel *rs = &gee->rangesel; rs->is_valid = FALSE; if ((gee->flags & GNM_EE_FORCE_ABS_REF)) rs->ref.a.col_relative = rs->ref.b.col_relative = rs->ref.a.row_relative = rs->ref.b.row_relative = FALSE; else if ((gee->flags & GNM_EE_FORCE_REL_REF)) rs->ref.a.col_r...
false
false
false
false
false
0
go_data_cache_records_fetch_index (GODataCache *cache, unsigned i) { if (cache->records_allocated <= i) go_data_cache_records_set_size (cache, i+128); if (cache->records_len <= i) cache->records_len = i + 1; return go_data_cache_records_index (cache, i); }
false
false
false
false
false
0
H5T_commit_named(const H5G_loc_t *loc, const char *name, H5T_t *dt, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id, hid_t dxpl_id) { H5O_obj_create_t ocrt_info; /* Information for object creation */ H5T_obj_create_t tcrt_info; /* Information for named datatype creation */ H5T_state_...
false
false
false
false
false
0
PrintSelf(ostream& os, vtkIndent indent) { this->Superclass::PrintSelf(os,indent); if ( this->Connector ) { os << indent << "Connector: " << this->Connector << "\n"; } else { os << indent << "Connector: (none)\n"; } os << indent << "Dimensionality: " << this->Dimensionality << "\n"; ...
false
false
false
false
false
0
_isZipfile(const std::string& filename) { if (FilePath::ext(filename).empty()) { return false; } FILE* f = fopen(FilePath::removeTrailingSlash(filename).c_str(), "r"); if (f == NULL) { return false; } uint8 header[4]; fread(header, 4, 1, f); const uint8 zipHeade...
false
false
false
false
false
0
parse_node(xmlNodePtr node, simple_binary_t **sibxml) { int status = 0; /* Call for the parser function of the node type. */ switch (node->type) { case XML_ELEMENT_NODE: status = parse_element(node, sibxml); break; case XML_TEXT_NODE: status = parse_text(node, sibxml); break; case XML_C...
false
false
false
false
false
0
ov9740_probe(struct i2c_client *client, const struct i2c_device_id *did) { struct ov9740_priv *priv; struct soc_camera_subdev_desc *ssdd = soc_camera_i2c_to_desc(client); int ret; if (!ssdd) { dev_err(&client->dev, "Missing platform_data for driver\n"); return -EINVAL; } priv = devm_kzalloc(&client->dev,...
false
false
false
false
false
0
PyFF_Font_set_design_size(PyFF_Font *self,PyObject *value, void *closure) { double temp; if ( value==NULL ) self->fv->sf->design_size = 0; else if ( PyFloat_Check(value)) { temp = PyFloat_AsDouble(value); if ( PyErr_Occurred()!=NULL ) return( -1 ); self->fv->sf->design_size = rint(10.0*temp); } el...
false
false
false
false
false
0
log_determinant() const { REPORT BandLUMatrix C(*this); return C.log_determinant(); }
false
false
false
false
false
0
dealloc_segment(F_SEGMENT *block) { int pagesize = getpagesize(); int retval = munmap((void*)(block->start - pagesize), pagesize + block->size + pagesize); if(retval) fatal_error("dealloc_segment failed",0); free(block); }
false
false
false
false
false
0
BoxFilter(const Array3Df &in, int box_width, Array3Df *out) { Array3Df tmp; BoxFilterHorizontal(in, box_width, &tmp); BoxFilterVertical(tmp, box_width, out); }
false
false
false
false
false
0
copy_async_lcb(GObject *source_object,GAsyncResult *res,gpointer user_data) { Tcopyfile *cf = user_data; gboolean done; GError *error=NULL; /* fill in the blanks */ done = g_file_copy_finish(cf->curfile,res,&error); if (!done) { if (error->code == G_IO_ERROR_EXISTS) { gint retval; gchar *tmpstr, *...
false
false
false
false
false
0
setState(int state) { if(state == d->oldstate) return; d->oldstate = state; if(d->cvi) { d->cv->resetAnim(); d->cvi->setProfileState(state); } }
false
false
false
false
false
0
vorbis_synthesis_read(vorbis_dsp_state *v, int bytes) { if (bytes && v->pcm_returned+bytes>v->centerW) return -131; v->pcm_returned+=bytes; return 0; }
false
false
false
false
false
0
afr_recover_lock_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct gf_flock *lock) { afr_local_t *local = NULL; afr_private_t *priv = NULL; int32_t source_child = 0; struct gf_flock flock = {0,}; local = f...
false
true
false
false
false
1
gotoNextLine(char *buffer){ while(*buffer != '\n'){ *buffer++; } while(*buffer == '\n' || *buffer == '\r') *buffer++; return buffer; }
false
false
false
false
false
0
Dialog_ChooseUser(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder) : Gtk::Dialog(cobject), m_combo_name(0) { builder->get_widget_derived("combo_user_name", m_combo_name); }
false
false
false
false
false
0
gdi_ui_create_palette(struct rdp_inst * inst, FRDP_PALETTE * palette) { DEBUG_GDI("gdi_ui_create_palette"); return (FRDP_HPALETTE) gdi_CreatePalette((HGDI_PALETTE) palette); }
false
false
false
false
false
0
assign(QueuedGeometry* qgeom) { // Do we have enough space? if (mRenderOp.vertexData->vertexCount + qgeom->geometry->vertexData->vertexCount > mMaxVertexIndex) { return false; } mQueuedGeometry.push_back(qgeom); mRenderOp.vertexData->vertexCou...
false
false
false
false
false
0
sptrans_delete(SPTRANS *sptrans) { if ( sptrans ) { if ( sptrans->trig ) { free(sptrans->trig); sptrans->trig = NULL; } if ( sptrans->poli ) { free(sptrans->poli); sptrans->poli = NULL; } if ( sptrans->pold ) { free(sptrans->pold); sptrans->pold = NULL; } if ( sptrans->pol2 ) { free(spt...
false
false
false
false
false
0
fwrite4 ( long l, OFILE *f ) { uchar *p = (void*) &l ; return fwrite ( bigendian ? p + sizeof(long ) - 4 : p, 4, 1, f->f ) ; }
false
false
false
false
false
0
matrox_validate_destination( MatroxDriverData *mdrv, MatroxDeviceData *mdev, CardState *state ) { volatile u8 *mmio = mdrv->mmio_base; CoreSurface *destination = state->destination; CoreSurfaceBuffer *depth_buff...
false
false
false
false
false
0
branch_open(struct view *view, enum open_flags flags) { const char *branch_log[] = { "git", "log", ENCODING_ARG, "--no-color", "--pretty=raw", "--simplify-by-decoration", "--all", NULL }; if (!begin_update(view, NULL, branch_log, flags)) { report("Failed to load branch data"); return TRUE; } branch_open...
false
false
false
false
false
0
tdb1_wipe_all(struct tdb_context *tdb) { int i; tdb1_off_t offset = 0; ssize_t data_len; tdb1_off_t recovery_head; tdb1_len_t recovery_size = 0; if (tdb_lockall(tdb) != TDB_SUCCESS) { return -1; } /* see if the tdb has a recovery area, and remember its size if so. We don't want to lose this as otherwis...
false
false
false
false
false
0
arcmsr_hbaB_polling_ccbdone(struct AdapterControlBlock *acb, struct CommandControlBlock *poll_ccb) { struct MessageUnit_B *reg = acb->pmuB; struct ARCMSR_CDB *arcmsr_cdb; struct CommandControlBlock *ccb; uint32_t flag_ccb, poll_ccb_done = 0, poll_count = 0; int index, rtn; bool error; polling_hbb_ccb_retry:...
false
false
false
false
false
0
gst_rtspsrc_parse_rtpmap (const gchar * rtpmap, gint * payload, gchar ** name, gint * rate, gchar ** params) { gchar *p, *t; p = (gchar *) rtpmap; PARSE_INT (p, " ", *payload); if (*payload == -1) return FALSE; SKIP_SPACES (p); if (*p == '\0') return FALSE; PARSE_STRING (p, "/", *name); ...
false
false
false
false
true
1
pdfmark_PAGELABEL(gx_device_pdf * pdev, gs_param_string * pairs, uint count, const gs_matrix * pctm, const gs_param_string * no_objname) { gs_param_string key; if (pdev->CompatibilityLevel >= 1.3) { if (pdfmark_find_key("/Label", pairs, count, &key)) { return pdfmark_add_pagela...
false
false
false
false
false
0
libsmdev_scsi_ioctrl( libcfile_file_t *device_file, void *request_data, size_t request_data_size, libcerror_error_t **error ) { uint8_t *ioctrl_request = 0; static char *function = "libsmdev_scsi_ioctrl"; size_t ioctrl_request_size = 0; ssize_t read_count = 0; ioctrl_request_si...
false
false
false
false
false
0
clip_hw_small(double* val, int* mask, int min, int max, int DRS_SFF_HW_MIN) { /* this routine mask out negative half width values */ int i=0; for (i= min;i<max; i++) { if (val[i] < DRS_SFF_HW_MIN) mask[i]=0; } }
false
false
false
false
false
0
xfs_ilock_attr_map_shared( struct xfs_inode *ip) { uint lock_mode = XFS_ILOCK_SHARED; if (ip->i_d.di_aformat == XFS_DINODE_FMT_BTREE && (ip->i_afp->if_flags & XFS_IFEXTENTS) == 0) lock_mode = XFS_ILOCK_EXCL; xfs_ilock(ip, lock_mode); return lock_mode; }
false
false
false
false
false
0
execute_branch(struct Object *ast, struct Object *scope) { if (ast == NULL || ast->type != T_LIST) return NULL; struct Object* stack = clone_object(list_object); int length = mojo_list_length(ast->value.l_value); if (length == 0) return NULL; // first, execute all the sub-expressi...
false
false
false
false
false
0
egg_sm_client_get (void) { if (!global_client) { if (global_client_mode != EGG_SM_CLIENT_MODE_DISABLED && !sm_client_disable) { #if defined (GDK_WINDOWING_WIN32) global_client = egg_sm_client_win32_new (); #elif defined (GDK_WINDOWING_QUARTZ) global_client = egg_sm_client_osx_new (); #else /* I...
false
false
false
false
false
0
defineValue ( const std::string &magick_, const std::string &key_ ) const { std::string definition = magick_ + ":" + key_; const char *option = GetImageOption ( constImageInfo(), definition.c_str() ); if (option) return std::string( option ); return std::string( ...
false
false
false
false
false
0
on_expose_event(GdkEventExpose* event) { RefPtr<Gdk::Window> win = get_window(); RefPtr<GC> gc = GC::create(win); gc->set_foreground(m_color); for (unsigned i = 0; i < m_strings.size(); ++i) { int y = i * (m_height / m_strings.size()); win->draw_layout(gc, 0, y, m_strings[i]); } return true; }
false
false
false
false
false
0
insert_clef(struct SYMBOL *s, int clef_type) { struct VOICE_S *p_voice; struct SYMBOL *new_s; /* don't insert the clef between two bars */ if (s->type == BAR && s->prev != 0 && s->prev->type == BAR /* && s->time == s->prev->time */ ) s = s->prev; /* create the symbol */ p_voice = &voice_tb[s->voice]; ...
false
false
false
false
false
0
copy_hetero_dir_to_block(Block *bpt) { Directive *src; Directive *prev; Directive *next; Statement *stm; src = search_stm_hetero_directive(bpt); while (src != NULL) { prev = src->prev; next = src->next; if (next != NULL) { next->prev = prev; } ...
false
false
false
false
false
0
cp_read_tm_cut_list(cut_pool *cp, char *file) { FILE *f; int i, j, tmp1 = 0, tmp2 = 0; char str[20]; if (!(f = fopen(file, "r"))){ printf("\nError opening cut file\n\n"); return(0); } cp->size = 0; fscanf(f, "%s %i %i", str, &cp->cut_num, &cp->allocated_cut_num); cp->cuts = (cp_...
false
true
false
false
true
1
CCtrace(av) char *av[]; { char *p; BOOL Flag; STRING word; CHANNEL *cp; /* Parse the flag. */ p = av[1]; switch (p[0]) { default: return "1 Bad trace flag"; case 'y': case 'Y': Flag = TRUE; word = "on"; break; case 'n': case 'N': Flag = FALSE; word = "off"; break; } ...
false
false
false
false
false
0
reset (int fd, struct stat const *st) { if (! pagesize) { pagesize = getpagesize (); if (pagesize == 0 || 2 * pagesize + 1 <= pagesize) abort (); bufalloc = ALIGN_TO (INITIAL_BUFSIZE, pagesize) + pagesize + 1; buffer = xmalloc (bufalloc); } bufbeg = buflim = ALIGN_TO (buffer...
false
false
false
false
false
0
ali_program_modes(struct ata_port *ap, struct ata_device *adev, struct ata_timing *t, u8 ultra) { struct pci_dev *pdev = to_pci_dev(ap->host->dev); int cas = 0x58 + 4 * ap->port_no; /* Command timing */ int cbt = 0x59 + 4 * ap->port_no; /* Command timing */ int drwt = 0x5A + 4 * ap->port_no + adev->devno; /* R/W ti...
false
false
false
false
false
0
ocon_state_size(const qpol_iterator_t * iter) { ocon_state_t *os = NULL; size_t count = 0; ocontext_t *ocon = NULL; if (iter == NULL || iter->state == NULL) { errno = EINVAL; return 0; } os = (ocon_state_t *) iter->state; for (ocon = os->head; ocon; ocon = ocon->next) count++; return count; }
false
false
false
false
false
0
xmpp_stream_performtls(XmppStream *stream) { g_return_if_fail(stream != NULL); hybrid_account_set_connection_string(stream->account->account, _("Start performing tls...")); if (!(stream->ssl = hybrid_ssl_connect_with_fd( stream->sk, (ssl_callback)tls...
false
false
false
false
false
0
VisitJSFunctionAndFlushCode(Map* map, HeapObject* object) { JSFunction* jsfunction = reinterpret_cast<JSFunction*>(object); // The function must have a valid context and not be a builtin. bool flush_code_candidate = false; if (IsValidNotBuiltinContext(jsfunction->unchecked_context())) { flush_code...
false
false
false
false
false
0
parseShiftExp() { Expression *e; Expression *e2; Loc loc = token.loc; e = parseAddExp(); while (1) { switch (token.value) { case TOKshl: nextToken(); e2 = parseAddExp(); e = new ShlExp(loc,e,e2); continue; case TOKshr: nextToken(); e2 = parseAddExp(); ...
false
false
false
false
false
0
alt_match_null_string_p (p, end, reg_info) unsigned char *p, *end; register_info_type *reg_info; { int mcnt; unsigned char *p1 = p; while (p1 < end) { /* Skip over opcodes that can match nothing, and break when we get to one that can't. */ switch ((re_opcode_t) *p1) { ...
false
false
false
false
false
0
_enable_per_message_authentication_commit (const char *section_name, const struct config_keyvalue *kv, void *arg) { bmc_config_state_data_t *state_data; struct channel_access ch; config_err_t ret; assert (section_name); ass...
false
false
false
false
false
0
setup_idle_tx_channel (hrz_dev * dev, hrz_vcc * vcc) { unsigned short idle_channels; short tx_channel = -1; unsigned int spin_count; PRINTD (DBG_FLOW|DBG_TX, "setup_idle_tx_channel %p", dev); // better would be to fail immediately, the caller can then decide whether // to wait or drop (depending on wheth...
false
false
false
false
false
0
mono_lookup_jit_icall_symbol (const char *name) { MonoJitICallInfo *info; const char *res = NULL; mono_icall_lock (); info = g_hash_table_lookup (jit_icall_hash_name, name); if (info) res = info->c_symbol; mono_icall_unlock (); return res; }
false
false
false
false
false
0
_displayAlternatives() throw(Exception, std::bad_alloc) { _checkThesaurus(); vector<string> words; for(const char* r = d_thesaurus.similar(); r[0]; r = d_thesaurus.similar()) { _checkThesaurus(); words.push_back(r); } _createMeaning("N...
false
false
false
false
false
0
display_update_display (WINDOW *window) { register WINDOW *win; display_was_interrupted_p = 0; /* For every window in the list, check contents against the display. */ for (win = window; win; win = win->next) { /* Only re-display visible windows which need updating. */ if (((win->flags & W_Wind...
false
false
false
false
false
0
f_complete(argvars, rettv) typval_T *argvars; typval_T *rettv UNUSED; { int startcol; if ((State & INSERT) == 0) { EMSG(_("E785: complete() can only be used in Insert mode")); return; } /* Check for undo allowed here, because if something was already inserted * the line was alre...
false
false
false
false
false
0
gwy_data_line_clear(GwyDataLine *data_line) { g_return_if_fail(GWY_IS_DATA_LINE(data_line)); gwy_clear(data_line->data, data_line->res); }
false
false
false
false
false
0
zzjson_free(ZZJSON_CONFIG *config, ZZJSON *zzjson) { while (zzjson) { ZZJSON *next; switch(zzjson->type) { case ZZJSON_OBJECT: config->free(zzjson->value.object.label); zzjson_free(config, zzjson->value.object.val); break; case ...
false
false
false
false
false
0
visit_enter(ir_loop *ir) { ir_discard *discard = find_unconditional_discard(ir->body_instructions); if (discard) { ir->replace_with(discard); return visit_continue_with_parent; } return visit_continue; }
false
false
false
false
false
0
mutate_population( APG::ConstraintSolver::Population& population ) { if ( population.size() < 1 ) return; const double mutantPercentage = 0.35; // TODO: tune this parameter QList<Meta::TrackList*> parents( population.keys() ); int maxMutants = (int)( mutantPercentage * (double)(m_popul...
false
false
false
false
false
0
main (int argc, char *argv[]) { char FileName[PATH_MAX]; int Param; if (argc < 2) { usage (); return 1; } printf ("Binary hive maker: %s\n", argv[3]); RegInitializeRegistry (); convert_path (FileName, argv[1]); ImportRegistryFile (FileName); convert_path (FileName, argv[2]); if (!ExportBinaryHive (F...
true
true
false
false
false
1
S_sublex_start(pTHX) { dVAR; const I32 op_type = pl_yylval.ival; if (op_type == OP_NULL) { pl_yylval.opval = PL_lex_op; PL_lex_op = NULL; return THING; } if (op_type == OP_CONST || op_type == OP_READLINE) { SV *sv = tokeq(PL_lex_stuff); if (SvTYPE(sv) == SVt_PVIV) { /* Overloaded constan...
false
false
false
false
false
0
sr030pc30_set_params(struct v4l2_subdev *sd) { struct sr030pc30_info *info = to_sr030pc30(sd); int ret; if (!info->curr_win) return -EINVAL; /* Configure the resolution through subsampling */ ret = cam_i2c_write(sd, VDO_CTL1_REG, info->curr_win->vid_ctl1); if (!ret && info->curr_fmt) ret = cam_i2c_w...
false
false
false
false
false
0
menu_mode_receive (GtkWidget *widget, gpointer data) { if (((struct s_main_data *) data)->mode != MOD_RECEIVE) { parse_receive ((struct s_main_data *)data); if (((struct s_main_data *) data)->mode == MOD_SEND) gtk_widget_hide (((struct s_main_data *) data)->container_send); else gtk_widget_hi...
false
false
false
false
false
0
app_aboutToQuit() { while(man) { qApp->processEvents(QEventLoop::WaitForMoreEvents); } }
false
false
false
false
false
0
prepareDiscogsUrls( QXmlStreamReader &xml ) { while( !xml.atEnd() && !xml.hasError() ) { xml.readNext(); if( !xml.isStartElement() || xml.name() != "release" ) continue; const QString releaseId = xml.attributes().value( "id" ).toString(); while( !xml.atEnd() && !xml....
false
false
false
false
false
0
PyCData_set(PyObject *dst, PyObject *type, SETFUNC setfunc, PyObject *value, Py_ssize_t index, Py_ssize_t size, char *ptr) { CDataObject *mem = (CDataObject *)dst; PyObject *result; if (!CDataObject_Check(dst)) { PyErr_SetString(PyExc_TypeError, "not a ctype instan...
false
false
false
false
false
0
gui_object_move(struct gui_object *obj, int newx, int newy) { if (newx < 0) newx = 0; if (newy < 0) newy = 0; gtk_layout_move(GTK_LAYOUT(canvas), obj->labelw, newx + obj->widget->allocation.width - obj->labelw->allocation.width, newy - 30); gtk_layout_move(GTK_LAYOUT(canvas), obj->widget, newx, newy); if (obj->...
false
false
false
false
false
0