unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
75,368 | 0 | static int r_bin_dyldcache_init(struct r_bin_dyldcache_obj_t* bin) {
int len = r_buf_fread_at (bin->b, 0, (ut8*)&bin->hdr, "16c4i7l", 1);
if (len == -1) {
perror ("read (cache_header)");
return false;
}
bin->nlibs = bin->hdr.numlibs;
return true;
}
| 10,100 |
43,752 | 0 | int gss_krb5int_lib_init(void)
{
int err;
#ifdef SHOW_INITFINI_FUNCS
printf("gss_krb5int_lib_init\n");
#endif
add_error_table(&et_k5g_error_table);
#ifndef LEAN_CLIENT
err = k5_mutex_finish_init(&gssint_krb5_keytab_lock);
if (err)
return err;
#endif /* LEAN_CLIENT */
err = k5_key_regi... | 10,101 |
151,394 | 0 | int FrameFetchContext::ApplicationCacheHostID() const {
if (!document_loader_)
return WebApplicationCacheHost::kAppCacheNoHostId;
return document_loader_->GetApplicationCacheHost()->GetHostID();
}
| 10,102 |
67,809 | 0 | static int xfrm_add_sa(struct sk_buff *skb, struct nlmsghdr *nlh,
struct nlattr **attrs)
{
struct net *net = sock_net(skb->sk);
struct xfrm_usersa_info *p = nlmsg_data(nlh);
struct xfrm_state *x;
int err;
struct km_event c;
err = verify_newsa_info(p, attrs);
if (err)
return err;
x = xfrm_state_construct(n... | 10,103 |
34,090 | 0 | static int udf_symlink(struct inode *dir, struct dentry *dentry,
const char *symname)
{
struct inode *inode;
struct pathComponent *pc;
const char *compstart;
struct udf_fileident_bh fibh;
struct extent_position epos = {};
int eoffset, elen = 0;
struct fileIdentDesc *fi;
struct fileIdentDesc cfi;
uint8... | 10,104 |
76,218 | 0 | static int cdrom_get_next_writable(struct cdrom_device_info *cdi,
long *next_writable)
{
disc_information di;
track_information ti;
__u16 last_track;
int ret, ti_size;
if (!CDROM_CAN(CDC_GENERIC_PACKET))
goto use_last_written;
ret = cdrom_get_disc_info(cdi, &di);
if (ret < 0 || ret < offsetof(typeof(d... | 10,105 |
7,688 | 0 | static ssize_t handle_readlink(FsContext *fs_ctx, V9fsPath *fs_path,
char *buf, size_t bufsz)
{
int fd, ret;
struct handle_data *data = (struct handle_data *)fs_ctx->private;
fd = open_by_handle(data->mountfd, fs_path->data, O_PATH);
if (fd < 0) {
return fd;
}... | 10,106 |
149,128 | 0 | static int countValidCursors(BtShared *pBt, int wrOnly){
BtCursor *pCur;
int r = 0;
for(pCur=pBt->pCursor; pCur; pCur=pCur->pNext){
if( (wrOnly==0 || (pCur->curFlags & BTCF_WriteFlag)!=0)
&& pCur->eState!=CURSOR_FAULT ) r++;
}
return r;
}
| 10,107 |
101,029 | 0 | void QuotaManager::GetUsageAndQuota(
const GURL& origin, StorageType type,
GetUsageAndQuotaCallback* callback_ptr) {
scoped_ptr<GetUsageAndQuotaCallback> callback(callback_ptr);
LazyInitialize();
if (type == kStorageTypeUnknown) {
callback->Run(kQuotaErrorNotSupported, 0, 0);
return;
}
st... | 10,108 |
84,865 | 0 | ebt_dev_check(const char *entry, const struct net_device *device)
{
int i = 0;
const char *devname;
if (*entry == '\0')
return 0;
if (!device)
return 1;
devname = device->name;
/* 1 is the wildcard token */
while (entry[i] != '\0' && entry[i] != 1 && entry[i] == devname[i])
i++;
return devname[i] != entr... | 10,109 |
132,733 | 0 | void ChromotingInstance::HandleTrapKey(const base::DictionaryValue& data) {
int keycode = 0;
bool trap = false;
if (!data.GetInteger("keycode", &keycode) ||
!data.GetBoolean("trap", &trap)) {
LOG(ERROR) << "Invalid trapKey.";
return;
}
key_mapper_.TrapKey(keycode, trap);
}
| 10,110 |
65,095 | 0 | static void CompressClusterFit(const size_t count,
const DDSVector4 *points, const ssize_t *map, const DDSVector3 principle,
const DDSVector4 metric, DDSVector3 *start, DDSVector3 *end,
unsigned char *indices)
{
DDSVector3
axis;
DDSVector4
grid,
gridrcp,
half,
onethird_onethird2,
poin... | 10,111 |
18,696 | 0 | static int sock_recvmsg_nosec(struct socket *sock, struct msghdr *msg,
size_t size, int flags)
{
struct kiocb iocb;
struct sock_iocb siocb;
int ret;
init_sync_kiocb(&iocb, NULL);
iocb.private = &siocb;
ret = __sock_recvmsg_nosec(&iocb, sock, msg, size, flags);
if (-EIOCBQUEUED == ret)
ret = wait_on_s... | 10,112 |
9,530 | 0 | PHP_FUNCTION(snmp3_set)
{
php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU, SNMP_CMD_SET, SNMP_VERSION_3);
}
| 10,113 |
65,054 | 0 | static bool compare_ptrs_to_packet(struct bpf_reg_state *old,
struct bpf_reg_state *cur)
{
if (old->id != cur->id)
return false;
/* old ptr_to_packet is more conservative, since it allows smaller
* range. Ex:
* old(off=0,r=10) is equal to cur(off=0,r=20), because
* old(off=0,r=10) means that with rang... | 10,114 |
181,397 | 1 | static int su3000_frontend_attach(struct dvb_usb_adapter *d)
{
u8 obuf[3] = { 0xe, 0x80, 0 };
u8 ibuf[] = { 0 };
if (dvb_usb_generic_rw(d->dev, obuf, 3, ibuf, 1, 0) < 0)
err("command 0x0e transfer failed.");
obuf[0] = 0xe;
obuf[1] = 0x02;
obuf[2] = 1;
if (dvb_usb_generic_rw(d->dev, obuf, 3, ibuf, 1, 0) < 0)
e... | 10,115 |
163,777 | 0 | void DelegatedFrameHost::OnCompositingShuttingDown(ui::Compositor* compositor) {
DCHECK_EQ(compositor, compositor_);
ResetCompositor();
DCHECK(!compositor_);
}
| 10,116 |
11,154 | 0 | PHP_METHOD(Phar, decompress)
{
char *ext = NULL;
size_t ext_len = 0;
zend_object *ret;
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &ext, &ext_len) == FAILURE) {
return;
}
if (PHAR_G(readonly) && !phar_obj->archive->is_data) {
zend_throw_exception_ex(spl_ce_UnexpectedValueExcepti... | 10,117 |
92,961 | 0 | process_brushcache(STREAM s, uint16 flags)
{
UNUSED(flags);
BRUSHDATA brush_data;
uint8 cache_idx, colour_code, width, height, size, type;
uint8 *comp_brush;
int index;
int Bpp;
in_uint8(s, cache_idx);
in_uint8(s, colour_code);
in_uint8(s, width);
in_uint8(s, height);
in_uint8(s, type); /* type, 0x8x = cach... | 10,118 |
38,372 | 0 | static void cm_format_mad_hdr(struct ib_mad_hdr *hdr,
__be16 attr_id, __be64 tid)
{
hdr->base_version = IB_MGMT_BASE_VERSION;
hdr->mgmt_class = IB_MGMT_CLASS_CM;
hdr->class_version = IB_CM_CLASS_VERSION;
hdr->method = IB_MGMT_METHOD_SEND;
hdr->attr_id = attr_id;
hdr->tid = tid;
}
| 10,119 |
167,491 | 0 | void DataPipeProducerDispatcher::CancelTransit() {
base::AutoLock lock(lock_);
DCHECK(in_transit_);
in_transit_ = false;
HandleSignalsState state = GetHandleSignalsStateNoLock();
watchers_.NotifyState(state);
}
| 10,120 |
16,650 | 0 | ReadUserLogFileState::convertState(
const ReadUserLog::FileState &state,
const ReadUserLogFileState::FileStatePub *&pub )
{
pub = (const ReadUserLogFileState::FileStatePub *) state.buf;
return true;
}
| 10,121 |
115,239 | 0 | DWORD OmniboxViewWin::EditDropTarget::OnDrop(IDataObject* data_object,
DWORD key_state,
POINT cursor_position,
DWORD effect) {
effect = OnDragOver(data_object, key_state, cursor_posit... | 10,122 |
181,628 | 1 | static OPJ_BOOL opj_pi_next_pcrl(opj_pi_iterator_t * pi)
{
opj_pi_comp_t *comp = NULL;
opj_pi_resolution_t *res = NULL;
OPJ_UINT32 index = 0;
if (!pi->first) {
comp = &pi->comps[pi->compno];
goto LABEL_SKIP;
} else {
OPJ_UINT32 compno, resno;
pi->first = 0;
p... | 10,123 |
140,623 | 0 | std::string OutOfProcessInstance::GetURL() {
return url_;
}
| 10,124 |
93,253 | 0 | ldp_print(netdissect_options *ndo,
register const u_char *pptr, register u_int len)
{
u_int processed;
while (len > (sizeof(struct ldp_common_header) + sizeof(struct ldp_msg_header))) {
processed = ldp_pdu_print(ndo, pptr);
if (processed == 0)
return;
if (len < proc... | 10,125 |
132,134 | 0 | void LayoutBlockFlow::styleWillChange(StyleDifference diff, const ComputedStyle& newStyle)
{
const ComputedStyle* oldStyle = style();
s_canPropagateFloatIntoSibling = oldStyle ? !isFloatingOrOutOfFlowPositioned() && !avoidsFloats() : false;
if (oldStyle && parent() && diff.needsFullLayout() && oldStyle->pos... | 10,126 |
80,248 | 0 | GF_Box *minf_New()
{
ISOM_DECL_BOX_ALLOC(GF_MediaInformationBox, GF_ISOM_BOX_TYPE_MINF);
return (GF_Box *)tmp;
}
| 10,127 |
169,300 | 0 | RenderFrameSubmissionObserver::RenderFrameSubmissionObserver(
RenderFrameMetadataProvider* render_frame_metadata_provider)
: render_frame_metadata_provider_(render_frame_metadata_provider) {
render_frame_metadata_provider_->AddObserver(this);
render_frame_metadata_provider_->ReportAllFrameSubmissionsForTest... | 10,128 |
55,657 | 0 | static int __init setup_relax_domain_level(char *str)
{
if (kstrtoint(str, 0, &default_relax_domain_level))
pr_warn("Unable to set relax_domain_level\n");
return 1;
}
| 10,129 |
59,558 | 0 | static const char *baseFilename(const char *filename) {
const char *cur;
if (filename == NULL)
return(NULL);
cur = &filename[strlen(filename)];
while ((cur > filename) && (*cur != '/'))
cur--;
if (*cur == '/')
return(cur + 1);
return(cur);
}
| 10,130 |
16,897 | 0 | void bdrv_round_to_clusters(BlockDriverState *bs,
int64_t sector_num, int nb_sectors,
int64_t *cluster_sector_num,
int *cluster_nb_sectors)
{
BlockDriverInfo bdi;
if (bdrv_get_info(bs, &bdi) < 0 || bdi.cluster_size == 0) {
... | 10,131 |
90,585 | 0 | static struct anon_vma *reusable_anon_vma(struct vm_area_struct *old, struct vm_area_struct *a, struct vm_area_struct *b)
{
if (anon_vma_compatible(a, b)) {
struct anon_vma *anon_vma = READ_ONCE(old->anon_vma);
if (anon_vma && list_is_singular(&old->anon_vma_chain))
return anon_vma;
}
return NULL;
}
| 10,132 |
34,368 | 0 | int btrfs_writepages(struct address_space *mapping,
struct writeback_control *wbc)
{
struct extent_io_tree *tree;
tree = &BTRFS_I(mapping->host)->io_tree;
return extent_writepages(tree, mapping, btrfs_get_extent, wbc);
}
| 10,133 |
75,064 | 0 | map_trigger_at(int x, int y, int layer)
{
rect_t bounds;
int tile_w, tile_h;
struct map_trigger* trigger;
iter_t iter;
tileset_get_size(s_map->tileset, &tile_w, &tile_h);
iter = vector_enum(s_map->triggers);
while ((trigger = iter_next(&iter))) {
if (trigger->z != layer && false)... | 10,134 |
38,175 | 0 | setlogfile(argv)
char **argv;
{
int fd, err;
uid_t euid;
euid = geteuid();
if (!privileged_option && seteuid(getuid()) == -1) {
option_error("unable to drop permissions to open %s: %m", *argv);
return 0;
}
fd = open(*argv, O_WRONLY | O_APPEND | O_CREAT | O_EXCL, 0644);
if (fd < 0 && e... | 10,135 |
119,043 | 0 | bool WebContentsImpl::ShouldAssignSiteForURL(const GURL& url) {
if (url == GURL(kAboutBlankURL))
return false;
return GetContentClient()->browser()->ShouldAssignSiteForURL(url);
}
| 10,136 |
154,875 | 0 | error::Error GLES2DecoderPassthroughImpl::DoVertexAttrib3fv(
GLuint indx,
const volatile GLfloat* values) {
api()->glVertexAttrib3fvFn(indx, const_cast<const GLfloat*>(values));
return error::kNoError;
}
| 10,137 |
173,312 | 0 | read_chunk(struct file *file)
/* On entry file::data_pos must be set to the position of the first byte
* of the chunk data *and* the input file must be at this position. This
* routine (via process_chunk) instantiates a chunk or IDAT control structure
* based on file::length and file::type and also resets... | 10,138 |
70,036 | 0 | void initServerConfig(void) {
int j;
getRandomHexChars(server.runid,CONFIG_RUN_ID_SIZE);
server.configfile = NULL;
server.executable = NULL;
server.hz = CONFIG_DEFAULT_HZ;
server.runid[CONFIG_RUN_ID_SIZE] = '\0';
server.arch_bits = (sizeof(long) == 8) ? 64 : 32;
server.port = CONFIG_DEF... | 10,139 |
107,298 | 0 | void Browser::DuplicateContentsAt(int index) {
TabContentsWrapper* contents = GetTabContentsWrapperAt(index);
CHECK(contents);
TabContentsWrapper* contents_dupe = contents->Clone();
TabContents* new_contents = contents_dupe->tab_contents();
bool pinned = false;
if (CanSupportWindowFeature(FEATURE_TABSTRIP)... | 10,140 |
482 | 0 | static void pdf_run_EX(fz_context *ctx, pdf_processor *proc)
{
}
| 10,141 |
36,975 | 0 | static void __loaded_vmcs_clear(void *arg)
{
struct loaded_vmcs *loaded_vmcs = arg;
int cpu = raw_smp_processor_id();
if (loaded_vmcs->cpu != cpu)
return; /* vcpu migration can race with cpu offline */
if (per_cpu(current_vmcs, cpu) == loaded_vmcs->vmcs)
per_cpu(current_vmcs, cpu) = NULL;
crash_disable_local_... | 10,142 |
175,163 | 0 | void NuPlayer::GenericSource::onMessageReceived(const sp<AMessage> &msg) {
switch (msg->what()) {
case kWhatPrepareAsync:
{
onPrepareAsync();
break;
}
case kWhatFetchSubtitleData:
{
fetchTextData(kWhatSendSubtitleData, MEDIA_TRACK_TYPE_SUBTITLE,
mFetchSubtitleDataGeneration,... | 10,143 |
119,750 | 0 | NavigationType NavigationControllerImpl::ClassifyNavigation(
const ViewHostMsg_FrameNavigate_Params& params) const {
if (params.page_id == -1) {
return NAVIGATION_TYPE_NAV_IGNORE;
}
if (params.page_id > web_contents_->GetMaxPageID()) {
if (PageTransitionIsMainFrame(params.transition))
return NA... | 10,144 |
169,649 | 0 | void VerifyProcessPriority(content::RenderProcessHost* process,
bool expected_is_backgrounded) {
EXPECT_TRUE(process->IsInitializedAndNotDead());
EXPECT_EQ(expected_is_backgrounded, process->IsProcessBackgrounded());
if (base::Process::CanBackgroundProcesses()) {
base::... | 10,145 |
140,161 | 0 | DataUseUserData::AppState GetCurrentAppState() {
#if defined(OS_ANDROID)
return base::android::ApplicationStatusListener::GetState() ==
base::android::APPLICATION_STATE_HAS_RUNNING_ACTIVITIES
? DataUseUserData::FOREGROUND
: DataUseUserData::BACKGROUND;
#else
return DataUse... | 10,146 |
54,390 | 0 | static ZIPARCHIVE_METHOD(addEmptyDir)
{
struct zip *intern;
zval *self = getThis();
char *dirname;
size_t dirname_len;
int idx;
struct zip_stat sb;
char *s;
if (!self) {
RETURN_FALSE;
}
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s",
&dirname, &dirname_len) == FAILUR... | 10,147 |
174,751 | 0 | void WT_UpdateLFO (S_LFO_CONTROL *pLFO, EAS_I16 phaseInc)
{
/* To save memory, if m_nPhaseValue is negative, we are in the
* delay phase, and m_nPhaseValue represents the time left
* in the delay.
*/
if (pLFO->lfoPhase < 0)
{
pLFO->lfoPhase++;
return;
}
/* calculate LFO output from phase ... | 10,148 |
142,562 | 0 | void ShelfWidget::OnSessionStateChanged(session_manager::SessionState state) {
bool using_views_shelf = IsUsingViewsShelf();
bool unknown_state = state == session_manager::SessionState::UNKNOWN;
bool hide_on_secondary_screen = shelf_->ShouldHideOnSecondaryDisplay(state);
if (!using_views_shelf || unknown_state ... | 10,149 |
135,420 | 0 | void Document::updateBaseURL()
{
KURL oldBaseURL = m_baseURL;
if (!m_baseElementURL.isEmpty())
m_baseURL = m_baseElementURL;
else if (!m_baseURLOverride.isEmpty())
m_baseURL = m_baseURLOverride;
else
m_baseURL = m_url;
selectorQueryCache().invalidate();
if (!m_baseURL.i... | 10,150 |
61,817 | 0 | static int save_avio_options(AVFormatContext *s)
{
HLSContext *c = s->priv_data;
static const char *opts[] = {
"headers", "http_proxy", "user_agent", "user-agent", "cookies", NULL };
const char **opt = opts;
uint8_t *buf;
int ret = 0;
while (*opt) {
if (av_opt_get(s->pb, *opt, A... | 10,151 |
43,963 | 0 | static int bist_write(struct pci_dev *dev, int offset, u8 value, void *data)
{
u8 cur_value;
int err;
err = pci_read_config_byte(dev, offset, &cur_value);
if (err)
goto out;
if ((cur_value & ~PCI_BIST_START) == (value & ~PCI_BIST_START)
|| value == PCI_BIST_START)
err = pci_write_config_byte(dev, offset... | 10,152 |
49,274 | 0 | static struct dst_entry *tcp_v4_route_req(const struct sock *sk,
struct flowi *fl,
const struct request_sock *req,
bool *strict)
{
struct dst_entry *dst = inet_csk_route_req(sk, &fl->u.ip4, req);
if (strict) {
if (fl->u.ip4.daddr == inet_rsk(req)->ir_rmt_addr)
*strict = true;
else
*str... | 10,153 |
101,470 | 0 | ModelType DirectoryBackingStore::ModelIdToModelTypeEnum(
const void* data, int size) {
sync_pb::EntitySpecifics specifics;
if (!specifics.ParseFromArray(data, size))
return syncable::UNSPECIFIED;
return syncable::GetModelTypeFromSpecifics(specifics);
}
| 10,154 |
135,201 | 0 | void Document::didAssociateFormControlsTimerFired(Timer<Document>* timer)
{
ASSERT_UNUSED(timer, timer == &m_didAssociateFormControlsTimer);
if (!frame() || !frame()->page())
return;
WillBeHeapVector<RefPtrWillBeMember<Element>> associatedFormControls;
copyToVector(m_associatedFormControls, ass... | 10,155 |
171,907 | 0 | BOOLEAN btif_hl_proc_pending_op(UINT8 app_idx, UINT8 mcl_idx)
{
btif_hl_app_cb_t *p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx);
btif_hl_pending_chan_cb_t *p_pcb;
BOOLEAN status = FALSE;
tBTA_HL_DCH_OPEN_PARAM dch_open;
... | 10,156 |
133,759 | 0 | int SSLClientSocketOpenSSL::GetLocalAddress(IPEndPoint* addressList) const {
return transport_->socket()->GetLocalAddress(addressList);
}
| 10,157 |
9,335 | 0 | void esp_transfer_data(SCSIRequest *req, uint32_t len)
{
ESPState *s = req->hba_private;
assert(!s->do_cmd);
trace_esp_transfer_data(s->dma_left, s->ti_size);
s->async_len = len;
s->async_buf = scsi_req_get_buf(req);
if (s->dma_left) {
esp_do_dma(s);
} else if (s->dma_counter != 0 &... | 10,158 |
107,306 | 0 | void Browser::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
switch (type.value) {
case NotificationType::TAB_CONTENTS_DISCONNECTED:
if (is_attempting_to_close_browser_) {
ClearUnloadState(Source<TabC... | 10,159 |
16,946 | 0 | static coroutine_fn int parallels_co_read(BlockDriverState *bs, int64_t sector_num,
uint8_t *buf, int nb_sectors)
{
int ret;
BDRVParallelsState *s = bs->opaque;
qemu_co_mutex_lock(&s->lock);
ret = parallels_read(bs, sector_num, buf, nb_sectors);
qemu_co_mute... | 10,160 |
165,672 | 0 | bool GetValueFromVersionResource(const char* version_resource,
const std::wstring& name,
std::wstring* value_str) {
assert(value_str);
value_str->clear();
WORD language = 0;
WORD code_page = 0;
if (!GetLanguageAndCodePageFromVersionResource(ve... | 10,161 |
136,618 | 0 | void DocumentLoader::MarkAsCommitted() {
DCHECK_LT(state_, kCommitted);
state_ = kCommitted;
}
| 10,162 |
158,785 | 0 | explicit RenderFrameCreatedObserver(Shell* shell)
: WebContentsObserver(shell->web_contents()), last_rfh_(nullptr) {}
| 10,163 |
107,895 | 0 | AfterTranslateInfoBar::AfterTranslateInfoBar(
TranslateInfoBarDelegate* delegate)
: TranslateInfoBarBase(delegate),
original_language_menu_model_(delegate, LanguagesMenuModel::ORIGINAL),
target_language_menu_model_(delegate, LanguagesMenuModel::TARGET),
options_menu_model_(delegate),
swa... | 10,164 |
51,382 | 0 | PHP_FUNCTION(mb_ereg_search)
{
_php_mb_regex_ereg_search_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
| 10,165 |
72,380 | 0 | static inline void php_var_serialize_long(smart_str *buf, zend_long val) /* {{{ */
{
smart_str_appendl(buf, "i:", 2);
smart_str_append_long(buf, val);
smart_str_appendc(buf, ';');
}
/* }}} */
| 10,166 |
151,429 | 0 | RefPtr<SecurityOrigin> FrameFetchContext::GetRequestorOriginForFrameLoading() {
if (IsDetached())
return frozen_state_->requestor_origin;
return GetFrame()->GetDocument()->GetSecurityOrigin();
}
| 10,167 |
5,859 | 0 | static int ahci_dma_rw_buf(IDEDMA *dma, int is_write)
{
AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);
IDEState *s = &ad->port.ifs[0];
uint8_t *p = s->io_buffer + s->io_buffer_index;
int l = s->io_buffer_size - s->io_buffer_index;
if (ahci_populate_sglist(ad, &s->sg, ad->cur_cmd, l, s->io_buffer... | 10,168 |
89,481 | 0 | dcputs(const char *s)
{
int len=strlen(s);
dcchkstr(len);
strcat(dcptr,s);
dcptr+=len;
strsize+=len;
}
| 10,169 |
113,447 | 0 | void InputMethodIBus::OnDidChangeFocusedClient(TextInputClient* focused_before,
TextInputClient* focused) {
OnTextInputTypeChanged(focused);
UpdateContextFocusState();
OnCaretBoundsChanged(focused);
}
| 10,170 |
72,371 | 0 | static void php_object_property_dump(zval *zv, zend_ulong index, zend_string *key, int level) /* {{{ */
{
const char *prop_name, *class_name;
if (key == NULL) { /* numeric key */
php_printf("%*c[" ZEND_LONG_FMT "]=>\n", level + 1, ' ', index);
} else { /* string key */
int unmangle = zend_unmangle_property_name... | 10,171 |
35,627 | 0 | static int get_free_idx(void)
{
struct thread_struct *t = ¤t->thread;
int idx;
for (idx = 0; idx < GDT_ENTRY_TLS_ENTRIES; idx++)
if (desc_empty(&t->tls_array[idx]))
return idx + GDT_ENTRY_TLS_MIN;
return -ESRCH;
}
| 10,172 |
179,845 | 1 | spnego_gss_wrap_iov(OM_uint32 *minor_status,
gss_ctx_id_t context_handle,
int conf_req_flag,
gss_qop_t qop_req,
int *conf_state,
gss_iov_buffer_desc *iov,
int iov_count)
{
OM_uint32 ret;
ret = gss_wrap_iov(minor_status,
context_handle,
conf_req_flag,
qop_req,
conf_state,
iov,
iov_count);
return (ret);
}
| 10,173 |
91,051 | 0 | void CWebServer::RType_FloorPlans(WebEmSession & session, const request& req, Json::Value &root)
{
root["status"] = "OK";
root["title"] = "Floorplans";
std::vector<std::vector<std::string> > result, result2, result3;
result = m_sql.safe_query("SELECT Key, nValue, sValue FROM Preferences WHERE Key LIKE... | 10,174 |
30,044 | 0 | static void vhost_net_exit(void)
{
misc_deregister(&vhost_net_misc);
}
| 10,175 |
166,589 | 0 | void WebGL2RenderingContextBase::Trace(blink::Visitor* visitor) {
visitor->Trace(read_framebuffer_binding_);
visitor->Trace(transform_feedback_binding_);
visitor->Trace(default_transform_feedback_);
visitor->Trace(bound_copy_read_buffer_);
visitor->Trace(bound_copy_write_buffer_);
visitor->Trace(bound_pixel... | 10,176 |
88,710 | 0 | static int printportlist(char *buf, int bufsize, struct portlist* pl, char * delim){
int printed = 0;
for(; pl; pl = pl->next){
if(printed > (bufsize - 64)) break;
if(pl->startport != pl->endport)
printed += sprintf(buf+printed, "%hu-%hu%s", pl->startport, pl->endport, pl->next?delim:"");
else {
/*
struc... | 10,177 |
161,950 | 0 | void PrintRenderFrameHelper::PrintPages() {
if (!prep_frame_view_) // Printing is already canceled or failed.
return;
prep_frame_view_->StartPrinting();
int page_count = prep_frame_view_->GetExpectedPageCount();
if (!page_count) {
LOG(ERROR) << "Can't print 0 pages.";
return DidFinishPrinting(FAI... | 10,178 |
155,007 | 0 | bool WebGLRenderingContextBase::ValidateWebGLProgramOrShader(
const char* function_name,
WebGLObject* object) {
if (isContextLost())
return false;
DCHECK(object);
if (!object->HasObject()) {
SynthesizeGLError(GL_INVALID_VALUE, function_name,
"attempt to use a deleted object")... | 10,179 |
168,435 | 0 | PlatformFont* PlatformFont::CreateDefault() {
return new PlatformFontSkia;
}
| 10,180 |
82,805 | 0 | R_API RBinFile *r_bin_file_find_by_arch_bits(RBin *bin, const char *arch, int bits, const char *name) {
RListIter *iter;
RBinFile *binfile = NULL;
RBinXtrData *xtr_data;
if (!name || !arch) {
return NULL;
}
r_list_foreach (bin->binfiles, iter, binfile) {
RListIter *iter_xtr;
if (!binfile->xtr_data) {
co... | 10,181 |
111,100 | 0 | static bool containsVideoTags(Element* element)
{
for (Node* node = element->firstChild(); node; node = NodeTraversal::next(node, element)) {
if (node->hasTagName(HTMLNames::videoTag))
return true;
}
return false;
}
| 10,182 |
181,070 | 1 | l2tp_proto_ver_print(netdissect_options *ndo, const uint16_t *dat)
{
ND_PRINT((ndo, "%u.%u", (EXTRACT_16BITS(dat) >> 8),
(EXTRACT_16BITS(dat) & 0xff)));
}
| 10,183 |
7,476 | 0 | ssize_t local_removexattr_nofollow(FsContext *ctx, const char *path,
const char *name)
{
char *dirpath = g_path_get_dirname(path);
char *filename = g_path_get_basename(path);
int dirfd;
ssize_t ret = -1;
dirfd = local_opendir_nofollow(ctx, dirpath);
if (dirfd ... | 10,184 |
106,794 | 0 | void WebPage::setComposition(const String& compositionString, const Vector<WebCore::CompositionUnderline>& underlines, uint64_t cursorPosition)
{
Frame* frame = m_page->focusController()->focusedOrMainFrame();
if (!frame || !frame->editor()->canEdit())
return;
frame->editor()->setComposition(composi... | 10,185 |
46,803 | 0 | static int __init sha256_sparc64_mod_init(void)
{
if (sparc64_has_sha256_opcode()) {
int ret = crypto_register_shash(&sha224);
if (ret < 0)
return ret;
ret = crypto_register_shash(&sha256);
if (ret < 0) {
crypto_unregister_shash(&sha224);
return ret;
}
pr_info("Using sparc64 sha256 opcode optimi... | 10,186 |
115,684 | 0 | bool HostNPScriptObject::Invoke(const std::string& method_name,
const NPVariant* args,
uint32_t argCount,
NPVariant* result) {
VLOG(2) << "Invoke " << method_name;
CHECK_EQ(base::PlatformThread::CurrentId(), np_thread_id... | 10,187 |
113,531 | 0 | JSRetainPtr<JSStringRef> AccessibilityUIElement::accessibilityValue() const
{
return JSStringCreateWithCharacters(0, 0);
}
| 10,188 |
131,727 | 0 | static void shortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
v8SetReturnValueInt(info, imp->shortMethod());
}
| 10,189 |
165,558 | 0 | bool ContentSecurityPolicy::ShouldBypassMainWorld(
const ExecutionContext* context) {
if (const auto* document = DynamicTo<Document>(context)) {
if (document->GetFrame()) {
return document->GetFrame()
->GetScriptController()
.ShouldBypassMainWorldCSP();
}
}
return false;
}
| 10,190 |
158,181 | 0 | void NavigationURLLoaderImpl::FollowRedirect(
const base::Optional<std::vector<std::string>>&
to_be_removed_request_headers,
const base::Optional<net::HttpRequestHeaders>& modified_request_headers) {
base::PostTaskWithTraits(
FROM_HERE, {BrowserThread::IO},
base::BindOnce(&URLLoaderRequest... | 10,191 |
56,017 | 0 | static int __perf_cgroup_move(void *info)
{
struct task_struct *task = info;
rcu_read_lock();
perf_cgroup_switch(task, PERF_CGROUP_SWOUT | PERF_CGROUP_SWIN);
rcu_read_unlock();
return 0;
}
| 10,192 |
99,998 | 0 | void WebPluginImpl::RemoveClient(WebURLLoader* loader) {
for (size_t i = 0; i < clients_.size(); ++i) {
if (clients_[i].loader.get() == loader) {
RemoveClient(i);
return;
}
}
}
| 10,193 |
90,043 | 0 | ZSTD_CDict* ZSTD_createCDict(const void* dict, size_t dictSize, int compressionLevel)
{
ZSTD_compressionParameters cParams = ZSTD_getCParams(compressionLevel, 0, dictSize);
return ZSTD_createCDict_advanced(dict, dictSize,
ZSTD_dlm_byCopy, ZSTD_dct_auto,
... | 10,194 |
73,034 | 0 | BGD_DECLARE(void) gdImageArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e,
int color)
{
gdImageFilledArc (im, cx, cy, w, h, s, e, color, gdNoFill);
}
| 10,195 |
101,962 | 0 | bool PrintWebViewHelper::PrintPreviewContext::IsFinalPageRendered() const {
return static_cast<size_t>(current_page_index_) == pages_to_render_.size();
}
| 10,196 |
162,043 | 0 | void BrowserChildProcessHostImpl::TerminateAll() {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
BrowserChildProcessList copy = g_child_process_list.Get();
for (BrowserChildProcessList::iterator it = copy.begin();
it != copy.end(); ++it) {
delete (*it)->delegate(); // ~*HostDelegate deletes *HostImpl.
}
}... | 10,197 |
96,681 | 0 | static struct usb_function_instance *hidg_alloc_inst(void)
{
struct f_hid_opts *opts;
struct usb_function_instance *ret;
int status = 0;
opts = kzalloc(sizeof(*opts), GFP_KERNEL);
if (!opts)
return ERR_PTR(-ENOMEM);
mutex_init(&opts->lock);
opts->func_inst.free_func_inst = hidg_free_inst;
ret = &opts->func_i... | 10,198 |
169,499 | 0 | v8::Local<v8::Value> ModuleSystem::CallModuleMethod(
const std::string& module_name,
const std::string& method_name,
std::vector<v8::Local<v8::Value>>* args) {
return CallModuleMethod(module_name, method_name, args->size(), args->data());
}
| 10,199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.