unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
2,155 | 0 | RedChannel *red_channel_create_parser(int size,
SpiceCoreInterface *core,
uint32_t type, uint32_t id,
int handle_acks,
spice_parse_channel_func_t parser,
channel_han... | 1,400 |
169,345 | 0 | void SimulateTapWithModifiersAt(WebContents* web_contents,
unsigned modifiers,
const gfx::Point& point) {
blink::WebGestureEvent tap(blink::WebGestureEvent::kGestureTap, modifiers,
ui::EventTimeForNow(),
... | 1,401 |
124,263 | 0 | bool PermissionsGetAllFunction::RunImpl() {
scoped_ptr<Permissions> permissions =
helpers::PackPermissionSet(GetExtension()->GetActivePermissions());
results_ = GetAll::Results::Create(*permissions);
return true;
}
| 1,402 |
131,925 | 0 | static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
imp->voidMethod();
}
| 1,403 |
185,237 | 1 | void Initialize(ChannelLayout channel_layout, int bits_per_channel) {
AudioParameters params(
media::AudioParameters::AUDIO_PCM_LINEAR, channel_layout,
kSamplesPerSecond, bits_per_channel, kRawDataSize);
algorithm_.Initialize(1, params, base::Bind(
&AudioRendererAlgorithmTest::EnqueueData, base::Unretained(thi... | 1,404 |
125,475 | 0 | void GDataFileSystem::TransferRegularFile(
const FilePath& local_file_path,
const FilePath& remote_dest_file_path,
const FileOperationCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
GDataFileError* error =
new GDataFileError(GDATA_FILE_OK);
int64* file_size = new in... | 1,405 |
40,436 | 0 | static void ipx_remove_socket(struct sock *sk)
{
/* Determine interface with which socket is associated */
struct ipx_interface *intrfc = ipx_sk(sk)->intrfc;
if (!intrfc)
goto out;
ipxitf_hold(intrfc);
spin_lock_bh(&intrfc->if_sklist_lock);
sk_del_node_init(sk);
spin_unlock_bh(&intrfc->if_sklist_lock);
ipxi... | 1,406 |
5,960 | 0 | e1000e_can_receive(E1000ECore *core)
{
int i;
if (!e1000x_rx_ready(core->owner, core->mac)) {
return false;
}
for (i = 0; i < E1000E_NUM_QUEUES; i++) {
E1000E_RxRing rxr;
e1000e_rx_ring_init(core, &rxr, i);
if (e1000e_ring_enabled(core, rxr.i) &&
e1000e_has... | 1,407 |
117,492 | 0 | void TestingAutomationProvider::SignoutInScreenLocker(
DictionaryValue* args, IPC::Message* reply_message) {
AutomationJSONReply reply(this, reply_message);
chromeos::ScreenLocker* screen_locker =
chromeos::ScreenLocker::default_screen_locker();
if (!screen_locker) {
reply.SendError(
"No def... | 1,408 |
181,024 | 1 | frag6_print(netdissect_options *ndo, register const u_char *bp, register const u_char *bp2)
{
register const struct ip6_frag *dp;
register const struct ip6_hdr *ip6;
dp = (const struct ip6_frag *)bp;
ip6 = (const struct ip6_hdr *)bp2;
ND_TCHECK(dp->ip6f_offlg);
if (ndo->ndo_vflag) {
ND_PRINT((ndo, "frag (0x%08x:%d|... | 1,409 |
135,793 | 0 | bool SelectionController::MouseDownMayStartSelect() const {
return mouse_down_may_start_select_;
}
| 1,410 |
130,905 | 0 | static void nullableStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObject* imp = V8TestObject::toNative(info.Holder());
bool isNull = false;
String jsValue = imp->nullableStringAttribute(isNull);
if (isNull) {
v8SetReturnValueNull(info);
return;
... | 1,411 |
56,521 | 0 | ext4_find_extent(struct inode *inode, ext4_lblk_t block,
struct ext4_ext_path **orig_path, int flags)
{
struct ext4_extent_header *eh;
struct buffer_head *bh;
struct ext4_ext_path *path = orig_path ? *orig_path : NULL;
short int depth, i, ppos = 0;
int ret;
eh = ext_inode_hdr(inode);
depth = ext_depth(inode)... | 1,412 |
180,218 | 1 | SPL_METHOD(RecursiveDirectoryIterator, getSubPath)
{
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
if (zend_parse_parameters_none() == FAILURE) {
return;
}
if (intern->u.dir.sub_path) {
RETURN_STRINGL(intern->u.dir.sub_path, intern->u.dir.sub_p... | 1,413 |
131,081 | 0 | static void stringAttrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjectV8Internal::stringAttrWithSetterExceptionAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8E... | 1,414 |
131,234 | 0 | static void booleanAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjectPythonV8Internal::booleanAttributeAttributeSetter(jsValue, info);
TRACE_EVENT_SET_SAMPLING_ST... | 1,415 |
135,558 | 0 | static Range* FindStringBetweenPositions(
const String& target,
const EphemeralRangeTemplate<Strategy>& reference_range,
FindOptions options) {
EphemeralRangeTemplate<Strategy> search_range(reference_range);
bool forward = !(options & kBackwards);
while (true) {
EphemeralRangeTemplate<Strategy> ... | 1,416 |
170,805 | 0 | static void Bitmap_destructor(JNIEnv* env, jobject, jlong bitmapHandle) {
SkBitmap* bitmap = reinterpret_cast<SkBitmap*>(bitmapHandle);
#ifdef USE_OPENGL_RENDERER
if (android::uirenderer::ResourceCache::hasInstance()) {
android::uirenderer::ResourceCache::getInstance().destructor(bitmap);
return;
}
#endif /... | 1,417 |
29,387 | 0 | static int mp_get_info(struct sb_uart_state *state, struct serial_struct *retinfo)
{
struct sb_uart_port *port = state->port;
struct serial_struct tmp;
memset(&tmp, 0, sizeof(tmp));
tmp.type = port->type;
tmp.line = port->line;
tmp.port = port->iobase;
if (HIGH_BITS_OFFSET)
tmp.port_high = (long) ... | 1,418 |
169,025 | 0 | void OfflinePageModelTaskified::RemoveObserver(Observer* observer) {
observers_.RemoveObserver(observer);
}
| 1,419 |
176,198 | 0 | static void AddElementsToKeyAccumulatorImpl(Handle<JSObject> receiver,
KeyAccumulator* accumulator,
AddKeyConversion convert) {
Isolate* isolate = receiver->GetIsolate();
Handle<String> string(GetString(*receiver), isolate);
string = String::Flatten(string);
uint32_t length = static_cast<uint32_t>(string->len... | 1,420 |
126,827 | 0 | void BrowserView::MaybeStackBookmarkBarAtTop() {
if (bookmark_bar_view_.get())
bookmark_bar_view_->MaybeStackAtTop();
}
| 1,421 |
27,561 | 0 | static void opl3_close(int dev)
{
devc->busy = 0;
devc->v_alloc->max_voice = devc->nr_voice = (devc->model == 2) ? 18 : 9;
devc->fm_info.nr_drums = 0;
devc->fm_info.perc_mode = 0;
opl3_reset(dev);
}
| 1,422 |
102,983 | 0 | bool TabStripModel::IsTabPinned(int index) const {
DCHECK(ContainsIndex(index));
return contents_data_[index]->pinned;
}
| 1,423 |
102,229 | 0 | Time ExtensionPrefs::BlacklistLastPingDay() const {
return ReadTime(prefs_->GetDictionary(kExtensionsBlacklistUpdate),
kLastPingDay);
}
| 1,424 |
17,013 | 0 | void WebContext::setSessionCookieMode(SessionCookieMode mode) {
DCHECK(!IsInitialized());
construct_props_->session_cookie_mode =
static_cast<content::CookieStoreConfig::SessionCookieMode>(mode);
}
| 1,425 |
125,834 | 0 | void ParamTraits<base::Time>::Write(Message* m, const param_type& p) {
ParamTraits<int64>::Write(m, p.ToInternalValue());
}
| 1,426 |
88,835 | 0 | static int make_raw_rw_request(void)
{
int aligned_sector_t;
int max_sector;
int max_size;
int tracksize;
int ssize;
if (WARN(max_buffer_sectors == 0, "VFS: Block I/O scheduled on unopened device\n"))
return 0;
set_fdc((long)current_req->rq_disk->private_data);
raw_cmd = &default_raw_cmd;
raw_cmd->flags =... | 1,427 |
110,743 | 0 | void AutocompleteController::OnProviderUpdate(bool updated_matches) {
CheckIfDone();
if (!in_start_ && (updated_matches || done_))
UpdateResult(false);
}
| 1,428 |
80,626 | 0 | GF_Err tssy_Size(GF_Box *s)
{
s->size += 1;
return GF_OK;
}
| 1,429 |
164,093 | 0 | bool AppCacheDatabase::DeleteCache(int64_t cache_id) {
if (!LazyOpen(kDontCreate))
return false;
static const char kSql[] = "DELETE FROM Caches WHERE cache_id = ?";
sql::Statement statement(db_->GetCachedStatement(SQL_FROM_HERE, kSql));
statement.BindInt64(0, cache_id);
return statement.Run();
}
| 1,430 |
106,775 | 0 | static bool useNewDrawingArea()
{
return true;
}
| 1,431 |
134,924 | 0 | ~SystemTokenCertDBInitializer() {}
| 1,432 |
54,026 | 0 | static void ims_pcu_process_data(struct ims_pcu *pcu, struct urb *urb)
{
int i;
for (i = 0; i < urb->actual_length; i++) {
u8 data = pcu->urb_in_buf[i];
/* Skip everything until we get Start Xmit */
if (!pcu->have_stx && data != IMS_PCU_PROTOCOL_STX)
continue;
if (pcu->have_dle) {
pcu->have_dle = fal... | 1,433 |
131,509 | 0 | static void nullableStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
bool isNull = false;
String jsValue = imp->nullableStringAttribute(isNull);
if (isNull) {
v8SetReturnValueNull(info);
... | 1,434 |
47,483 | 0 | static int cfg_ivs(struct cryp_device_data *device_data, struct cryp_ctx *ctx)
{
int i;
int status = 0;
int num_of_regs = ctx->blocksize / 8;
u32 iv[AES_BLOCK_SIZE / 4];
dev_dbg(device_data->dev, "[%s]", __func__);
/*
* Since we loop on num_of_regs we need to have a check in case
* someone provides an incor... | 1,435 |
82,088 | 0 | mrb_define_module_under(mrb_state *mrb, struct RClass *outer, const char *name)
{
mrb_sym id = mrb_intern_cstr(mrb, name);
struct RClass * c = define_module(mrb, id, outer);
setup_class(mrb, outer, c, id);
return c;
}
| 1,436 |
127,140 | 0 | void FocusFirstNameField() {
LOG(WARNING) << "Clicking on the tab.";
content::SimulateMouseClick(
browser()->tab_strip_model()->GetActiveWebContents(),
0,
WebKit::WebMouseEvent::ButtonLeft);
LOG(WARNING) << "Focusing the first name field.";
bool result = false;
ASSERT_TRUE... | 1,437 |
38,421 | 0 | static void cm_send_handler(struct ib_mad_agent *mad_agent,
struct ib_mad_send_wc *mad_send_wc)
{
struct ib_mad_send_buf *msg = mad_send_wc->send_buf;
struct cm_port *port;
u16 attr_index;
port = mad_agent->context;
attr_index = be16_to_cpu(((struct ib_mad_hdr *)
msg->mad)->attr_id) - CM_ATTR_ID_OFFS... | 1,438 |
105,741 | 0 | bool PropertyHasChildren(IBusProperty* prop) {
return prop && prop->sub_props && ibus_prop_list_get(prop->sub_props, 0);
}
| 1,439 |
122,488 | 0 | InspectorController::~InspectorController()
{
}
| 1,440 |
22,988 | 0 | static inline int decode_attr_length(struct xdr_stream *xdr, uint32_t *attrlen, __be32 **savep)
{
__be32 *p;
READ_BUF(4);
READ32(*attrlen);
*savep = xdr->p;
return 0;
}
| 1,441 |
79,965 | 0 | xfs_inode_free_cowblocks(
struct xfs_inode *ip,
int flags,
void *args)
{
struct xfs_eofblocks *eofb = args;
struct xfs_ifork *ifp = XFS_IFORK_PTR(ip, XFS_COW_FORK);
int match;
int ret = 0;
if (!xfs_prep_free_cowblocks(ip, ifp))
return 0;
if (eofb) {
if (eofb->eof_flags & XFS_EOF_FLAGS_UNION)
m... | 1,442 |
84,678 | 0 | kadm5_setkey_principal_3(void *server_handle,
krb5_principal principal,
krb5_boolean keepold,
int n_ks_tuple, krb5_key_salt_tuple *ks_tuple,
krb5_keyblock *keyblocks,
int n_keys)
{
kadm5_key_... | 1,443 |
22,524 | 0 | static inline int rt_bandwidth_enabled(void)
{
return sysctl_sched_rt_runtime >= 0;
}
| 1,444 |
53,597 | 0 | static void usbip_dump_usb_device(struct usb_device *udev)
{
struct device *dev = &udev->dev;
int i;
dev_dbg(dev, " devnum(%d) devpath(%s) usb speed(%s)",
udev->devnum, udev->devpath, usb_speed_string(udev->speed));
pr_debug("tt %p, ttport %d\n", udev->tt, udev->ttport);
dev_dbg(dev, " ... | 1,445 |
40,911 | 0 | static json_t *json_object_deep_copy(const json_t *object)
{
json_t *result;
void *iter;
result = json_object();
if(!result)
return NULL;
/* Cannot use json_object_foreach because object has to be cast
non-const */
iter = json_object_iter((json_t *)object);
while(iter) {
... | 1,446 |
127,351 | 0 | void InspectorCSSOMWrappers::collectFromStyleSheetContents(HashSet<RefPtr<CSSStyleSheet> >& sheetWrapperSet, StyleSheetContents* styleSheet)
{
if (!styleSheet)
return;
RefPtr<CSSStyleSheet> styleSheetWrapper = CSSStyleSheet::create(styleSheet);
sheetWrapperSet.add(styleSheetWrapper);
collect(sty... | 1,447 |
12,444 | 0 | static void check_for_comma(char ** ppasswrd)
{
char *new_pass_buf;
char *pass;
int i,j;
int number_of_commas = 0;
int len;
if(ppasswrd == NULL)
return;
else
(pass = *ppasswrd);
len = strlen(pass);
for(i=0;i<len;i++) {
if(pass[i] == ',')
number_of_commas++;
}
if(number_of_commas == 0)
return... | 1,448 |
46,451 | 0 | xfs_seek_data(
struct file *file,
loff_t start)
{
struct inode *inode = file->f_mapping->host;
struct xfs_inode *ip = XFS_I(inode);
struct xfs_mount *mp = ip->i_mount;
loff_t uninitialized_var(offset);
xfs_fsize_t isize;
xfs_fileoff_t fsbno;
xfs_filblks_t end;
uint lock;
int error;
lock = xfs_... | 1,449 |
101,561 | 0 | void Test_glInitializePPAPI() {
GLboolean init_ppapi = glInitializePPAPI(ppb_get_interface());
EXPECT(init_ppapi == true);
TEST_PASSED;
}
| 1,450 |
23,946 | 0 | static void airo_end_xmit(struct net_device *dev) {
u16 status;
int i;
struct airo_info *priv = dev->ml_priv;
struct sk_buff *skb = priv->xmit.skb;
int fid = priv->xmit.fid;
u32 *fids = priv->fids;
clear_bit(JOB_XMIT, &priv->jobs);
clear_bit(FLAG_PENDING_XMIT, &priv->flags);
status = transmit_802_3_packet (pr... | 1,451 |
85,541 | 0 | static void hns_gmac_get_pausefrm_cfg(void *mac_drv, u32 *rx_pause_en,
u32 *tx_pause_en)
{
u32 pause_en;
struct mac_driver *drv = (struct mac_driver *)mac_drv;
pause_en = dsaf_read_dev(drv, GMAC_PAUSE_EN_REG);
*rx_pause_en = dsaf_get_bit(pause_en, GMAC_PAUSE_EN_RX_FDFC_B);
*tx_pause_en = dsaf_get_bit(p... | 1,452 |
147,889 | 0 | static void StringifierAttributeAttributeSetter(
v8::Local<v8::Value> v8_value, const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = info.GetIsolate();
ALLOW_UNUSED_LOCAL(isolate);
v8::Local<v8::Object> holder = info.Holder();
ALLOW_UNUSED_LOCAL(holder);
TestObject* impl = V8TestObj... | 1,453 |
56,289 | 0 | SAPI_API int sapi_register_post_entry(sapi_post_entry *post_entry TSRMLS_DC)
{
if (SG(sapi_started) && EG(in_execution)) {
return FAILURE;
}
return zend_hash_add(&SG(known_post_content_types),
post_entry->content_type, post_entry->content_type_len+1,
(void *) post_entry, sizeof(sapi_post_entry), NULL);
}
| 1,454 |
19,726 | 0 | static int is_hugetlb_entry_hwpoisoned(pte_t pte)
{
swp_entry_t swp;
if (huge_pte_none(pte) || pte_present(pte))
return 0;
swp = pte_to_swp_entry(pte);
if (non_swap_entry(swp) && is_hwpoison_entry(swp))
return 1;
else
return 0;
}
| 1,455 |
119,026 | 0 | void WebContentsImpl::RouteMessageEvent(
RenderViewHost* rvh,
const ViewMsg_PostMessage_Params& params) {
if (!rvh->GetSiteInstance()->IsRelatedSiteInstance(GetSiteInstance()) &&
!GetBrowserPluginGuest() && !GetBrowserPluginEmbedder())
return;
ViewMsg_PostMessage_Params new_params(params);
if ... | 1,456 |
2,413 | 0 | NTSTATUS smb1cli_req_chain_submit(struct tevent_req **reqs, int num_reqs)
{
struct smbXcli_req_state *first_state =
tevent_req_data(reqs[0],
struct smbXcli_req_state);
struct smbXcli_req_state *state;
size_t wct_offset;
size_t chain_padding = 0;
int i, iovlen;
struct iovec *iov = NULL;
struct iovec *this_iov... | 1,457 |
38,078 | 0 | int picolcd_reset(struct hid_device *hdev)
{
struct picolcd_data *data = hid_get_drvdata(hdev);
struct hid_report *report = picolcd_out_report(REPORT_RESET, hdev);
unsigned long flags;
int error;
if (!data || !report || report->maxfield != 1)
return -ENODEV;
spin_lock_irqsave(&data->lock, flags);
if (hdev->p... | 1,458 |
134,049 | 0 | bool ExtensionRegistry::AddBlacklisted(
const scoped_refptr<const Extension>& extension) {
return blacklisted_extensions_.Insert(extension);
}
| 1,459 |
418 | 0 | indexed_to_alt(fz_context *ctx, const fz_colorspace *cs, const float *color, float *alt)
{
struct indexed *idx = cs->data;
int i, k;
int n = idx->base->n;
i = color[0] * 255;
i = fz_clampi(i, 0, idx->high);
for (k = 0; k < n; k++)
alt[k] = idx->lookup[i * n + k] / 255.0f;
}
| 1,460 |
125,664 | 0 | bool RenderViewHostImpl::OnMessageReceived(const IPC::Message& msg) {
if (!BrowserMessageFilter::CheckCanDispatchOnUI(msg, this))
return true;
if (is_swapped_out_) {
if (!SwappedOutMessages::CanHandleWhileSwappedOut(msg)) {
if (msg.is_sync()) {
IPC::Message* reply = IPC::SyncMessage::Generate... | 1,461 |
9,078 | 0 | static void vmxnet3_validate_queues(VMXNET3State *s)
{
/*
* txq_num and rxq_num are total number of queues
* configured by guest. These numbers must not
* exceed corresponding maximal values.
*/
if (s->txq_num > VMXNET3_DEVICE_MAX_TX_QUEUES) {
hw_error("Bad TX queues number: %d\n", s->t... | 1,462 |
55,878 | 0 | static void queue_release_one_tty(struct kref *kref)
{
struct tty_struct *tty = container_of(kref, struct tty_struct, kref);
/* The hangup queue is now free so we can reuse it rather than
waste a chunk of memory for each port */
INIT_WORK(&tty->hangup_work, release_one_tty);
schedule_work(&tty->hangup_work);
}... | 1,463 |
2,266 | 0 | get_current_time(void)
{
struct timeval tv;
gettimeofday(&tv, NULL);
return (double) tv.tv_sec + (double) tv.tv_usec / 1000000.0;
}
| 1,464 |
55,014 | 0 | static int limit_list(struct rev_info *revs)
{
int slop = SLOP;
unsigned long date = ~0ul;
struct commit_list *list = revs->commits;
struct commit_list *newlist = NULL;
struct commit_list **p = &newlist;
struct commit_list *bottom = NULL;
struct commit *interesting_cache = NULL;
if (revs->ancestry_path) {
bo... | 1,465 |
160,000 | 0 | int DiskCacheBackendTest::GetRoundedSize(int exact_size) {
if (!simple_cache_mode_)
return exact_size;
return (exact_size + 255) & 0xFFFFFF00;
}
| 1,466 |
135,494 | 0 | MockPasswordManagerDriver* mock_driver() { return &driver_; }
| 1,467 |
160,363 | 0 | bool LargeObjectPage::contains(Address object) {
return roundToBlinkPageStart(getAddress()) <= object &&
object < roundToBlinkPageEnd(getAddress() + size());
}
| 1,468 |
10,371 | 0 | user_local_get_object_path (User *user)
{
return user->object_path;
}
| 1,469 |
174,180 | 0 | vpx_enc_frame_flags_t SoftVPXEncoder::getEncodeFlags() {
vpx_enc_frame_flags_t flags = 0;
int patternIdx = mTemporalPatternIdx % mTemporalPatternLength;
mTemporalPatternIdx++;
switch (mTemporalPattern[patternIdx]) {
case kTemporalUpdateLast:
flags |= VP8_EFLAG_NO_UPD_GF;
flags |= VP8_EFL... | 1,470 |
139,567 | 0 | static String ValueDefaultParagraphSeparator(const EditorInternalCommand&,
LocalFrame& frame,
Event*) {
switch (frame.GetEditor().DefaultParagraphSeparator()) {
case kEditorParagraphSeparatorIsDiv:
return divTag.LocalN... | 1,471 |
97,448 | 0 | void FrameLoader::loadWithNavigationAction(const ResourceRequest& request, const NavigationAction& action, bool lockHistory, FrameLoadType type, PassRefPtr<FormState> formState)
{
RefPtr<DocumentLoader> loader = m_client->createDocumentLoader(request, SubstituteData());
if (lockHistory && m_documentLoader)
... | 1,472 |
150,829 | 0 | void WebBluetoothServiceImpl::RequestScanningStartImpl(
blink::mojom::WebBluetoothScanClientAssociatedPtr client,
blink::mojom::WebBluetoothRequestLEScanOptionsPtr options,
RequestScanningStartCallback callback,
device::BluetoothAdapter* adapter) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (IsRequ... | 1,473 |
19,279 | 0 | static int __init af_unix_init(void)
{
int rc = -1;
struct sk_buff *dummy_skb;
BUILD_BUG_ON(sizeof(struct unix_skb_parms) > sizeof(dummy_skb->cb));
rc = proto_register(&unix_proto, 1);
if (rc != 0) {
printk(KERN_CRIT "%s: Cannot create unix_sock SLAB cache!\n",
__func__);
goto out;
}
sock_registe... | 1,474 |
162,549 | 0 | void Resource::MarkAsPreload() {
DCHECK(!is_unused_preload_);
is_unused_preload_ = true;
}
| 1,475 |
36,894 | 0 | static int test_inode_iunique(struct super_block *sb, unsigned long ino)
{
struct hlist_head *b = inode_hashtable + hash(sb, ino);
struct inode *inode;
spin_lock(&inode_hash_lock);
hlist_for_each_entry(inode, b, i_hash) {
if (inode->i_ino == ino && inode->i_sb == sb) {
spin_unlock(&inode_hash_lock);
return... | 1,476 |
157,763 | 0 | void WebContentsImpl::FocusedNodeTouched(bool editable) {
#if defined(OS_WIN)
RenderWidgetHostView* view = GetRenderWidgetHostView();
if (!view)
return;
view->FocusedNodeTouched(editable);
#endif
}
| 1,477 |
86,985 | 0 | static void umap_remove_region(struct vm_info *vmi, struct vm_region *reg)
{
TAILQ_REMOVE(&vmi->regions, reg, link);
free(reg);
}
| 1,478 |
12,671 | 0 | read_header_name(uschar *name, int max, uschar *s)
{
int prelen = Ustrchr(name, '_') - name + 1;
int ptr = Ustrlen(name) - prelen;
if (ptr > 0) memmove(name, name+prelen, ptr);
while (mac_isgraph(*s) && *s != ':')
{
if (ptr < max-1) name[ptr++] = *s;
s++;
}
if (*s == ':') s++;
name[ptr++] = ':';
name[ptr] = 0;
... | 1,479 |
186,170 | 1 | void UserSelectionScreen::OnBeforeUserRemoved(const AccountId& account_id) {
for (user_manager::UserList::iterator it = users_.begin(); it != users_.end();
++it) {
if ((*it)->GetAccountId() == account_id) {
users_.erase(it);
break;
}
}
}
| 1,480 |
96,589 | 0 | int mbedtls_ecp_tls_read_group( mbedtls_ecp_group *grp, const unsigned char **buf, size_t len )
{
uint16_t tls_id;
const mbedtls_ecp_curve_info *curve_info;
/*
* We expect at least three bytes (see below)
*/
if( len < 3 )
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
/*
* First ... | 1,481 |
123,736 | 0 | bool DirectoryExists(const FilePath& path) {
base::ThreadRestrictions::AssertIOAllowed();
stat_wrapper_t file_info;
if (CallStat(path.value().c_str(), &file_info) == 0)
return S_ISDIR(file_info.st_mode);
return false;
}
| 1,482 |
147,401 | 0 | static void FloatMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
TestObject* impl = V8TestObject::ToImpl(info.Holder());
V8SetReturnValue(info, impl->floatMethod());
}
| 1,483 |
47,075 | 0 | static int xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
struct scatterlist *src, unsigned int nbytes)
{
struct twofish_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm);
return glue_xts_crypt_128bit(&twofish_dec_xts, desc, dst, src, nbytes,
XTS_TWEAK_CAST(twofish_enc_blk),
... | 1,484 |
41,369 | 0 | void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu)
{
int idx;
kfree(vcpu->arch.mce_banks);
kvm_free_lapic(vcpu);
idx = srcu_read_lock(&vcpu->kvm->srcu);
kvm_mmu_destroy(vcpu);
srcu_read_unlock(&vcpu->kvm->srcu, idx);
free_page((unsigned long)vcpu->arch.pio_data);
}
| 1,485 |
176,021 | 0 | void bta_av_rc_browse_close(tBTA_AV_CB* p_cb, tBTA_AV_DATA* p_data) {
APPL_TRACE_WARNING("%s: empty placeholder does nothing!", __func__);
}
| 1,486 |
79,520 | 0 | static void finalize_chunk(struct Buffer *res, struct Buffer *buf, char *charset, size_t charsetlen)
{
char end = charset[charsetlen];
charset[charsetlen] = '\0';
mutt_ch_convert_string(&buf->data, charset, Charset, MUTT_ICONV_HOOK_FROM);
charset[charsetlen] = end;
mutt_mb_filter_unprintable(&buf->data);
mu... | 1,487 |
144,868 | 0 | void HandleMousePressEvent(int x, int y) {
WebMouseEvent event(
WebInputEvent::kMouseDown, WebFloatPoint(x, y), WebFloatPoint(x, y),
WebPointerProperties::Button::kLeft, 0,
WebInputEvent::Modifiers::kLeftButtonDown, CurrentTimeTicksInSeconds());
event.SetFrameScale(1);
GetEventHand... | 1,488 |
59,418 | 0 | xmlCtxtGrowAttrs(xmlParserCtxtPtr ctxt, int nr) {
const xmlChar **atts;
int *attallocs;
int maxatts;
if (ctxt->atts == NULL) {
maxatts = 55; /* allow for 10 attrs by default */
atts = (const xmlChar **)
xmlMalloc(maxatts * sizeof(xmlChar *));
if (atts == NULL) goto mem_error;
ctxt->atts = a... | 1,489 |
16,206 | 0 | GahpClient::gt4_gram_client_job_status(const char * job_contact,
char ** job_status, char ** job_fault, int * exit_code)
{
static const char* command = "GT4_GRAM_JOB_STATUS";
if (server->m_commands_supported->contains_anycase(command)==FALSE) {
return GAHPCLIENT_COMMAND_NOT_SUPPORTED;
}
if (!job_contact) job_... | 1,490 |
122,271 | 0 | bool HTMLFormControlElement::isDefaultButtonForForm() const
{
return isSuccessfulSubmitButton() && form() && form()->defaultButton() == this;
}
| 1,491 |
112,270 | 0 | void ChromeRenderMessageFilter::OnCanTriggerClipboardRead(
const GURL& origin, bool* allowed) {
*allowed = extension_info_map_->SecurityOriginHasAPIPermission(
origin, render_process_id_, ExtensionAPIPermission::kClipboardRead);
}
| 1,492 |
105,235 | 0 | void HTMLElement::collectStyleForAttribute(const Attribute& attribute, StylePropertySet* style)
{
if (attribute.name() == alignAttr) {
if (equalIgnoringCase(attribute.value(), "middle"))
addPropertyToAttributeStyle(style, CSSPropertyTextAlign, CSSValueCenter);
else
addPropert... | 1,493 |
133,506 | 0 | void MoveAllTransientChildrenToNewRoot(const gfx::Display& display,
aura::Window* window) {
aura::Window* dst_root = Shell::GetInstance()
->window_tree_host_manager()
->GetRootWindowForDisplayId(display.id());
aura:... | 1,494 |
87,203 | 0 | NTSTATUS TCCompleteIrp (PIRP irp, NTSTATUS status, ULONG_PTR information)
{
irp->IoStatus.Status = status;
irp->IoStatus.Information = information;
IoCompleteRequest (irp, IO_NO_INCREMENT);
return status;
}
| 1,495 |
174,330 | 0 | status_t IPCThreadState::requestDeathNotification(int32_t handle, BpBinder* proxy)
{
mOut.writeInt32(BC_REQUEST_DEATH_NOTIFICATION);
mOut.writeInt32((int32_t)handle);
mOut.writePointer((uintptr_t)proxy);
return NO_ERROR;
}
| 1,496 |
183,301 | 1 | hcom_client_init
(
OUT p_hsm_com_client_hdl_t *p_hdl,
IN char *server_path,
IN char *client_path,
IN int max_data_len
)
{
hsm_com_client_hdl_t *hdl = NULL;
hsm_com_errno_t res = HSM_COM_OK;
if((strlen(server_path) > (HSM_COM_SVR_MAX_PATH - 1)) ||
(strlen(server_path) == 0)){
res = HSM... | 1,497 |
149,217 | 0 | void HTMLFormControlElement::AssociateWith(HTMLFormElement* form) {
AssociateByParser(form);
}
| 1,498 |
66,270 | 0 | IW_IMPL(const char*) iw_get_fmt_name(int fmt)
{
static const char *n;
n=NULL;
switch(fmt) {
case IW_FORMAT_PNG: n="PNG"; break;
case IW_FORMAT_JPEG: n="JPEG"; break;
case IW_FORMAT_BMP: n="BMP"; break;
case IW_FORMAT_TIFF: n="TIFF"; break;
case IW_FORMAT_MIFF: n="MIFF"; break;
case IW_FORMAT_WEBP: n="WebP"... | 1,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.