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
uih_smoothmorph(struct uih_context *c, dialogparam * p) { if (!c->playc) return; switch (p[0].dint) { case 0: c->playc->morphtimes[0] = p[1].dint; c->playc->morphtimes[1] = p[2].dint; break; case 1: c->playc->morphjuliatimes[0] = p[1].dint; c->playc->morphjuliatimes[1] = p[2].dint; break; cas...
false
false
false
false
false
0
overlay_subtree_check(struct device_node *tree, struct device_node *dn) { struct device_node *child; /* match? */ if (tree == dn) return 1; for_each_child_of_node(tree, child) { if (overlay_subtree_check(child, dn)) { of_node_put(child); return 1; } } return 0; }
false
false
false
false
false
0
build_aggregate_finalfn_expr(Oid *agg_input_types, int num_finalfn_inputs, Oid agg_state_type, Oid agg_result_type, Oid agg_input_collation, Oid finalfn_oid, Expr **finalfnexpr) { Param *argp; List *args; int i; /* * Build expr tree for final function */ ...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__eda__Row_SetQueryParam(struct __ecereNameSpace__ecere__com__Instance * this, int paramID, int value) { struct __ecereNameSpace__eda__Row * __ecerePointer___ecereNameSpace__eda__Row = (struct __ecereNameSpace__eda__Row *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__eda__Row->o...
false
false
false
true
false
1
ns_parse_port_string(const char *str, union socket_address *sa) { unsigned int a, b, c, d, port; int len = 0; #ifdef NS_ENABLE_IPV6 char buf[100]; #endif // MacOS needs that. If we do not zero it, subsequent bind() will fail. // Also, all-zeroes in the socket address means binding to all addresses // for b...
true
true
false
false
false
1
AP_UnixTopRuler(XAP_Frame * pFrame) : AP_TopRuler(pFrame) { m_rootWindow = NULL; m_wTopRuler = NULL; m_pG = NULL; // change ruler color on theme change GtkWidget * toplevel = static_cast<XAP_UnixFrameImpl *>(pFrame->getFrameImpl())->getTopLevelWindow(); m_iStyleID = g_signal_connect_after (G_OBJECT(toplevel), #...
false
false
false
false
false
0
ocfs2_local_alloc_seen_free_bits(struct ocfs2_super *osb, unsigned int num_clusters) { spin_lock(&osb->osb_lock); if (osb->local_alloc_state == OCFS2_LA_DISABLED || osb->local_alloc_state == OCFS2_LA_THROTTLED) if (num_clusters >= osb->local_alloc_default_bits) { cancel_delayed_work(&osb->la_enabl...
false
false
false
false
false
0
onCaptureLost(WindowEventArgs& e) { // reset auto-repeat state d_repeatButton = NoButton; // handle restore of previous capture window as required. if (d_restoreOldCapture && (d_oldCapture != 0)) { d_oldCapture->onCaptureLost(e); d_oldCapture = 0; } // handle case where mouse i...
false
false
false
false
false
0
SyncMIR(void) { switch (mode & 3) { case 0: { setmirror((vrc2_mirr & 1) ^ 1); break; } case 1: { setmirror((mmc3_mirr & 1) ^ 1); break; } case 2: case 3: { switch (mmc1_regs[0] & 3) { case 0: setmirror(MI_0); break; case 1: setmirror(MI_1); break; case 2: setmirror(MI_V); break; ...
false
false
false
false
false
0
brasero_drive_properties_set_drive (BraseroDriveProperties *self, BraseroDrive *drive, gint64 default_rate) { BraseroDrivePropertiesPrivate *priv; BraseroMedium *medium; BraseroMedia media; GtkTreeModel *model; GtkTreeIter iter; guint64 *rates; gchar *text; guint i; priv = BRASERO_DRIVE_PROPER...
false
false
false
false
false
0
em28xx_i2c_register(struct em28xx *dev, unsigned bus, enum em28xx_i2c_algo_type algo_type) { int retval; BUG_ON(!dev->em28xx_write_regs || !dev->em28xx_read_reg); BUG_ON(!dev->em28xx_write_regs_req || !dev->em28xx_read_reg_req); if (bus >= NUM_I2C_BUSES) return -ENODEV; dev->i2c_adap[bus] = em28xx_adap_tem...
false
false
false
false
false
0
parse_fixscreen(void) { char *str, *p; screen_fixup_V = 0.0; screen_fixup_C = 0.0; screen_fixup_X = 0.0; screen_fixup_8 = 0.0; if (! screen_fixup_str) { return; } str = strdup(screen_fixup_str); p = strtok(str, ","); while (p) { double t; if (*p == 'V' && sscanf(p, "V=%lf", &t) == 1) { screen_fix...
false
false
false
false
false
0
get_bg_tile_info(int tile_index) { int attr = colorram[tile_index]; int bank = (attr & 0x04) ? 0 : (1 + gfxbank); int code = videoram[tile_index] + 256 * (attr & 0x03); int color = (attr & 0xf0) >> 4; tile_info.priority = (attr & 0x08) >> 3; SET_TILE_INFO(bank, code, color, 0) }
false
false
false
false
false
0
_blk_null_error(TDSBCPINFO *bcpinfo, int index, int offset) { CS_BLKDESC *blkdesc = (CS_BLKDESC *) bcpinfo->parent; tdsdump_log(TDS_DBG_FUNC, "_blk_null_error(%p, %d, %d)\n", bcpinfo, index, offset); _ctclient_msg(blkdesc->con, "blk_rowxfer", 2, 7, 1, 142, "%d, %d", index + 1, offset + 1); }
false
false
false
false
false
0
divasa_remap_pci_bar(diva_os_xdi_adapter_t *a, int id, unsigned long bar, unsigned long area_length) { void __iomem *ret = ioremap(bar, area_length); DBG_TRC(("remap(%08x)->%p", bar, ret)); return (ret); }
false
false
false
false
false
0
lio_process_iq_request_list(struct octeon_device *oct, struct octeon_instr_queue *iq) { int reqtype; void *buf; u32 old = iq->flush_index; u32 inst_count = 0; unsigned pkts_compl = 0, bytes_compl = 0; struct octeon_soft_command *sc; struct octeon_instr_irh *irh; while (old != iq->octeon_read_index) { ...
false
false
false
false
false
0
list_ldm_partitions_stub (XDR *xdr_in) { char **r; /* The caller should have checked before calling this. */ if (! optgroup_ldm_available ()) { reply_with_error_errno (ENOTSUP, "feature '%s' is not available in this\n" "build of libguestfs. Read 'AVAILABILITY' in the guestfs(3) man page for\n"...
false
false
false
false
false
0
php_posix_stream_get_fd(zval *zfp, int *fd TSRMLS_DC) /* {{{ */ { php_stream *stream; php_stream_from_zval_no_verify(stream, &zfp); if (stream == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "expects argument 1 to be a valid stream resource"); return 0; } if (php_stream_can_cast(stream, PHP_STREAM_AS_...
false
false
false
false
false
0
GetIndexMatrix(vtkInformation *inInfo, vtkInformation *outInfo) { // first verify that we have to update the matrix if (this->IndexMatrix == NULL) { this->IndexMatrix = vtkMatrix4x4::New(); } int isIdentity = 0; double inOrigin[3]; double inSpacing[3]...
false
false
false
false
false
0
CharacterDataHandler ( void * userData, XMP_StringPtr cData, int len ) { ExpatAdapter * thiz = (ExpatAdapter*)userData; if ( (cData == 0) || (len == 0) ) { cData = ""; len = 0; } #if XMP_DebugBuild & DumpXMLParseEvents if ( thiz->parseLog != 0 ) { PrintIndent ( thiz->parseLog, thiz->elemNesting ); fprint...
false
false
false
false
false
0
genl_parse_getfamily(struct nlmsghdr *nlh) { struct rtattr *tb[CTRL_ATTR_MAX + 1]; struct genlmsghdr *ghdr = NLMSG_DATA(nlh); int len = nlh->nlmsg_len; struct rtattr *attrs; if (nlh->nlmsg_type != GENL_ID_CTRL) { fprintf(stderr, "Not a controller message, nlmsg_len=%d " "nlmsg_type=0x%x\n", nlh->nlmsg_len, n...
false
false
false
false
false
0
SetTimebaseCallback(int conditional, JackTimebaseCallback timebase_callback, void* arg) { int result = -1; fChannel->SetTimebaseCallback(GetClientControl()->fRefNum, conditional, &result); if (result == 0) { GetClientControl()->fTransportTimebase = true; fTimebase = timebase_callback; ...
false
false
false
false
false
0
notify_get_server_caps (void) { GDBusProxy *proxy; GVariant *result; char **cap, **caps; GList *list = NULL; proxy = _notify_get_proxy (NULL); if (proxy == NULL) { g_warning ("Failed to connect to proxy"); return NULL; ...
false
false
false
false
false
0
cmd_starttls(int nntps) { int result; int *layerp; sasl_ssf_t ssf; char *auth_id; if (nntp_starttls_done == 1) { prot_printf(nntp_out, "502 %s\r\n", "TLS is already active"); return; } if (nntp_authstate) { prot_printf(nntp_out, "502 %s\r\n", "Already authenticated"); retu...
false
false
false
false
false
0
H5FD_mpi_comm_info_dup(MPI_Comm comm, MPI_Info info, MPI_Comm *comm_new, MPI_Info *info_new) { herr_t ret_value=SUCCEED; MPI_Comm comm_dup=MPI_COMM_NULL; MPI_Info info_dup=MPI_INFO_NULL; int mpi_code; FUNC_ENTER_NOAPI(FAIL) /* Check arguments */ if (MPI_COMM_NULL == comm) HGOTO_ERROR(H5E...
false
false
false
false
false
0
actions_interactive_cancel_act(void) { if (interactive_act) { if (interactive_act->i_cancel) interactive_act->i_cancel(interactive_act->options); actions_interactive_end_act(); } }
false
false
false
false
false
0
hdmi_dv_timings_cap(struct v4l2_subdev *sd, struct v4l2_dv_timings_cap *cap) { struct hdmi_device *hdev = sd_to_hdmi_dev(sd); if (cap->pad != 0) return -EINVAL; /* Let the phy fill in the pixelclock range */ v4l2_subdev_call(hdev->phy_sd, pad, dv_timings_cap, cap); cap->type = V4L2_DV_BT_656_1120; cap->bt.mi...
false
false
false
false
false
0
wm8350_client_dev_register(struct wm8350 *wm8350, const char *name, struct platform_device **pdev) { int ret; *pdev = platform_device_alloc(name, -1); if (*pdev == NULL) { dev_err(wm8350->dev, "Failed to allocate %s\n", name); return; } (*pdev)->dev.parent = wm8350->dev; platform_set_d...
false
false
false
false
false
0
Compare(MovieRecord& compareRec) { //Joysticks, Zappers, and commands if (this->commands != compareRec.commands) return false; if ((*(uint32*)&(this->joysticks)) != (*(uint32*)&(compareRec.joysticks))) return false; if (memcmp(this->zappers, compareRec.zappers, sizeof(zappers))) return false; /*...
false
false
false
false
false
0
write_to_bearerbox_real(Connection *conn, Msg *pmsg) { Octstr *pack; pack = msg_pack(pmsg); if (conn_write_withlen(conn, pack) == -1) error(0, "Couldn't write Msg to bearerbox."); msg_destroy(pmsg); octstr_destroy(pack); }
false
false
false
false
false
0
event_inside(const Fl_Widget *o) /*const*/ { int mx = e_x - o->x(); int my = e_y - o->y(); return (mx >= 0 && mx < o->w() && my >= 0 && my < o->h()); }
false
false
false
false
false
0
nfs_is_exclusive_create(struct inode *dir, unsigned int flags) { if (NFS_PROTO(dir)->version == 2) return 0; return flags & LOOKUP_EXCL; }
false
false
false
false
false
0
singleipconnect(struct connectdata *conn, const Curl_addrinfo *ai, curl_socket_t *sockp) { struct Curl_sockaddr_ex addr; int rc; int error = 0; bool isconnected = FALSE; struct SessionHandle *data = conn->data; curl_socket_t sockfd; CURLcode res = CURLE_OK; char ipaddress...
true
true
false
false
false
1
if_register_send (info) struct interface_info *info; { /* If we're using the lpf API for sending and receiving, we don't need to register this interface twice. */ #ifndef USE_LPF_RECEIVE info -> wfdesc = if_register_lpf (info); #else info -> wfdesc = info -> rfdesc; #endif if (!quiet_interface_discovery) log...
false
false
false
false
false
0
tf_iputlongp(int32 pnum, int32 lowvalue, int32 highvalue, char *inst) { int32 rv; struct tfinst_t *sav_tfip; struct tfrec_t *sav_tfrp; set_tfinst_(inst, sav_tfip, sav_tfrp); __push_itstk(__tfinst->tfitp); rv = tf_putlongp(pnum, lowvalue, highvalue); __pop_itstk(); __tfinst = sav_tfip; __tfrec = sav_tfrp; ret...
false
false
false
false
false
0
H5P__cmp_plist_cb(H5P_genprop_t *prop, void *_udata) { H5P_plist_cmp_ud_t *udata = (H5P_plist_cmp_ud_t *)_udata; /* Pointer to user data */ htri_t prop2_exist; /* Whether the property exists in the second property list */ int ret_value = H5_ITER_CONT; /* Return value */ FUNC_ENT...
false
false
false
false
false
0
tp_set_timers(struct adapter *adap, unsigned int core_clk) { unsigned int tre = fls(core_clk / (1000000 / TP_TMR_RES)) - 1; unsigned int dack_re = fls(core_clk / 5000) - 1; /* 200us */ unsigned int tstamp_re = fls(core_clk / 1000); /* 1ms, at least */ unsigned int tps = core_clk >> tre; t3_write_reg(adap, A_TP_TI...
false
false
false
false
false
0
gcgcef_getdyn(CGCEf_Data *src, int ndx, GCGCEf_Dyn *dst) { GCGCEf_Dyn buf; unsigned cls; char *tmp; if (!dst) { dst = &buf; } tmp = get_addr_and_class(src, ndx, CGCEF_T_DYN, &cls); if (!tmp) { return NULL; } if (cls == CGCEFCLASS64) { *dst = *(CGCEf64_Dyn*)tmp; } else if ...
false
false
false
false
false
0
StripQuotes( string oInput ) { char *pszResult; if( oInput.length() < 2 ) return oInput; oInput = oInput.substr(1,oInput.length()-2); pszResult = CPLUnescapeString( oInput.c_str(), NULL, CPLES_BackslashQuotable ); oInput = pszResult; CPLFree(...
false
false
false
false
false
0
rfio_handle_access(const char *sfn, int mode, const char *mech, const char *principal, uid_t uid, gid_t gid, int *need_user_check) { char **fqan = NULL; int nbfqans = 0; char *p; char sfn1[CA_MAXSFNLEN+1]; struct stat64 st; char *user_ca; char *voname = NULL; if (stat...
false
false
false
false
false
0
nvm_erase_ppa(struct nvm_dev *dev, struct ppa_addr *ppas, int nr_ppas) { struct nvm_rq rqd; int ret; if (!dev->ops->erase_block) return 0; memset(&rqd, 0, sizeof(struct nvm_rq)); ret = nvm_set_rqd_ppalist(dev, &rqd, ppas, nr_ppas); if (ret) return ret; nvm_generic_to_addr_mode(dev, &rqd); ret = dev->op...
false
false
false
false
false
0
wind_utf8ucs2(const char *in, uint16_t *out, size_t *out_len) { const unsigned char *p; size_t o = 0; int ret; for (p = (const unsigned char *)in; *p != '\0'; ++p) { uint32_t u; ret = utf8toutf32(&p, &u); if (ret) return ret; if (u & 0xffff0000) return WIND_ERR_NOT_UTF16; if (out) { ...
false
false
false
false
false
0
put( const KUrl& url, int permissions, JobFlags flags ) { KIO_ARGS << url << qint8( (flags & Overwrite) ? 1 : 0 ) << qint8( (flags & Resume) ? 1 : 0 ) << permissions; return TransferJobPrivate::newJob(url, CMD_PUT, packedArgs, QByteArray(), flags); }
false
false
false
false
false
0
L5() {register object *base=vs_base; register object *sup=base+VM5; VC5 vs_check; vs_top=sup; goto TTL; TTL:; (((object)VV[2])->s.s_dbind)= make_cons(Cnil,Cnil); base[0]= Cnil; vs_top=(vs_base=base+0)+1; return; }
false
false
false
false
false
0
addrcache_allgrp_rem_email_vis( gpointer key, gpointer value, gpointer data ) { AddrItemObject *obj = ( AddrItemObject * ) value; ItemEMail *email = ( ItemEMail * ) data; if( ! email ) return; if( ADDRITEM_TYPE(obj) == ITEMTYPE_GROUP ) { ItemGroup *group = ( ItemGroup * ) value; if( group ) { /* Remove each...
false
false
false
false
false
0
AlreadyRequested(size_t idx) const { PEERNODE *p; for( p = m_head; p; p = p->next ){ if( !PEER_IS_SUCCESS(p->peer) || p->peer->request_q.IsEmpty()) continue; if( p->peer->request_q.HasIdx(idx) ) return 1; } return 0; }
false
false
false
false
false
0
highlight_list_arg(id, didh, type, iarg, sarg, name) int id; int didh; int type; int iarg; char_u *sarg; char *name; { char_u buf[100]; char_u *ts; int i; if (got_int) return FALSE; if (type == LIST_STRING ? (sarg != NULL) : (iarg != 0)) { ts = buf; if (type == L...
false
false
false
false
false
0
pr_any_valsx( const ncvar_t *vp, /* variable */ size_t len, /* number of values to print */ boolean more, /* true if more data for this row will * follow, so add trailing comma */ boolean lastrow, /* true if this is the last row for this * variable, so terminate with ";" instead *...
false
false
false
false
false
0
EvaluateLocation( int & subId, double pcoords[3], double x[3], double * weights ) { int i; int numPnts; double tmpWgts[4]; vtkIdType pntIndx; for ( i = 0; i < 4; i ++ ) { pntIndx = this->PointIds ->GetId( this->TetraIds->Ge...
false
false
false
false
false
0
alloc_trim(mstate m, size_t pad) { size_t released = 0; if (pad < MAX_REQUEST && is_initialized(m)) { pad += TOP_FOOT_SIZE; /* ensure enough room for segment overhead */ if (m->topsize > pad) { /* Shrink top space in granularity-size units, keeping at least one */ size_t unit = DEFAULT_GRANULAR...
false
false
false
false
false
0
kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { struct fb_info *info; struct kyrofb_info *currentpar; unsigned long size; int err; if ((err = pci_enable_device(pdev))) { printk(KERN_WARNING "kyrofb: Can't enable pdev: %d\n", err); return err; } info = framebuffer_alloc(sizeof(struct k...
false
false
false
false
false
0
zrleOutStreamCheck(zrleOutStream *os, int size) { if (os->in.ptr + size > os->in.end) { return zrleOutStreamOverrun(os, size); } return size; }
false
false
false
false
false
0
aiSetImportPropertyString(aiPropertyStore* p, const char* szName, const C_STRUCT aiString* st) { if (!st) { return; } ASSIMP_BEGIN_EXCEPTION_REGION(); PropertyMap* pp = reinterpret_cast<PropertyMap*>(p); SetGenericProperty<std::string>(pp->strings,szName,std::string(st->C_Str()),NULL); ASSIMP_END_EXCEPTION_REG...
false
false
false
false
false
0
Extrapolate( REAL dt ) { tASSERT( extrapolator_ ); #ifdef DEBUG eCoord posBefore = extrapolator_->Position(); #endif // calculate target time REAL newTime = extrapolator_->LastTime() + dt; bool ret = false; // clamp: don't simulate further than our current time if ( newTime >= lastTime )...
false
false
false
false
false
0
_set_entry_text_from_path(GtkEntry *entry, FmPathEntryPrivate *priv) { char *disp_name; FmPath *path = priv->path; disp_name = fm_path_display_name(path, FALSE); /* block our handler for "changed" signal, we'll update it below */ if(priv->id_changed > 0) g_signal_handler_block(entry, priv->...
false
false
false
false
false
0
set_rx_mode(struct net_device *dev) { struct epic_private *ep = netdev_priv(dev); void __iomem *ioaddr = ep->ioaddr; unsigned char mc_filter[8]; /* Multicast hash filter */ int i; if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */ ew32(RxCtrl, 0x002c); /* Unconditionally log net taps. */ memset(mc_f...
false
false
false
false
false
0
gst_multiudpsink_setup_qos_dscp (GstMultiUDPSink * sink, GSocket * socket) { /* don't touch on -1 */ if (sink->qos_dscp < 0) return; if (socket == NULL) return; #ifdef IP_TOS { gint tos; gint fd; fd = g_socket_get_fd (socket); GST_DEBUG_OBJECT (sink, "setting TOS to %d", sink->qos_ds...
false
false
false
false
false
0
event_base_got_break(struct event_base *event_base) { int res; EVBASE_ACQUIRE_LOCK(event_base, th_base_lock); res = event_base->event_break; EVBASE_RELEASE_LOCK(event_base, th_base_lock); return res; }
false
false
false
true
false
1
gpg_verify (GMimeCryptoContext *context, GMimeDigestAlgo digest, GMimeStream *istream, GMimeStream *sigstream, GError **err) { #ifdef ENABLE_CRYPTOGRAPHY GMimeGpgContext *ctx = (GMimeGpgContext *) context; GMimeSignatureList *signatures; struct _GpgCtx *gpg; gpg = gpg_ctx_new (ctx); gpg_ctx_set_mode (g...
false
false
false
false
false
0
CreateSharedInvalidationState(void) { Size size; int i; bool found; /* Allocate space in shared memory */ size = offsetof(SISeg, procState); size = add_size(size, mul_size(sizeof(ProcState), MaxBackends)); shmInvalBuffer = (SISeg *) ShmemInitStruct("shmInvalBuffer", size, &found); if (found) return; ...
false
false
false
false
false
0
int340x_thermal_zone_add(struct acpi_device *adev, struct thermal_zone_device_ops *override_ops) { struct int34x_thermal_zone *int34x_thermal_zone; acpi_status status; unsigned long long trip_cnt; int trip_mask = 0, i; int ret; int34x_thermal_zone = kzalloc(sizeof(*int34x_thermal_zone), GFP_KERNEL)...
false
false
false
false
false
0
ur_addr_map_del(ur_addr_map* map, ioa_addr* key,ur_addr_map_func delfunc) { if(!ur_addr_map_valid(map)) return 0; else { addr_list_header* slh = get_addr_list_header(map, key); int counter=0; addr_list_remove(slh, key, delfunc, &counter); return (counter>0); } }
false
false
false
false
false
0
doSelectAll() { if (d->e->hasFocus()) d->e->selectAll(); else d->c->selectAll(); updateActionsLater(); }
false
false
false
false
false
0
insert_extent_backref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 bytenr, u64 parent, u64 root_objectid, u64 owner, u64 offset, int refs_to_add) { int ret; if (owner < BTRFS_FIRST_FREE_OBJECTID) { BUG_ON(refs_to_add != 1); ret = insert_tree_block_ref...
false
false
false
false
false
0
send_umode(struct Client *client_p, struct Client *source_p, int old, int sendmask, char *umode_buf) { int i; int flag; char *m; int what = 0; /* * build a string in umode_buf to represent the change in the user's * mode between the new (source_p->flag) and 'old'. */ m = umode_buf; *m = '\0'; for(i = 0;...
false
false
false
false
false
0
luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name) { LoadState S; if (*name=='@' || *name=='=') S.name=name+1; else if (*name==LUA_SIGNATURE[0]) S.name="binary string"; else S.name=name; S.L=L; S.Z=Z; S.b=buff; LoadHeader(&S); return LoadFunction(&S,luaS_newliteral(L,"=?")); }
false
false
false
false
false
0
main(int argc, char **argv) { struct msg_data all_msgs, msg; struct store *ctx = NULL; int uid = 0; int ofs = 0; int r; int total, n = 0; int nongit_ok; /* init the random number generator */ arc4_init(); setup_git_directory_gently(&nongit_ok); git_config(git_imap_config, NULL); if (!server.port) serve...
false
false
false
false
false
0
GetFileSet() { FileSet *fset=file_set.borrow(); return fset?fset:new FileSet; }
false
false
false
false
false
0
do_update(Vfs_handle *handle, char *key, char **ermsg) { int st; char *tempfile, *new_ptr, *ptr; size_t length, new_length, nwritten; FILE *fp; if (vfs_get(handle, key, (void *) &ptr, &length) == -1) return(-1); tempfile = create_temp_filename(NULL); if ((fp = create_temp_file(tempfile)) == NULL) { fp...
false
false
false
false
false
0
assuan_send_data (assuan_context_t ctx, const void *buffer, size_t length) { if (!ctx) return _assuan_error (ctx, GPG_ERR_ASS_INV_VALUE); if (!buffer && length > 1) return _assuan_error (ctx, GPG_ERR_ASS_INV_VALUE); if (!buffer) { /* flush what we have */ _assuan_cookie_write_flush (ctx); ...
false
false
false
false
false
0
xtensa_end (void) { directive_balance (); xtensa_flush_pending_output (); past_xtensa_end = TRUE; xtensa_move_literals (); xtensa_reorder_segments (); xtensa_cleanup_align_frags (); xtensa_fix_target_frags (); if (workaround_a0_b_retw && has_a0_b_retw) xtensa_fix_a0_b_retw_frags (); if (workaro...
false
false
false
false
false
0
get_sb_mtd_compare(struct super_block *sb, void *_mtd) { struct mtd_info *mtd = _mtd; if (sb->s_mtd == mtd) { pr_debug("MTDSB: Match on device %d (\"%s\")\n", mtd->index, mtd->name); return 1; } pr_debug("MTDSB: No match, device %d (\"%s\"), device %d (\"%s\")\n", sb->s_mtd->index, sb->s_mtd->n...
false
false
false
false
false
0
WarpBlob(int x, int y, int radius, int height, int page) { int cx, cy; int left,top,right,bottom; int square; int radsquare = radius * radius; radsquare = (radius*radius); height = height>>5; left=-radius; right = radius; top=-radius; bottom = radius; CLIP_EDGES for(cy = top; cy < botto...
false
false
false
false
false
0
convert_keyname(const cfg_obj_t *keyobj, isc_log_t *lctx, isc_mem_t *mctx, dns_name_t *dnsname) { isc_result_t result; isc_buffer_t buf; dns_fixedname_t fixname; unsigned int keylen; const char *txtname = cfg_obj_asstring(keyobj); keylen = strlen(txtname); isc_buffer_constinit(&buf, txtname, keylen); isc_buf...
false
false
false
false
false
0
PowCyc ( Obj opL, Obj opR ) { Obj pow; /* power (result) */ Int exp; /* exponent (right operand) */ UInt n; /* order of the field */ Obj * ...
false
false
false
false
false
0
j2k_read_eoc(opj_j2k_t *j2k) { int i, tileno; opj_bool success = OPJ_FALSE; /* if packets should be decoded */ if (j2k->cp->limit_decoding != DECODE_ALL_BUT_PACKETS) { opj_tcd_t *tcd = tcd_create(j2k->cinfo); tcd_malloc_decode(tcd, j2k->image, j2k->cp); for (i = 0; i < j2k->cp->tileno_size; i++) { tcd_mal...
false
false
false
false
false
0
nextin(Agraph_t *g, Agedge_t *e) { Agnode_t *n; Agedge_t *ne; if (!g || !e) return NULL; ne = agnxtin(g, e); if (ne) return (ne); n = agnxtnode(g, aghead(e)); if (!n) return NULL; return agfstin(g, n); }
false
false
false
false
false
0
getMemset(SDValue Chain, DebugLoc dl, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, bool isVol, const Value *DstSV, uint64_t DstSVOff) { // Check to see if we should lower the memset to stores first. // For ca...
false
false
false
false
false
0
test3 (int (*testfunc)(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t), const char *foo, mpfr_prec_t prec, mpfr_rnd_t rnd) { mpfr_t ref1, ref2, ref3; mpfr_t res1; int i; #ifdef DEBUG printf("checking %s\n", foo); #endif mpfr_init2 (ref1, prec); mpfr_init2 (ref2, prec); mpfr_init2 (ref3, prec); m...
false
false
false
false
false
0
SetGraphicView (GraphicView* gv) { Perspective np = *perspective; GetEditor()->GetSelection()->Clear(); delete _viewerView; delete _gview; _gview = gv; _viewerView = new ViewerView(_gview, _page, _grid, this); _graphic = _viewerView->GetGraphic(); _damage->SetGraphic(_graphic); _da...
false
false
false
false
false
0
getValue(const real_t& x, const size_t& i) const { Vector<real_t> values(__degree+1); this->getValues(x,values); return values[i]; }
false
false
false
false
false
0
gst_rtp_base_payload_push (GstRTPBasePayload * payload, GstBuffer * buffer) { GstFlowReturn res; res = gst_rtp_base_payload_prepare_push (payload, buffer, FALSE); if (G_LIKELY (res == GST_FLOW_OK)) { if (G_UNLIKELY (payload->priv->pending_segment)) { gst_pad_push_event (payload->srcpad, payload->priv-...
false
false
false
false
false
0
SendChatRoomsList(RakNetGUID target) { BitStream bsOut; bsOut.WriteCasted<MessageID>(ID_RELAY_PLUGIN); bsOut.WriteCasted<MessageID>(RPE_GET_GROUP_LIST_REPLY_FROM_SERVER); bsOut.WriteCasted<uint16_t>(chatRooms.Size()); for (unsigned int i=0; i < chatRooms.Size(); i++) { bsOut.WriteCompressed(chatRooms[i]...
false
false
false
false
false
0
cmd_iother (int interactive UNUSED, struct cmdarg **args UNUSED) { rp_window *cur, *w = NULL; cur = current_window(); if (cur) w = group_last_window_by_class_complement (rp_current_group, cur->res_class); if (!w) return cmdret_new (RET_FAILURE, "%s", MESSAGE_NO_OTHER_WINDOW); else set_active_win...
false
false
false
false
false
0
mouseMoveEvent( QMouseEvent *event ) { if ( !( event->buttons() & Qt::LeftButton ) ) return; QString anchor = text(); if ( !anchor.isEmpty() ) { QDrag *drag = new QDrag( this ); QMimeData *mimeData = new QMimeData(); mimeData->setData( "item/type", QByteArray::number( m...
false
false
false
false
false
0
dequeue(KResolver *obj) { QMutexLocker locker(&mutex); dequeueNew(obj); }
false
false
false
false
false
0
make_assign_statement(Statement *spt, Var_table *vpt, int var) { Statement *bb_spt; Quadruple *bb_qrpt; Operand *assign_opt; bb_spt = copy_statement(spt); bb_qrpt = bb_spt->qr_head; for (; bb_qrpt->next != NULL;) { unlink_qr(bb_qrpt->next); } bb_spt->ope = OPE_ASSIGN; bb_spt-...
false
false
false
false
false
0
StringCharacterPosition( String* subject, int start_index) { // Not just flat, but ultra flat. ASSERT(subject->IsExternalString() || subject->IsSeqString()); ASSERT(start_index >= 0); ASSERT(start_index <= subject->length()); if (subject->IsAsciiRepresentation()) { const byte* address; if (Str...
false
false
false
false
false
0
st_force_shutdown(struct autofs_point *ap) { int exp; debug(ap->logopt, "state %d path %s", ap->state, ap->path); assert(ap->state == ST_READY || ap->state == ST_EXPIRE); ap->state = ST_SHUTDOWN_FORCE; /* Unmount everything */ exp = expire_proc(ap, 1); switch (exp) { case EXP_ERROR: case EXP_PARTIAL: /* I...
false
false
false
false
false
0
udf_opendir(const udf_dirent_t *p_udf_dirent) { if (p_udf_dirent->b_dir && !p_udf_dirent->b_parent && p_udf_dirent->fid) { udf_t *p_udf = p_udf_dirent->p_udf; uint8_t data[UDF_BLOCKSIZE]; udf_file_entry_t *p_udf_fe = (udf_file_entry_t *) &data; driver_return_code_t i_ret = udf_read_sectors...
false
false
false
false
false
0
has_newer_microcode(void *mc, unsigned int csig, int cpf, int new_rev) { struct microcode_header_intel *mc_hdr = mc; if (mc_hdr->rev <= new_rev) return 0; return find_matching_signature(mc, csig, cpf); }
false
false
false
false
false
0
menu_text(str, mnemonic, actext) char_u *str; int *mnemonic; char_u **actext; { char_u *p; char_u *text; /* Locate accelerator text, after the first TAB */ p = vim_strchr(str, TAB); if (p != NULL) { if (actext != NULL) *actext = vim_strsave(p + 1); text = vim_strnsave(str, (...
false
false
false
false
false
0
op_ld_ind16_a(/*@unused@*/ uint32_t op, const struct opinfo *oi) { long ofs = get_imm16(); DPRINTF(" %s [0x%04lx], A", oi->name, ofs); mem_put(ofs, gbcpu_regs.rn.a); }
false
false
false
false
false
0
call_func_retstr(func, argc, argv, safe) char_u *func; int argc; char_u **argv; int safe; /* use the sandbox */ { typval_T rettv; char_u *retval; if (call_vim_function(func, argc, argv, safe, &rettv) == FAIL) return NULL; retval = vim_strsave(get_tv_string(&rettv)); c...
false
false
false
false
false
0
FillPalette(FIBITMAP *dib) { RGBQUAD *pal = FreeImage_GetPalette(dib); if(pal) { for (int i = 0; i < 256; i++) { pal[i].rgbRed = _plColourData[i + 0*256]; pal[i].rgbGreen = _plColourData[i + 1*256]; pal[i].rgbBlue = _plColourData[i + 2*256]; } return true; } return false; }
false
false
false
false
false
0
drawBackground(float dt) { if(!gGourceDrawBackground) return; display.setClearColour(vec4(gGourceSettings.background_colour, gGourceSettings.transparent ? 0.0f : 1.0f)); display.clear(); if(backgroundtex!=0) { glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); ...
false
false
false
false
false
0
BSWAP_ERX(bxInstruction_c *i) { #if BX_CPU_LEVEL >= 4 Bit32u val32, b0, b1, b2, b3; if (i->os32L() == 0) { BX_ERROR(("BSWAP with 16-bit opsize: undefined behavior !")); } val32 = BX_READ_32BIT_REG(i->opcodeReg()); b0 = val32 & 0xff; val32 >>= 8; b1 = val32 & 0xff; val32 >>= 8; b2 = val32 & 0xff; val...
false
false
false
false
false
0
qmonPEResetAsk(void) { DENTER(GUI_LAYER, "qmonPEResetAsk"); XmtInputFieldSetString(pe_name_w, ""); XmpSpinboxSetValue(pe_slots_w, 0, True); /* ** the lists have to be converted to XmString */ UpdateXmListFromCull(pe_acl_w, XmFONTLIST_DEFAULT_TAG, NULL, US_name); UpdateXmListFromCull(pe_...
false
false
false
false
false
0
gf119_disp_dmac_fini(struct nv50_disp_dmac *chan) { struct nv50_disp *disp = chan->base.root->disp; struct nvkm_subdev *subdev = &disp->base.engine.subdev; struct nvkm_device *device = subdev->device; int chid = chan->base.chid; /* deactivate channel */ nvkm_mask(device, 0x610490 + (chid * 0x0010), 0x00001010, 0...
false
false
false
false
false
0
utils_escape_notify_message (const char *src) { const char *p = src; GString *escaped; /* Filter the source text and get rid of some HTML tags since the * notification spec only allows a subset of HTML. Substitute * HTML code for characters like & that are invalid in HTML. */ escaped = g_string_sized_new (...
false
false
false
false
false
0