idx int64 | func string | target int64 |
|---|---|---|
521,775 | String *Field_short::val_str(String *val_buffer,
String *val_ptr __attribute__((unused)))
{
ASSERT_COLUMN_MARKED_FOR_READ;
CHARSET_INFO *cs= &my_charset_numeric;
uint length;
uint mlength=MY_MAX(field_length+1,7*cs->mbmaxlen);
val_buffer->alloc(mlength);
char *to=(char*) val_buffer->ptr();
short j... | 0 |
513,290 | CalcCost(s)
register char *s;
{
ASSERT(display);
if (s)
{
StrCost = 0;
ospeed = D_dospeed;
tputs(s, 1, CountChars);
return StrCost;
}
else
return EXPENSIVE;
} | 0 |
223,387 | static int set_password(struct parsed_mount_info *parsed_info, const char *src)
{
char *dst = parsed_info->password;
unsigned int i = 0, j = 0;
while (src[i]) {
if (src[i] == ',')
dst[j++] = ',';
dst[j++] = src[i++];
if (j > sizeof(parsed_info->password)) {
fprintf(stderr, "Converted password too long!\... | 0 |
271,996 | nv_operator(cmdarg_T *cap)
{
int op_type;
op_type = get_op_type(cap->cmdchar, cap->nchar);
#ifdef FEAT_JOB_CHANNEL
if (bt_prompt(curbuf) && op_is_change(op_type) && !prompt_curpos_editable())
{
clearopbeep(cap->oap);
return;
}
#endif
if (op_type == cap->oap->op_type) // double operat... | 0 |
281,382 | error::Error GLES2DecoderImpl::HandleDeleteProgram(
uint32_t immediate_data_size,
const volatile void* cmd_data) {
const volatile gles2::cmds::DeleteProgram& c =
*static_cast<const volatile gles2::cmds::DeleteProgram*>(cmd_data);
GLuint client_id = c.program;
if (client_id) {
Program* program = ... | 0 |
136,204 | COMPAT_SYSCALL_DEFINE2(clock_adjtime, clockid_t, which_clock,
struct compat_timex __user *, utp)
{
const struct k_clock *kc = clockid_to_kclock(which_clock);
struct timex ktx;
int err;
if (!kc)
return -EINVAL;
if (!kc->clock_adj)
return -EOPNOTSUPP;
err = compat_get_timex(&ktx, utp);
if (err)
re... | 0 |
279,842 | VaapiWrapper::LazyProfileInfos::LazyProfileInfos() {
static_assert(arraysize(supported_profiles_) == kCodecModeMax,
"The array size of supported profile is incorrect.");
scoped_ptr<VaapiWrapper> vaapi_wrapper(new VaapiWrapper());
if (!vaapi_wrapper->VaInitialize(base::Bind(&base::DoNothing)))
... | 0 |
283,957 | bool DocumentLoader::MaybeCreateArchive() {
if (!IsArchiveMIMEType(response_.MimeType()))
return false;
DCHECK(main_resource_);
ArchiveResource* main_resource =
fetcher_->CreateArchive(main_resource_.Get());
if (!main_resource)
return false;
EnsureWriter(main_resource->MimeType(), main_resource... | 0 |
353,567 | int ssl3_send_client_key_exchange(SSL *s)
{
unsigned char *p,*d;
int n;
unsigned long alg_k;
#ifndef OPENSSL_NO_RSA
unsigned char *q;
EVP_PKEY *pkey=NULL;
#endif
#ifndef OPENSSL_NO_KRB5
KSSL_ERR kssl_err;
#endif /* OPENSSL_NO_KRB5 */
#ifndef OPENSSL_NO_ECDH
EC_KEY *clnt_ecdh = NULL;
const EC_POINT *srvr_ecpoin... | 1 |
392,364 | xmlEscapeEntities(unsigned char* out, int *outlen,
const xmlChar* in, int *inlen) {
unsigned char* outstart = out;
const unsigned char* base = in;
unsigned char* outend = out + *outlen;
const unsigned char* inend;
int val;
inend = in + (*inlen);
while ((in < inend) && (out... | 0 |
177,102 | void QuotaManager::DidInitialize(int64* temporary_quota_override,
int64* desired_available_space,
bool success) {
temporary_quota_override_ = *temporary_quota_override;
desired_available_space_ = *desired_available_space;
temporary_quota_initialize... | 0 |
61,706 | bittok2str_nosep(register const struct tok *lp, register const char *fmt,
register u_int v)
{
return (bittok2str_internal(lp, fmt, v, ""));
} | 0 |
81,397 | static void sas_ata_internal_abort(struct sas_task *task)
{
struct sas_internal *si = dev_to_sas_internal(task->dev);
unsigned long flags;
int res;
spin_lock_irqsave(&task->task_state_lock, flags);
if (task->task_state_flags & SAS_TASK_STATE_ABORTED ||
task->task_state_flags & SAS_TASK_STATE_DONE) {
spin_u... | 0 |
17,072 | static void afx_class_init ( ObjectClass * klass , void * data ) {
SysBusDeviceClass * k = SYS_BUS_DEVICE_CLASS ( klass ) ;
k -> init = afx_init1 ;
} | 0 |
80,512 | int rdp_recv_autodetect_request_packet(rdpRdp* rdp, wStream* s)
{
AUTODETECT_REQ_PDU autodetectReqPdu;
BOOL success = FALSE;
if (Stream_GetRemainingLength(s) < 6)
return -1;
Stream_Read_UINT8(s, autodetectReqPdu.headerLength); /* headerLength (1 byte) */
Stream_Read_UINT8(s, autodetectReqPdu.headerTypeId); ... | 0 |
347,705 | static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
BMPInfo
bmp_info;
Image
*image;
IndexPacket
index;
MagickBooleanType
status;
MagickOffsetType
offset,
start_position;
MemoryInfo
*pixel_info;
register IndexPacket
*indexes;
register ... | 1 |
333,428 | static void test_reconnect(void)
{
gchar *path = g_strdup_printf("/%s/vhost-user/reconnect/subprocess",
qtest_get_arch());
g_test_trap_subprocess(path, 0, 0);
g_test_trap_assert_passed();
} | 1 |
33,602 | static void ClearBounds(Image *image,RectangleInfo *bounds)
{
ExceptionInfo
*exception;
ssize_t
y;
if (bounds->x < 0)
return;
if (image->matte == MagickFalse)
(void) SetImageAlphaChannel(image,OpaqueAlphaChannel);
exception=(&image->exception);
for (y=0; y < (ssize_t) bounds->height; y++)
... | 0 |
359,638 | connection_removed (NMExportedConnection *connection, gpointer user_data)
{
NMAGConfSettingsPrivate *priv = NMA_GCONF_SETTINGS_GET_PRIVATE (user_data);
priv->connections = g_slist_remove (priv->connections, connection);
g_object_unref (connection);
} | 0 |
152,724 | decode_OFPAT_RAW_SET_MPLS_LABEL(ovs_be32 label,
enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
ofpact_put_SET_MPLS_LABEL(out)->label = label;
return 0;
} | 0 |
282,446 | SWFInput_seek(SWFInput input, long offset, int whence)
{
input->seek(input, offset, whence);
}
| 0 |
132,104 | SYSCALL_DEFINE2(kill, pid_t, pid, int, sig)
{
struct siginfo info;
info.si_signo = sig;
info.si_errno = 0;
info.si_code = SI_USER;
info.si_pid = task_tgid_vnr(current);
info.si_uid = current_uid();
return kill_something_info(sig, &info, pid);
} | 0 |
445,462 | bool ListenerImpl::rejectCxOverGlobalLimit() {
// Enforce the global connection limit if necessary, immediately closing the accepted connection.
Runtime::Loader* runtime = Runtime::LoaderSingleton::getExisting();
if (runtime == nullptr) {
// The runtime singleton won't exist in most unit tests that do not ne... | 0 |
354,228 | static int ssl_scan_serverhello_tlsext(SSL *s, PACKET *pkt, int *al)
{
unsigned int length, type, size;
int tlsext_servername = 0;
int renegotiate_seen = 0;
#ifndef OPENSSL_NO_NEXTPROTONEG
s->s3->next_proto_neg_seen = 0;
#endif
s->tlsext_ticket_expected = 0;
OPENSSL_free(s->s3->alpn_selected);... | 1 |
122,731 | int ext4_map_blocks(handle_t *handle, struct inode *inode,
struct ext4_map_blocks *map, int flags)
{
struct extent_status es;
int retval;
int ret = 0;
#ifdef ES_AGGRESSIVE_TEST
struct ext4_map_blocks orig_map;
memcpy(&orig_map, map, sizeof(*map));
#endif
map->m_flags = 0;
ext_debug("ext4_map_blocks(): in... | 0 |
359,524 | static unsigned long es_base(struct x86_emulate_ctxt *ctxt)
{
return seg_base(ctxt, VCPU_SREG_ES);
} | 0 |
4,597 | static PyObject *__pyx_pw_17clickhouse_driver_7columns_12stringcolumn_15ByteFixedString_1read_items(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
Py_ssize_t __pyx_v_n_items;
PyObject *__pyx_v_buf = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_R... | 1 |
253,974 | void FrameLoader::RestoreScrollPositionAndViewState(
FrameLoadType load_type,
bool is_same_document,
HistoryItem::ViewState* view_state,
HistoryScrollRestorationType scroll_restoration_type) {
LocalFrameView* view = frame_->View();
if (!view || !view->LayoutViewportScrollableArea() ||
!state_m... | 0 |
402,270 | static void xhci_reset(DeviceState *dev)
{
XHCIState *xhci = XHCI(dev);
int i;
trace_usb_xhci_reset();
if (!(xhci->usbsts & USBSTS_HCH)) {
DPRINTF("xhci: reset while running!\n");
}
xhci->usbcmd = 0;
xhci->usbsts = USBSTS_HCH;
xhci->dnctrl = 0;
xhci->crcr_low = 0;
xhci-... | 0 |
309,327 | void btsnoop_net_write(const void *data, size_t length) {
#if (!defined(BT_NET_DEBUG) || (BT_NET_DEBUG != TRUE))
return; // Disable using network sockets for security reasons
#endif
pthread_mutex_lock(&client_socket_lock_);
if (client_socket_ != -1) {
if (TEMP_FAILURE_RETRY(send(client_socket_, data, leng... | 0 |
41,262 | static int proc_setattr(struct dentry *dentry, struct iattr *attr)
{
int error;
struct inode *inode = dentry->d_inode;
if (attr->ia_valid & ATTR_MODE)
return -EPERM;
error = inode_change_ok(inode, attr);
if (!error)
error = inode_setattr(inode, attr);
return error;
} | 0 |
328,496 | static void nfs_file_close(BlockDriverState *bs)
{
NFSClient *client = bs->opaque;
nfs_client_close(client);
qemu_mutex_destroy(&client->mutex);
}
| 1 |
91,737 | MagickExport MagickBooleanType ThrowException(ExceptionInfo *exception,
const ExceptionType severity,const char *reason,const char *description)
{
register ExceptionInfo
*p;
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickCoreSignature);
LockSemaphoreInfo(exception->sema... | 0 |
35,415 | struct passwd *enc_untrusted_getpwuid(uid_t uid) {
MessageWriter input;
MessageReader output;
input.Push<uid_t>(uid);
const auto status = NonSystemCallDispatcher(
::asylo::host_call::kGetPwUidHandler, &input, &output);
CheckStatusAndParamCount(status, output, "enc_untrusted_getpwuid", 1,
... | 0 |
153,408 | int GetSequence_ex(const byte* input, word32* inOutIdx, int* len,
word32 maxIdx, int check)
{
return GetASNHeader_ex(input, ASN_SEQUENCE | ASN_CONSTRUCTED, inOutIdx, len,
maxIdx, check);
} | 0 |
403,203 | node_new_cclass(void)
{
Node* node = node_new();
CHECK_NULL_RETURN(node);
SET_NODE_TYPE(node, NODE_CCLASS);
initialize_cclass(CCLASS_(node));
return node;
} | 0 |
178,799 | std::string TestURLLoader::TestAuditURLRedirect() {
pp::URLRequestInfo request(instance_);
std::string redirect_prefix("/server-redirect?");
std::string redirect_url =
GetReachableAbsoluteURL("test_url_loader_data/hello.txt");
request.SetURL(redirect_prefix.append(redirect_url));
request.SetFollowRedire... | 0 |
62,719 | base_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
int err = 0, id;
struct mISDNdevice *dev;
struct mISDNversion ver;
switch (cmd) {
case IMGETVERSION:
ver.major = MISDN_MAJOR_VERSION;
ver.minor = MISDN_MINOR_VERSION;
ver.release = MISDN_RELEASE;
if (copy_to_user((void __user *)... | 0 |
508,007 | int ssl3_get_client_hello(SSL *s)
{
int i,j,ok,al,ret= -1;
unsigned int cookie_len;
long n;
unsigned long id;
unsigned char *p,*d,*q;
SSL_CIPHER *c;
#ifndef OPENSSL_NO_COMP
SSL_COMP *comp=NULL;
#endif
STACK_OF(SSL_CIPHER) *ciphers=NULL;
/* We do this so that we will respond with our native type.
* If we ar... | 0 |
465,685 | static void fuse_rdc_reset(struct inode *inode)
{
struct fuse_inode *fi = get_fuse_inode(inode);
fi->rdc.cached = false;
fi->rdc.version++;
fi->rdc.size = 0;
fi->rdc.pos = 0;
} | 0 |
177,616 | void SetVerdict(DownloadProtectionService::DownloadCheckResult result) {
verdict_ = result;
CompleteDownload();
}
| 0 |
144,820 | SockClose(Sock *sockPtr, int keep)
{
NS_NONNULL_ASSERT(sockPtr != NULL);
if (keep != 0) {
bool driverKeep = DriverKeep(sockPtr);
keep = (int)driverKeep;
}
if (keep == (int)NS_FALSE) {
DriverClose(sockPtr);
}
Ns_MutexLock(&sockPtr->drvPtr->lock);
sockPtr->keep = (bool... | 0 |
106,234 | template<typename t>
CImg(const unsigned int size_x, const unsigned int size_y, const unsigned int size_z, const unsigned int size_c,
const std::initializer_list<t> values,
const bool repeat_values=true):
_width(0),_height(0),_depth(0),_spectrum(0),_is_shared(false),_data(0) {
#define _cimg_con... | 0 |
79,427 | decode_codec_id(const unsigned char *codecId, size_t id_size)
{
unsigned i;
unsigned long id = 0;
for (i = 0; i < id_size; i++) {
id <<= 8;
id += codecId[i];
}
return (id);
} | 0 |
502,344 | static NTSTATUS pdb_samba_dsdb_enum_group_mapping(struct pdb_methods *m,
const struct dom_sid *sid,
enum lsa_SidType sid_name_use,
GROUP_MAP ***pp_rmap,
size_t *p_num_entries,
bool unix_only)
{
return NT_STATUS_NOT_IMPLEMENTED;
} | 0 |
212,888 | void NavigationControllerImpl::Restore(
int selected_navigation,
RestoreType type,
std::vector<std::unique_ptr<NavigationEntry>>* entries) {
DCHECK(GetEntryCount() == 0 && !GetPendingEntry());
DCHECK(selected_navigation >= 0 &&
selected_navigation < static_cast<int>(entries->size()));
needs_... | 0 |
221,142 | void PrintJobWorker::Stop() {
thread_.Stop();
}
| 0 |
522,438 | bool is_outside_computation_bounds() const
{
/*
The top bound can go over the current partition. In this case,
the sum function has 0 values added to it.
*/
if (at_partition_end && is_top_bound)
return true;
return false;
} | 0 |
22,296 | void remove_tap_listener_actrace_calls ( void ) {
remove_tap_listener ( & ( the_tapinfo_struct . actrace_dummy ) ) ;
have_actrace_tap_listener = FALSE ;
} | 0 |
141,122 | static int do_i2c(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
struct cmd_tbl *c;
#ifdef CONFIG_NEEDS_MANUAL_RELOC
i2c_reloc();
#endif
if (argc < 2)
return CMD_RET_USAGE;
/* Strip off leading 'i2c' command argument */
argc--;
argv++;
c = find_cmd_tbl(argv[0], &cmd_i2c_sub[0], ARRAY_SIZE... | 0 |
132,822 | getCropOffsets(struct image_data *image, struct crop_mask *crop, struct dump_opts *dump)
{
struct offset offsets;
int i;
int32 test;
uint32 seg, total, need_buff = 0;
uint32 buffsize;
uint32 zwidth, zlength;
memset(&offsets, '\0', sizeof(struct offset));
crop->bufftotal = 0;
crop->combined_widt... | 0 |
162,799 | void setFlowThread(RenderFlowThread* thread) { m_flowThread = thread; }
| 0 |
118,275 | f_byteidxcomp(typval_T *argvars, typval_T *rettv)
{
byteidx(argvars, rettv, TRUE);
} | 0 |
183,120 | bool AccessibilityUIElement::isEqual(AccessibilityUIElement* otherElement)
{
return m_element == otherElement->platformUIElement();
}
| 0 |
25,619 | static bool get_actual_variable_range ( PlannerInfo * root , VariableStatData * vardata , Oid sortop , Datum * min , Datum * max ) {
bool have_data = false ;
RelOptInfo * rel = vardata -> rel ;
RangeTblEntry * rte ;
ListCell * lc ;
if ( rel == NULL || rel -> indexlist == NIL ) return false ;
rte = root -> simple_... | 0 |
55,998 | static int specific_minor(int minor)
{
int r;
if (minor >= (1 << MINORBITS))
return -EINVAL;
idr_preload(GFP_KERNEL);
spin_lock(&_minor_lock);
r = idr_alloc(&_minor_idr, MINOR_ALLOCED, minor, minor + 1, GFP_NOWAIT);
spin_unlock(&_minor_lock);
idr_preload_end();
if (r < 0)
return r == -ENOSPC ? -EBUSY : ... | 0 |
374,268 | aclparse(const char *s, AclItem *aip)
{
AclMode privs,
goption,
read;
char name[NAMEDATALEN];
char name2[NAMEDATALEN];
Assert(s && aip);
#ifdef ACLDEBUG
elog(LOG, "aclparse: input = \"%s\"", s);
#endif
s = getid(s, name);
if (*s != '=')
{
/* we just read a keyword, not a name */
if (strcmp(name... | 0 |
321,419 | static unsigned int dec10_quick_imm(DisasContext *dc)
{
int32_t imm, simm;
int op;
/* sign extend. */
imm = dc->ir & ((1 << 6) - 1);
simm = (int8_t) (imm << 2);
simm >>= 2;
switch (dc->opcode) {
case CRISV10_QIMM_BDAP_R0:
case CRISV10_QIMM_BDAP_R1:
case ... | 0 |
231,121 | SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx)) (SSL *ssl,
unsigned char *data,
int len, int *copy) {
return ctx->get_session_cb;
}
| 0 |
100,712 | static void perf_nesting(void)
{
unsigned int i, maxcycles, maxnesting;
double duration;
maxcycles = 10000;
maxnesting = 1000;
Coroutine *root;
g_test_timer_start();
for (i = 0; i < maxcycles; i++) {
NestData nd = {
.n_enter = 0,
.n_return = 0,... | 1 |
449,011 | UTI_IPNetworkToHost(IPAddr *src, IPAddr *dest)
{
dest->family = ntohs(src->family);
dest->_pad = 0;
switch (dest->family) {
case IPADDR_INET4:
dest->addr.in4 = ntohl(src->addr.in4);
break;
case IPADDR_INET6:
memcpy(dest->addr.in6, src->addr.in6, sizeof (dest->addr.in6));
break;
... | 0 |
221,138 | MockDataReductionProxyConfig::~MockDataReductionProxyConfig() {
}
| 0 |
130,846 | Jsi_RC Jsi_FunctionInvokeString(Jsi_Interp *interp, Jsi_Value *func, Jsi_Value *arg, Jsi_DString *dStr)
{
if (interp->deleting)
return JSI_ERROR;
Jsi_Value *vpargs, *frPtr = Jsi_ValueNew1(interp);
Jsi_RC rc;
if (!arg) {
if (!interp->nullFuncArg) {
interp->nullFuncArg = Jsi_Va... | 0 |
367,577 | static void cap_inode_post_setxattr(struct dentry *dentry, const char *name,
const void *value, size_t size, int flags)
{
} | 0 |
113,391 | bool MaybeRemoveControlInput(const string& old_input, NodeDef* node,
GraphDef* graph, NodeMap* node_map) {
bool removed_input = false;
bool update_node_map = true;
const string old_input_ctrl_dep = AsControlDependency(NodeName(old_input));
for (int i = 0; i < node->input_size(); ++i... | 0 |
423,942 | UdfOpen (
IN EFI_FILE_PROTOCOL *This,
OUT EFI_FILE_PROTOCOL **NewHandle,
IN CHAR16 *FileName,
IN UINT64 OpenMode,
IN UINT64 Attributes
)
{
EFI_TPL OldTpl;
EFI_STATUS Status;
PRIVATE_UDF_FILE_DATA *PrivF... | 0 |
288,807 | static void main_get_appheader_params ( main_file * file , char * * parsed , int output , const char * type , main_file * other ) {
if ( file -> filename == NULL && ! ( output && option_stdout ) && strcmp ( parsed [ 0 ] , "-" ) != 0 ) {
file -> filename = parsed [ 0 ] ;
if ( other -> filename != NULL ) {
const char... | 0 |
132,702 | static void netbk_tx_err(struct xenvif *vif,
struct xen_netif_tx_request *txp, RING_IDX end)
{
RING_IDX cons = vif->tx.req_cons;
do {
make_tx_response(vif, txp, XEN_NETIF_RSP_ERROR);
if (cons >= end)
break;
txp = RING_GET_REQUEST(&vif->tx, cons++);
} while (1);
vif->tx.req_cons = cons;
xen_netbk_chec... | 0 |
33,291 | static void kvp_acquire_lock(int pool)
{
struct flock fl = {F_WRLCK, SEEK_SET, 0, 0, 0};
fl.l_pid = getpid();
if (fcntl(kvp_file_info[pool].fd, F_SETLKW, &fl) == -1) {
syslog(LOG_ERR, "Failed to acquire the lock pool: %d", pool);
exit(EXIT_FAILURE);
}
} | 0 |
407,931 | int FAST_FUNC read_bunzip(bunzip_data *bd, char *outbuf, int len)
{
const uint32_t *dbuf;
int pos, current, previous;
uint32_t CRC;
/* If we already have error/end indicator, return it */
if (bd->writeCount < 0)
return bd->writeCount;
dbuf = bd->dbuf;
/* Register-cached state (hopefully): */
pos = bd->writ... | 0 |
378,008 | static int build_spdinfo(struct sk_buff *skb, struct net *net,
u32 portid, u32 seq, u32 flags)
{
struct xfrmk_spdinfo si;
struct xfrmu_spdinfo spc;
struct xfrmu_spdhinfo sph;
struct nlmsghdr *nlh;
int err;
u32 *f;
nlh = nlmsg_put(skb, portid, seq, XFRM_MSG_NEWSPDINFO, sizeof(u32), 0);
if (nlh == NULL) /* s... | 0 |
151,656 | av_cold int ff_vp8_decode_free(AVCodecContext *avctx)
{
VP8Context *s = avctx->priv_data;
int i;
if (!s)
return 0;
vp8_decode_flush_impl(avctx, 1);
for (i = 0; i < FF_ARRAY_ELEMS(s->frames); i++)
av_frame_free(&s->frames[i].tf.f);
return 0;
} | 0 |
319,109 | static void sdhci_sysbus_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->vmsd = &sdhci_vmstate;
dc->props = sdhci_sysbus_properties;
dc->realize = sdhci_sysbus_realize;
dc->reset = sdhci_poweron_reset;
} | 1 |
116,027 | void show_browser(char *br) {
if (stristr(br, "opera"))
rsprintf("var browser = \"Opera\";\n");
else if (stristr(br, "konqueror"))
rsprintf("var browser = \"Konqueror\";\n");
else if (stristr(br, "Safari"))
rsprintf("var browser = \"Safari\";\n");
else if (stristr(br, "MSIE"))
rsprin... | 0 |
3,570 | void gdImageJpegCtx (gdImagePtr im, gdIOCtx * outfile, int quality)
{
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
int i, j, jidx;
/* volatile so we can gdFree it on return from longjmp */
volatile JSAMPROW row = 0;
JSAMPROW rowptr[1];
jmpbuf_wrapper jmpbufw;
JDIMENSION nlines;
char comment[2... | 1 |
150,704 | static void br_multicast_mark_router(struct net_bridge *br,
struct net_bridge_port *port)
{
unsigned long now = jiffies;
if (!port) {
if (br->multicast_router == 1)
mod_timer(&br->multicast_router_timer,
now + br->multicast_querier_interval);
return;
}
if (port->multicast_router != 1)
retu... | 0 |
260,781 | R_API ut64 r_bin_get_baddr(RBin *bin) {
RBinObject *o = r_bin_cur_object (bin);
return binobj_get_baddr (o);
} | 0 |
340,802 | DeviceState *qdev_device_add(QemuOpts *opts)
{
DeviceClass *k;
const char *driver, *path, *id;
DeviceState *qdev;
BusState *bus;
driver = qemu_opt_get(opts, "driver");
if (!driver) {
qerror_report(QERR_MISSING_PARAMETER, "driver");
return NULL;
}
/* find dr... | 0 |
144,890 | static void hns_xgmac_init(void *mac_drv)
{
struct mac_driver *drv = (struct mac_driver *)mac_drv;
struct dsaf_device *dsaf_dev
= (struct dsaf_device *)dev_get_drvdata(drv->dev);
u32 port = drv->mac_id;
dsaf_dev->misc_op->xge_srst(dsaf_dev, port, 0);
mdelay(100);
dsaf_dev->misc_op->xge_srst(dsaf_dev, port, 1);... | 0 |
407,703 | ldns_rdf2buffer_str_apl(ldns_buffer *output, const ldns_rdf *rdf)
{
uint8_t *data = ldns_rdf_data(rdf);
uint16_t address_family;
uint8_t prefix;
bool negation;
uint8_t adf_length;
size_t i;
size_t pos = 0;
while (pos < (unsigned int) ldns_rdf_size(rdf)) {
if(pos + 3 >= (unsigned)ldns_rdf_size(r... | 0 |
44,446 | static void attach_mnt(struct mount *mnt,
struct mount *parent,
struct mountpoint *mp)
{
mnt_set_mountpoint(parent, mp, mnt);
hlist_add_head_rcu(&mnt->mnt_hash, m_hash(&parent->mnt, mp->m_dentry));
list_add_tail(&mnt->mnt_child, &parent->mnt_mounts);
} | 0 |
418,504 | int RGWDeleteObj::verify_permission()
{
if (s->iam_policy) {
auto r = s->iam_policy->eval(s->env, *s->auth.identity,
s->object.instance.empty() ?
rgw::IAM::s3DeleteObject :
rgw::IAM::s3DeleteObjectVersion,
ARN(s->bucket, s->object.name));
if (r == Effect::Allow)
return true;
else... | 0 |
339,803 | static int op_to_movi(int op)
{
switch (op_bits(op)) {
case 32:
return INDEX_op_movi_i32;
#if TCG_TARGET_REG_BITS == 64
case 64:
return INDEX_op_movi_i64;
#endif
default:
fprintf(stderr, "op_to_movi: unexpected return value of "
"function op_bits.\n");
... | 0 |
410,882 | char *theme_format_expand_data(THEME_REC *theme, const char **format, theme_rm_col default_fg,
theme_rm_col default_bg, theme_rm_col *save_last_fg,
theme_rm_col *save_last_bg, int flags)
{
return theme_format_expand_data_rec(theme, format, default_fg, defau... | 0 |
212,253 | UploadProgress HttpStreamParser::GetUploadProgress() const {
if (!request_->upload_data_stream)
return UploadProgress();
return UploadProgress(request_->upload_data_stream->position(),
request_->upload_data_stream->size());
}
| 0 |
63,144 | static int __udp4_lib_mcast_deliver(struct net *net, struct sk_buff *skb,
struct udphdr *uh,
__be32 saddr, __be32 daddr,
struct udp_table *udptable,
int proto)
{
struct sock *sk, *stack[256 / sizeof(struct sock *)];
struct hlist_nulls_node *node;
unsigned short hnum = ntohs(uh->dest)... | 0 |
30,943 | static bool init_cpuset_if_needed ( struct cgroup_mount_point * mp , const char * path ) {
if ( ! lxc_string_in_array ( "cpuset" , ( const char * * ) mp -> hierarchy -> subsystems ) ) return true ;
if ( ! mp -> need_cpuset_init ) return true ;
return ( do_init_cpuset_file ( mp , path , "/cpuset.cpus" ) && do_init_cp... | 0 |
411,845 | zzip_disk_feof (ZZIP_DISK_FILE* file)
{
return ! file || ! file->avail;
} | 0 |
249,166 | _dbus_close_socket (int fd,
DBusError *error)
{
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
again:
if (closesocket (fd) == SOCKET_ERROR)
{
DBUS_SOCKET_SET_ERRNO ();
if (errno == EINTR)
goto again;
dbus_set_error (error, _dbus_error_from_errno (errn... | 0 |
420,516 | tar_sparse_init (struct tar_sparse_file *file)
{
memset (file, 0, sizeof *file);
if (!sparse_select_optab (file))
return false;
if (file->optab->init)
return file->optab->init (file);
return true;
} | 0 |
282,700 | void NewTabButton::OnPaint(gfx::Canvas* canvas) {
gfx::ImageSkia image =
GetImageForScale(ui::GetSupportedScaleFactor(canvas->image_scale()));
canvas->DrawImageInt(image, 0, height() - image.height());
}
| 0 |
396,200 | void do_item_remove(item *it) {
MEMCACHED_ITEM_REMOVE(ITEM_key(it), it->nkey, it->nbytes);
assert((it->it_flags & ITEM_SLABBED) == 0);
assert(it->refcount > 0);
if (refcount_decr(&it->refcount) == 0) {
item_free(it);
}
} | 0 |
136,034 | void copyCast(const FromT* in, ToT* out, int num_elements) {
std::transform(in, in + num_elements, out,
[](FromT a) { return static_cast<ToT>(a); });
} | 0 |
316,793 | string16 ShellContentClient::GetLocalizedString(int message_id) const {
return string16();
}
| 0 |
403,615 | static int nbd_negotiate_handle_list(NBDClient *client, uint32_t length)
{
NBDExport *exp;
if (length) {
if (nbd_drop(client->ioc, length, NULL) < 0) {
return -EIO;
}
return nbd_negotiate_send_rep_err(client->ioc,
NBD_REP_ERR_INVALID... | 0 |
279,139 | bool RenderFrameHostImpl::DidCommitNavigationInternal(
std::unique_ptr<NavigationRequest> navigation_request,
FrameHostMsg_DidCommitProvisionalLoad_Params* validated_params,
bool is_same_document_navigation) {
DCHECK_EQ(ui::PageTransitionIsMainFrame(validated_params->transition),
!GetParent())... | 0 |
24,923 | TEST ( IdlCompiler , PropertyValues ) {
EXPECT_EQ ( 42 , test : : api : : idl_properties : : first ) ;
EXPECT_EQ ( 42.1 , test : : api : : idl_properties : : second ) ;
EXPECT_STREQ ( "hello world" , test : : api : : idl_properties : : third ) ;
} | 0 |
503,555 | sstring to_string(const event::schema_change::change_type t) {
switch (t) {
case event::schema_change::change_type::CREATED: return "CREATED";
case event::schema_change::change_type::UPDATED: return "UPDATED";
case event::schema_change::change_type::DROPPED: return "DROPPED";
}
assert(false && "... | 0 |
11,036 | xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) {
xmlChar *name;
const xmlChar *ptr;
xmlChar cur;
xmlEntityPtr ent = NULL;
if ((str == NULL) || (*str == NULL))
return(NULL);
ptr = *str;
cur = *ptr;
if (cur != '&')
return(NULL);
ptr++;
name = xmlPar... | 1 |
489,011 | static SECURITY_STATUS SEC_ENTRY kerberos_MakeSignature(PCtxtHandle phContext, ULONG fQOP,
PSecBufferDesc pMessage, ULONG MessageSeqNo)
{
#ifdef WITH_GSSAPI
KRB_CONTEXT* context;
PSecBuffer sig_buffer, data_buffer;
krb5_key key;
krb5_keyusage usage;
char* hea... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.