unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
186,683 | 1 | void HeapAllocator::backingFree(void* address) {
if (!address)
return;
ThreadState* state = ThreadState::current();
if (state->sweepForbidden())
return;
ASSERT(!state->isInGC());
// Don't promptly free large objects because their page is never reused.
// Don't free backings allocated on other threads.
BasePage* page ... | 14,000 |
54,499 | 0 | static int mov_metadata_gnre(MOVContext *c, AVIOContext *pb,
unsigned len, const char *key)
{
short genre;
char buf[20];
avio_r8(pb); // unknown
genre = avio_r8(pb);
if (genre < 1 || genre > ID3v1_GENRE_MAX)
return 0;
snprintf(buf, sizeof(buf), "%s", ff_id3... | 14,001 |
39,914 | 0 | void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
{
unsigned long flags;
spin_lock_irqsave(&list->lock, flags);
__skb_queue_tail(list, newsk);
spin_unlock_irqrestore(&list->lock, flags);
}
| 14,002 |
169,026 | 0 | void OfflinePageModelTaskified::RemovePagesMatchingUrlAndNamespace(
const OfflinePageItem& page) {
auto task = DeletePageTask::CreateTaskDeletingForPageLimit(
store_.get(),
base::BindOnce(&OfflinePageModelTaskified::OnDeleteDone,
weak_ptr_factory_.GetWeakPtr(),
... | 14,003 |
187,901 | 1 | void SoftAMR::onQueueFilled(OMX_U32 /* portIndex */) {
List<BufferInfo *> &inQueue = getPortQueue(0);
List<BufferInfo *> &outQueue = getPortQueue(1);
if (mSignalledError || mOutputPortSettingsChange != NONE) {
return;
}
while (!inQueue.empty() && !outQueue.empty()) {
BufferInfo *inInfo = *inQueue.begin();
... | 14,004 |
24,721 | 0 | asmlinkage long sys_gettimeofday(struct timeval __user *tv,
struct timezone __user *tz)
{
if (likely(tv != NULL)) {
struct timeval ktv;
do_gettimeofday(&ktv);
if (copy_to_user(tv, &ktv, sizeof(ktv)))
return -EFAULT;
}
if (unlikely(tz != NULL)) {
if (copy_to_user(tz, &sys_tz, sizeof(sys_tz)))
retur... | 14,005 |
4,145 | 0 | void Splash::setOverprintMask(Guint overprintMask, GBool additive) {
state->overprintMask = overprintMask;
state->overprintAdditive = additive;
}
| 14,006 |
55,634 | 0 | asmlinkage __visible void __sched schedule(void)
{
struct task_struct *tsk = current;
sched_submit_work(tsk);
do {
preempt_disable();
__schedule(false);
sched_preempt_enable_no_resched();
} while (need_resched());
}
| 14,007 |
13,152 | 0 | xps_parse_rectangle(xps_document *doc, char *text, fz_rect *rect)
{
float args[4];
char *s = text;
int i;
args[0] = 0; args[1] = 0;
args[2] = 1; args[3] = 1;
for (i = 0; i < 4 && *s; i++)
{
args[i] = fz_atof(s);
while (*s && *s != ',')
s++;
if (*s == ',')
s++;
}
rect->x0 = args[0];
rect->y0 = a... | 14,008 |
78,325 | 0 | coolkey_v1_get_attribute_record_len(const u8 *attr, size_t buf_len)
{
size_t attribute_len = sizeof(coolkey_attribute_header_t);
size_t len = 0;
int r;
r = coolkey_v1_get_attribute_len(attr, buf_len, &len, 1);
if (r < 0) {
return buf_len; /* skip to the end, ignore the rest of the record */
}
return MIN(buf_... | 14,009 |
121,473 | 0 | void DevToolsWindow::UpdateTheme() {
ThemeService* tp = ThemeServiceFactory::GetForProfile(profile_);
DCHECK(tp);
std::string command("InspectorFrontendAPI.setToolbarColors(\"" +
SkColorToRGBAString(tp->GetColor(ThemeProperties::COLOR_TOOLBAR)) +
"\", \"" +
SkColorToRGBAString(tp->GetColor(Them... | 14,010 |
174,480 | 0 | virtual status_t signRSA(Vector<uint8_t> const &sessionId,
String8 const &algorithm,
Vector<uint8_t> const &message,
Vector<uint8_t> const &wrappedKey,
Vector<uint8_t> &signature) {
Parcel data, reply;
data.writeInterfaceToken(IDrm::getInterfaceDescriptor());
writeVector(data, sessionId);
... | 14,011 |
64,034 | 0 | static HuffReader *get_huffman_group(WebPContext *s, ImageContext *img,
int x, int y)
{
ImageContext *gimg = &s->image[IMAGE_ROLE_ENTROPY];
int group = 0;
if (gimg->size_reduction > 0) {
int group_x = x >> gimg->size_reduction;
int group_y = y >> gimg->s... | 14,012 |
55,847 | 0 | static void __proc_set_tty(struct tty_struct *tty)
{
unsigned long flags;
spin_lock_irqsave(&tty->ctrl_lock, flags);
/*
* The session and fg pgrp references will be non-NULL if
* tiocsctty() is stealing the controlling tty
*/
put_pid(tty->session);
put_pid(tty->pgrp);
tty->pgrp = get_pid(task_pgrp(current)... | 14,013 |
10,496 | 0 | static void iscsi_allocationmap_set(IscsiLun *iscsilun, int64_t sector_num,
int nb_sectors)
{
if (iscsilun->allocationmap == NULL) {
return;
}
bitmap_set(iscsilun->allocationmap,
sector_num / iscsilun->cluster_sectors,
DIV_ROUND_UP(nb... | 14,014 |
143,650 | 0 | void RenderWidgetHostImpl::Init() {
DCHECK(process_->HasConnection());
renderer_initialized_ = true;
if (view_) {
Send(new ViewMsg_SetSurfaceIdNamespace(routing_id_,
view_->GetSurfaceIdNamespace()));
}
SendScreenRects();
WasResized();
if (owner_delegate_)... | 14,015 |
167,827 | 0 | void DownloadRequestLimiter::SetOnCanDownloadDecidedCallbackForTesting(
Callback callback) {
on_can_download_decided_callback_ = callback;
}
| 14,016 |
177,610 | 0 | virtual void PreDecodeFrameHook(
const libvpx_test::CompressedVideoSource &video,
libvpx_test::Decoder *decoder) {
if (num_buffers_ > 0 && video.frame_number() == 0) {
ASSERT_TRUE(fb_list_.CreateBufferList(num_buffers_));
ASSERT_EQ(VPX_CODEC_OK,
decoder->SetFrameBufferFunctions(
Ge... | 14,017 |
89,293 | 0 | int fpga_reset(void)
{
int ret = 0;
u8 resets;
if (!check_boco2()) {
/* we do not have BOCO2, this is not really used */
return 0;
}
/* if we have skipped, we only want to reset the PCIe part */
resets = skip ? PCIE_RST : PCIE_RST | TRAFFIC_RST;
ret = boco_clear_bits(PRST1, resets);
if (ret)
return ret... | 14,018 |
43,725 | 0 | static void ndisc_send_skb(struct sk_buff *skb,
const struct in6_addr *daddr,
const struct in6_addr *saddr)
{
struct dst_entry *dst = skb_dst(skb);
struct net *net = dev_net(skb->dev);
struct sock *sk = net->ipv6.ndisc_sk;
struct inet6_dev *idev;
int err;
struct icmp6hdr *icmp6h = icmp6_hdr(skb);
u8 ... | 14,019 |
179,011 | 1 | static void perf_swevent_overflow(struct perf_event *event, u64 overflow,
int nmi, struct perf_sample_data *data,
struct pt_regs *regs)
{
struct hw_perf_event *hwc = &event->hw;
int throttle = 0;
data->period = event->hw.last_period;
if (!overflow)
overflow = perf_swevent_set_period(event);
if (hwc->interrupt... | 14,020 |
113,283 | 0 | NativePanelTesting* NativePanelTesting::Create(NativePanel* native_panel) {
return new NativePanelTestingWin(static_cast<PanelBrowserView*>(
native_panel));
}
| 14,021 |
163,178 | 0 | void ExecuteScriptAndCheckPDFNavigation(
RenderFrameHost* rfh,
const std::string& javascript,
ExpectedNavigationStatus expected_navigation_status) {
const GURL original_url(shell()->web_contents()->GetLastCommittedURL());
const std::string expected_message =
(expected_navigation_sta... | 14,022 |
61,774 | 0 | static int cine_read_probe(AVProbeData *p)
{
int HeaderSize;
if (p->buf[0] == 'C' && p->buf[1] == 'I' && // Type
(HeaderSize = AV_RL16(p->buf + 2)) >= 0x2C && // HeaderSize
AV_RL16(p->buf + 4) <= CC_UNINT && // Compression
AV_RL16(p->buf + 6) <= 1 && // Version
... | 14,023 |
6,625 | 0 | lib_file_open_search_with_combine(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx_p,
const char *fname, uint flen, char *buffer, int blen, uint *pclen, ref *pfile,
gx_io_device *iodev, bool starting_arg_file, char *fmode)
{
strea... | 14,024 |
47,803 | 0 | int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream,
const struct snd_pcm_chmap_elem *chmap,
int max_channels,
unsigned long private_value,
struct snd_pcm_chmap **info_ret)
{
struct snd_pcm_chmap *info;
struct snd_kcontrol_new knew = {
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
.access = SN... | 14,025 |
141,672 | 0 | double getDoubleFromMap(v8::Local<v8::Map> map, const String16& key, double defaultValue)
{
v8::Local<v8::String> v8Key = toV8String(m_isolate, key);
if (!map->Has(m_context, v8Key).FromMaybe(false))
return defaultValue;
v8::Local<v8::Value> intValue;
if (!map->Get(m_... | 14,026 |
77,114 | 0 | OVS_EXCLUDED(ofproto_mutex)
{
struct ofport *ofport, *next_ofport;
struct ofport_usage *usage;
if (!p) {
return;
}
if (p->meters) {
meter_delete(p, 1, p->meter_features.max_meters);
p->meter_features.max_meters = 0;
free(p->meters);
p->meters = NULL;
... | 14,027 |
63,526 | 0 | void mq_clear_sbinfo(struct ipc_namespace *ns)
{
ns->mq_mnt->mnt_sb->s_fs_info = NULL;
}
| 14,028 |
53,364 | 0 | get_parameters(struct iperf_test *test)
{
int r = 0;
cJSON *j;
cJSON *j_p;
j = JSON_read(test->ctrl_sck);
if (j == NULL) {
i_errno = IERECVPARAMS;
r = -1;
} else {
if (test->debug) {
printf("get_parameters:\n%s\n", cJSON_Print(j));
}
if ((j_p = cJSON_GetObjectItem(j, "tcp")) !... | 14,029 |
144,228 | 0 | void LockContentsView::UpdateEasyUnlockIconForUser(const AccountId& user) {
LoginBigUserView* big_view =
TryToFindBigUser(user, false /*require_auth_active*/);
if (!big_view || !big_view->auth_user())
return;
UserState* state = FindStateForUser(user);
DCHECK(state);
if (!state->easy_unlock_state) ... | 14,030 |
186,313 | 1 | void MediaControlsProgressView::HandleSeeking(
const gfx::Point& location_in_bar) {
double seek_to_progress =
static_cast<double>(location_in_bar.x()) / progress_bar_->width();
seek_callback_.Run(seek_to_progress);
}
| 14,031 |
155,891 | 0 | std::vector<gfx::Image> GetImagesForAccounts(
const std::vector<AccountInfo>& accounts,
Profile* profile) {
AccountTrackerService* tracker_service =
AccountTrackerServiceFactory::GetForProfile(profile);
std::vector<gfx::Image> images;
for (auto account : accounts) {
images.push_back(tracker_serv... | 14,032 |
17,174 | 0 | void OxideQQuickWebView::setRestoreState(const QString& state) {
Q_D(OxideQQuickWebView);
if (d->proxy_) {
qWarning() <<
"OxideQQuickWebView: restoreState must be provided during construction";
return;
}
d->construct_props_->restore_state =
QByteArray::fromBase64(state.toLocal8Bit());
}
| 14,033 |
99,881 | 0 | void WebPluginDelegateProxy::OnCancelDocumentLoad() {
plugin_->CancelDocumentLoad();
}
| 14,034 |
94,818 | 0 | MagickExport MagickBooleanType SyncAuthenticPixels(Image *image,
ExceptionInfo *exception)
{
CacheInfo
*magick_restrict cache_info;
const int
id = GetOpenMPThreadId();
MagickBooleanType
status;
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
assert(image->c... | 14,035 |
125,115 | 0 | PluginProcessHost* PluginServiceImpl::FindOrStartNpapiPluginProcess(
int render_process_id,
const FilePath& plugin_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
if (filter_ && !filter_->CanLoadPlugin(render_process_id, plugin_path))
return NULL;
PluginProcessHost* plugin_host = Find... | 14,036 |
82,320 | 0 | JsVar *jspeConditionalExpression() {
return __jspeConditionalExpression(jspeBinaryExpression());
}
| 14,037 |
96,407 | 0 | int main(int argc, char **argv)
{
/* I18n */
setlocale(LC_ALL, "");
#if ENABLE_NLS
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
#endif
abrt_init(argv);
/* Can't keep these strings/structs static: _() doesn't support that */
const char *program_usage_string = _(
"& [-vus... | 14,038 |
71,990 | 0 | static int CompareEdges(const void *x,const void *y)
{
register const EdgeInfo
*p,
*q;
/*
Compare two edges.
*/
p=(const EdgeInfo *) x;
q=(const EdgeInfo *) y;
if ((p->points[0].y-DrawEpsilon) > q->points[0].y)
return(1);
if ((p->points[0].y+DrawEpsilon) < q->points[0].y)
return(-1);
... | 14,039 |
45,016 | 0 | static int assign_eip_far(struct x86_emulate_ctxt *ctxt, ulong dst,
const struct desc_struct *cs_desc)
{
enum x86emul_mode mode = ctxt->mode;
#ifdef CONFIG_X86_64
if (ctxt->mode >= X86EMUL_MODE_PROT32 && cs_desc->l) {
u64 efer = 0;
ctxt->ops->get_msr(ctxt, MSR_EFER, &efer);
if (efer & EFER_LMA)
mode =... | 14,040 |
70,392 | 0 | int jas_matrix_cmp(jas_matrix_t *mat0, jas_matrix_t *mat1)
{
int i;
int j;
if (mat0->numrows_ != mat1->numrows_ || mat0->numcols_ !=
mat1->numcols_) {
return 1;
}
for (i = 0; i < mat0->numrows_; i++) {
for (j = 0; j < mat0->numcols_; j++) {
if (jas_matrix_get(mat0, i, j) != jas_matrix_get(mat1, i, j)) {... | 14,041 |
128,051 | 0 | static void SetForceAuxiliaryBitmapRendering(
JNIEnv* env,
const JavaParamRef<jclass>&,
jboolean force_auxiliary_bitmap_rendering) {
g_force_auxiliary_bitmap_rendering = force_auxiliary_bitmap_rendering;
}
| 14,042 |
177,252 | 0 | void ACodec::onFrameRendered(int64_t mediaTimeUs, nsecs_t systemNano) {
if (mRenderTracker.onFrameRendered(mediaTimeUs, systemNano) != OK) {
mRenderTracker.dumpRenderQueue();
}
}
| 14,043 |
156,916 | 0 | void DocumentLoader::SetHistoryItemStateForCommit(
HistoryItem* old_item,
WebFrameLoadType load_type,
HistoryNavigationType navigation_type) {
if (!history_item_ || !IsBackForwardLoadType(load_type))
history_item_ = HistoryItem::Create();
history_item_->SetURL(UrlForHistory());
history_item_->Set... | 14,044 |
53,078 | 0 | static void __user *u64_to_ptr(__u64 val)
{
return (void __user *) (unsigned long) val;
}
| 14,045 |
160,199 | 0 | void PDFiumEngine::CalculateVisiblePages() {
if (!doc_loader_)
return;
pending_pages_.clear();
doc_loader_->ClearPendingRequests();
std::vector<int> formerly_visible_pages;
std::swap(visible_pages_, formerly_visible_pages);
pp::Rect visible_rect(plugin_size_);
for (int i = 0; i < static_cast<int>(pa... | 14,046 |
115,441 | 0 | static inline bool isLocalFileScheme(WKStringRef scheme)
{
return WKStringIsEqualToUTF8CStringIgnoringCase(scheme, "file");
}
| 14,047 |
52,697 | 0 | static struct snd_timer_instance *snd_timer_instance_new(char *owner,
struct snd_timer *timer)
{
struct snd_timer_instance *timeri;
timeri = kzalloc(sizeof(*timeri), GFP_KERNEL);
if (timeri == NULL)
return NULL;
timeri->owner = kstrdup(owner, GFP_KERNEL);
if (! timeri->owner) {
kfree(timeri);
return ... | 14,048 |
180,033 | 1 | sctp_disposition_t sctp_sf_ootb(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = arg;
struct sk_buff *skb = chunk->skb;
sctp_chunkhdr_t *ch;
sctp_errhdr_t *err;
__u8 *ch_end;
int ootb_shut_a... | 14,049 |
73,542 | 0 | static inline const unsigned char *ReadResourceLong(const unsigned char *p,
unsigned int *quantum)
{
*quantum=(size_t) (*p++ << 24);
*quantum|=(size_t) (*p++ << 16);
*quantum|=(size_t) (*p++ << 8);
*quantum|=(size_t) (*p++ << 0);
return(p);
}
| 14,050 |
151,260 | 0 | bool InspectorPageAgent::SharedBufferContent(RefPtr<const SharedBuffer> buffer,
const String& mime_type,
const String& text_encoding_name,
String* result,
... | 14,051 |
121,828 | 0 | void ImageLoader::dispatchPendingEvent(ImageEventSender* eventSender)
{
ASSERT(eventSender == &beforeLoadEventSender() || eventSender == &loadEventSender() || eventSender == &errorEventSender());
const AtomicString& eventType = eventSender->eventType();
if (eventType == eventNames().beforeloadEvent)
... | 14,052 |
102,847 | 0 | PluginObserver::~PluginObserver() {
}
| 14,053 |
13,474 | 0 | void js_replace(js_State* J, int idx)
{
idx = idx < 0 ? TOP + idx : BOT + idx;
if (idx < BOT || idx >= TOP)
js_error(J, "stack error!");
STACK[idx] = STACK[--TOP];
}
| 14,054 |
75,716 | 0 | const URI_TYPE(Uri) * source, UriMemoryManager * memory) {
if (source->pathHead == NULL) {
/* No path component */
dest->pathHead = NULL;
dest->pathTail = NULL;
} else {
/* Copy list but not the text contained */
URI_TYPE(PathSegment) * sourceWalker = source->pathHead;
URI_TYPE(PathSegment) * destPrev =... | 14,055 |
85,085 | 0 | void read_frame_header(decoder_info_t *dec_info, stream_t *stream) {
frame_info_t *frame_info = &dec_info->frame_info;
frame_info->frame_type = get_flc(1, stream);
frame_info->qp = get_flc(8, stream);
frame_info->num_intra_modes = get_flc(4, stream);
if (frame_info->frame_type != I_FRAME) {
frame_info->nu... | 14,056 |
184,744 | 1 | static void webkitWebViewBaseContainerAdd(GtkContainer* container, GtkWidget* widget)
{
WebKitWebViewBase* webView = WEBKIT_WEB_VIEW_BASE(container);
WebKitWebViewBasePrivate* priv = webView->priv;
if (WEBKIT_IS_WEB_VIEW_BASE(widget)
&& WebInspectorProxy::isInspectorPage(WEBKIT_WEB_VIEW_BASE(widget)->priv->pageProxy.g... | 14,057 |
156,621 | 0 | void NavigatorImpl::LogResourceRequestTime(base::TimeTicks timestamp,
const GURL& url) {
if (navigation_data_ && navigation_data_->url_ == url) {
navigation_data_->url_job_start_time_ = timestamp;
UMA_HISTOGRAM_TIMES(
"Navigation.TimeToURLJobStart",
n... | 14,058 |
154,026 | 0 | void GLES2DecoderImpl::DoGetVertexAttribfv(GLuint index,
GLenum pname,
GLfloat* params,
GLsizei params_size) {
DoGetVertexAttribImpl<GLfloat>(index, pname, params);
}
| 14,059 |
98,872 | 0 | void WebSocket::DetachDelegate() {
if (!delegate_)
return;
delegate_ = NULL;
Close();
}
| 14,060 |
132,170 | 0 | void RenderViewTest::SimulateUserInputChangeForElement(
blink::WebInputElement* input,
const std::string& new_value) {
ASSERT_TRUE(base::IsStringASCII(new_value));
while (!input->focused())
input->document().frame()->view()->advanceFocus(false);
size_t previous_length = input->value().length();
for... | 14,061 |
183,495 | 1 | ResourceDispatcherHost::~ResourceDispatcherHost() {
AsyncResourceHandler::GlobalCleanup();
STLDeleteValues(&pending_requests_);
user_script_listener_->ShutdownMainThread();
// Clear blocked requests if any left.
// Note that we have to do this in 2 passes as we cannot call
// CancelBlockedRequestsForRoute while ... | 14,062 |
16,735 | 0 | static void str_init_source(j_decompress_ptr cinfo)
{
}
| 14,063 |
185,493 | 1 | void HWNDMessageHandler::Init(HWND parent, const gfx::Rect& bounds) {
TRACE_EVENT0("views", "HWNDMessageHandler::Init");
GetMonitorAndRects(bounds.ToRECT(), &last_monitor_, &last_monitor_rect_,
&last_work_area_);
WindowImpl::Init(parent, bounds);
}
| 14,064 |
146,124 | 0 | void WebGL2RenderingContextBase::resumeTransformFeedback() {
if (isContextLost())
return;
if (transform_feedback_binding_ &&
transform_feedback_binding_->GetProgram() != current_program_) {
SynthesizeGLError(GL_INVALID_OPERATION, "resumeTransformFeedback",
"the program object is... | 14,065 |
102,860 | 0 | void RenderMenuList::didUpdateActiveOption(int optionIndex)
{
if (!AXObjectCache::accessibilityEnabled())
return;
if (m_lastActiveIndex == optionIndex)
return;
m_lastActiveIndex = optionIndex;
HTMLSelectElement* select = toHTMLSelectElement(node());
int listIndex = select->optionTo... | 14,066 |
56,724 | 0 | static void kill_ioctx(struct mm_struct *mm, struct kioctx *ctx,
struct completion *requests_done)
{
if (!atomic_xchg(&ctx->dead, 1)) {
struct kioctx_table *table;
spin_lock(&mm->ioctx_lock);
rcu_read_lock();
table = rcu_dereference(mm->ioctx_table);
WARN_ON(ctx != table->table[ctx->id]);
table->table[... | 14,067 |
149,550 | 0 | GURL GetDataURLWithContent(const std::string& content) {
std::string encoded_content;
base::Base64Encode(content, &encoded_content);
std::string data_uri_content = "data:text/html;base64," + encoded_content;
return GURL(data_uri_content);
}
| 14,068 |
89,215 | 0 | remove_opt_anc_info(OptAnc* to, int anc)
{
if (is_left(anc))
to->left &= ~anc;
else
to->right &= ~anc;
}
| 14,069 |
99,579 | 0 | bool VectorContains(const std::vector<std::string>& data,
const std::string& str) {
return std::find(data.begin(), data.end(), str) != data.end();
}
| 14,070 |
143,366 | 0 | void Job::DispatchAlertOrErrorOnOriginThread(bool is_alert,
int line_number,
const base::string16& message) {
CheckIsOnOriginThread();
if (cancelled_.IsSet())
return;
if (is_alert) {
VLOG(1) << "PAC-alert: " << mes... | 14,071 |
35,479 | 0 | ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx)
{
if (!tx->key)
return TX_CONTINUE;
switch (tx->key->conf.cipher) {
case WLAN_CIPHER_SUITE_WEP40:
case WLAN_CIPHER_SUITE_WEP104:
return ieee80211_crypto_wep_encrypt(tx);
case WLAN_CIPHER_SUITE_TKIP:
return ieee80211_crypto_tkip_encrypt(tx);
case WLAN_CIP... | 14,072 |
11,028 | 0 | init_uncompress( compress_filter_context_t *zfx, z_stream *zs )
{
int rc;
/****************
* PGP uses a windowsize of 13 bits. Using a negative value for
* it forces zlib not to expect a zlib header. This is a
* undocumented feature Peter Gutmann told me about.
*
* We must use 15... | 14,073 |
56,164 | 0 | static struct sock *__rfcomm_get_listen_sock_by_addr(u8 channel, bdaddr_t *src)
{
struct sock *sk = NULL;
sk_for_each(sk, &rfcomm_sk_list.head) {
if (rfcomm_pi(sk)->channel != channel)
continue;
if (bacmp(&rfcomm_pi(sk)->src, src))
continue;
if (sk->sk_state == BT_BOUND || sk->sk_state == BT_LISTEN)
... | 14,074 |
17,326 | 0 | set_default_lang ()
{
char *v;
v = get_string_value ("LC_ALL");
set_locale_var ("LC_ALL", v);
v = get_string_value ("LANG");
set_lang ("LANG", v);
}
| 14,075 |
96,981 | 0 | struct page *alloc_huge_page_node(struct hstate *h, int nid)
{
gfp_t gfp_mask = htlb_alloc_mask(h);
struct page *page = NULL;
if (nid != NUMA_NO_NODE)
gfp_mask |= __GFP_THISNODE;
spin_lock(&hugetlb_lock);
if (h->free_huge_pages - h->resv_huge_pages > 0)
page = dequeue_huge_page_nodemask(h, gfp_mask, nid, NUL... | 14,076 |
19,144 | 0 | static int tcp_v6_md5_hash_pseudoheader(struct tcp_md5sig_pool *hp,
const struct in6_addr *daddr,
const struct in6_addr *saddr, int nbytes)
{
struct tcp6_pseudohdr *bp;
struct scatterlist sg;
bp = &hp->md5_blk.ip6;
/* 1. TCP pseudo-header (RFC2460) */
ipv6_addr_copy(&bp->saddr, saddr);
ipv6_addr_copy(&... | 14,077 |
33,129 | 0 | static inline size_t xfrm_acquire_msgsize(struct xfrm_state *x,
struct xfrm_policy *xp)
{
return NLMSG_ALIGN(sizeof(struct xfrm_user_acquire))
+ nla_total_size(sizeof(struct xfrm_user_tmpl) * xp->xfrm_nr)
+ nla_total_size(sizeof(struct xfrm_mark))
+ nla_total_size(xfrm_user_sec_ctx_size(... | 14,078 |
15,276 | 0 | PHP_FUNCTION(stream_set_write_buffer)
{
zval *arg1;
int ret;
long arg2;
size_t buff;
php_stream *stream;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &arg1, &arg2) == FAILURE) {
RETURN_FALSE;
}
php_stream_from_zval(stream, &arg1);
buff = arg2;
/* if buff is 0 then set to non-buffered */
i... | 14,079 |
19,901 | 0 | static int nfs4_do_open_reclaim(struct nfs_open_context *ctx, struct nfs4_state *state)
{
struct nfs_server *server = NFS_SERVER(state->inode);
struct nfs4_exception exception = { };
int err;
do {
err = _nfs4_do_open_reclaim(ctx, state);
if (err != -NFS4ERR_DELAY)
break;
nfs4_handle_exception(server, err, ... | 14,080 |
23,358 | 0 | encode_getattr_three(struct xdr_stream *xdr,
uint32_t bm0, uint32_t bm1, uint32_t bm2,
struct compound_hdr *hdr)
{
__be32 *p;
p = reserve_space(xdr, 4);
*p = cpu_to_be32(OP_GETATTR);
if (bm2) {
p = reserve_space(xdr, 16);
*p++ = cpu_to_be32(3);
*p++ = cpu_to_be32(bm0);
*p++ = cpu_to_be32(bm1)... | 14,081 |
18,636 | 0 | int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
unsigned int flags, struct timespec *timeout)
{
int fput_needed, err, datagrams;
struct socket *sock;
struct mmsghdr __user *entry;
struct compat_mmsghdr __user *compat_entry;
struct msghdr msg_sys;
struct timespec end_time;
if (tim... | 14,082 |
151,041 | 0 | void DevToolsUIBindings::StopIndexing(int index_request_id) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
IndexingJobsMap::iterator it = indexing_jobs_.find(index_request_id);
if (it == indexing_jobs_.end())
return;
it->second->Stop();
indexing_jobs_.erase(it);
}
| 14,083 |
61,752 | 0 | int tcp_peek_len(struct socket *sock)
{
return tcp_inq(sock->sk);
}
| 14,084 |
155,580 | 0 | base::string16 AuthenticatorClientPinTapAgainSheetModel::GetStepDescription()
const {
return l10n_util::GetStringUTF16(IDS_WEBAUTHN_PIN_TAP_AGAIN_DESCRIPTION);
}
| 14,085 |
57,010 | 0 | static void sctp_cmd_setup_t4(sctp_cmd_seq_t *cmds,
struct sctp_association *asoc,
struct sctp_chunk *chunk)
{
struct sctp_transport *t;
t = sctp_assoc_choose_alter_transport(asoc, chunk->transport);
asoc->timeouts[SCTP_EVENT_TIMEOUT_T4_RTO] = t->rto;
chunk->transport = t;
}
| 14,086 |
23,773 | 0 | static int bond_xmit_hash_policy_l2(struct sk_buff *skb, int count)
{
struct ethhdr *data = (struct ethhdr *)skb->data;
return (data->h_dest[5] ^ data->h_source[5]) % count;
}
| 14,087 |
89,210 | 0 | print_optimize_info(FILE* f, regex_t* reg)
{
static const char* on[] = { "NONE", "STR",
"STR_FAST", "STR_FAST_STEP_FORWARD",
"STR_CASE_FOLD_FAST", "STR_CASE_FOLD", "MAP" };
fprintf(f, "optimize: %s\n", on[reg->optimize]);
fprintf(f, " anchor: "); print... | 14,088 |
146,904 | 0 | void Document::open() {
DCHECK(!ImportLoader());
if (frame_) {
if (ScriptableDocumentParser* parser = GetScriptableDocumentParser()) {
if (parser->IsParsing()) {
if (parser->IsExecutingScript())
return;
if (!parser->WasCreatedByScript() && parser->HasInsertionPoint())
... | 14,089 |
51,959 | 0 | SpoolssGetJob_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, dcerpc_info *di, guint8 *drep)
{
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
guint32 level, jobid;
/* Parse packet */
offset = dissect_nt_policy_hnd(
tvb, offset, pinfo, tree, di, drep, hf_hnd, NULL, NULL,
... | 14,090 |
161,968 | 0 | void PrepareFrameAndViewForPrint::StartPrinting() {
ResizeForPrinting();
blink::WebView* web_view = frame_.view();
web_view->GetSettings()->SetShouldPrintBackgrounds(should_print_backgrounds_);
expected_pages_count_ =
frame()->PrintBegin(web_print_params_, node_to_print_);
is_printing_started_ = true;
}... | 14,091 |
96,001 | 0 | void CL_StopVideo_f( void )
{
CL_CloseAVI( );
}
| 14,092 |
45,575 | 0 | static int crypto_ccm_decrypt(struct aead_request *req)
{
struct crypto_aead *aead = crypto_aead_reqtfm(req);
struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead);
struct crypto_ccm_req_priv_ctx *pctx = crypto_ccm_reqctx(req);
struct ablkcipher_request *abreq = &pctx->abreq;
struct scatterlist *dst;
unsigned int au... | 14,093 |
126,584 | 0 | void TabStripGtk::StopAnimation() {
if (active_animation_.get())
active_animation_->Stop();
}
| 14,094 |
183,933 | 1 | virtual void AddObserver(Observer* observer) {
if (!observers_.size()) {
observer->FirstObserverIsAdded(this);
}
observers_.AddObserver(observer);
}
| 14,095 |
169,533 | 0 | void AutomationInternalCustomBindings::OnMessageReceived(
const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(AutomationInternalCustomBindings, message)
IPC_MESSAGE_HANDLER(ExtensionMsg_AccessibilityEvent, OnAccessibilityEvent)
IPC_END_MESSAGE_MAP()
}
| 14,096 |
54,608 | 0 | static int __init snd_hrtimer_init(void)
{
struct snd_timer *timer;
int err;
resolution = hrtimer_resolution;
/* Create a new timer and set up the fields */
err = snd_timer_global_new("hrtimer", SNDRV_TIMER_GLOBAL_HRTIMER,
&timer);
if (err < 0)
return err;
timer->module = THIS_MODULE;
strcpy(timer->... | 14,097 |
137,410 | 0 | void RenderViewTest::SetUp() {
test_io_thread_ =
std::make_unique<base::TestIOThread>(base::TestIOThread::kAutoStart);
ipc_support_ = std::make_unique<mojo::edk::ScopedIPCSupport>(
test_io_thread_->task_runner(),
mojo::edk::ScopedIPCSupport::ShutdownPolicy::FAST);
if (!render_thread_)
rende... | 14,098 |
162,125 | 0 | void RenderProcessHost::PostTaskWhenProcessIsReady(base::OnceClosure task) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!task.is_null());
new RenderProcessHostIsReadyObserver(this, std::move(task));
}
| 14,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.