functionSource stringlengths 20 97.4k | CWE-119 bool 2
classes | CWE-120 bool 2
classes | CWE-469 bool 2
classes | CWE-476 bool 2
classes | CWE-other bool 2
classes | combine int64 0 1 |
|---|---|---|---|---|---|---|
yy_CharEntity()
{ int yypos0= yypos, yythunkpos0= yythunkpos;
yyprintf((stderr, "%s\n", "CharEntity")); yyText(yybegin, yyend); if (!(YY_BEGIN)) goto l303; if (!yymatchChar('&')) goto l303; if (!yymatchClass((unsigned char *)"\000\000\000\000\000\000\377\003\376\377\377\007\376\377\377\007\000\000\000\000\000\00... | false | false | false | false | false | 0 |
convert_to_base_statically (tree expr, tree base)
{
tree expr_type;
expr_type = TREE_TYPE (expr);
if (!same_type_p (expr_type, BINFO_TYPE (base)))
{
tree pointer_type;
pointer_type = build_pointer_type (expr_type);
expr = build_unary_op (ADDR_EXPR, expr, /*noconvert=*/1);
if (!intege... | false | false | false | false | true | 1 |
functions(gn_operation op, gn_data *data, struct gn_statemachine *state)
{
if (!DRVINSTANCE(state) && op != GN_OP_Init) return GN_ERR_INTERNALERROR;
switch (op) {
case GN_OP_Init:
if (DRVINSTANCE(state)) return GN_ERR_INTERNALERROR;
return P3110_Initialise(state);
case GN_OP_Terminate:
FREE(DRVINSTANCE(state... | false | false | false | false | false | 0 |
toUTF8(const bool) const
{
unsigned char *buf;
GPBuffer<unsigned char> gbuf(buf,size*6+1);
buf[0]=0;
if(data && size)
{
size_t n=size;
const char *source=data;
mbstate_t ps;
unsigned char *ptr=buf;
//(void)mbrlen(source, n, &ps);
memset(&ps,0,sizeof(mbstate_t));
int i=0;
if(siz... | false | false | false | false | false | 0 |
cr_input_new_from_uri (const gchar * a_file_uri, enum CREncoding a_enc)
{
CRInput *result = NULL;
enum CRStatus status = CR_OK;
FILE *file_ptr = NULL;
guchar tmp_buf[CR_INPUT_MEM_CHUNK_SIZE] = { 0 };
gulong nb_read = 0,
len = 0,
buf_size = 0;
... | false | false | false | false | false | 0 |
general_interrupt(int irq, void *data)
{
struct hfi1_devdata *dd = data;
u64 regs[CCE_NUM_INT_CSRS];
u32 bit;
int i;
this_cpu_inc(*dd->int_counter);
/* phase 1: scan and clear all handled interrupts */
for (i = 0; i < CCE_NUM_INT_CSRS; i++) {
if (dd->gi_mask[i] == 0) {
regs[i] = 0; /* used later */
con... | false | false | false | false | false | 0 |
GetFeatureCount( int bForce )
{
/* -------------------------------------------------------------------- */
/* If any odd conditions are in effect collect the information */
/* normally. */
/* -----------------------------------------------------------... | false | false | false | false | false | 0 |
soap_in_wsrm__AckRequestedType(struct soap *soap, const char *tag, struct wsrm__AckRequestedType *a, const char *type)
{
size_t soap_flag_Identifier = 1;
if (soap_element_begin_in(soap, tag, 0, type))
return NULL;
a = (struct wsrm__AckRequestedType *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_wsrm__AckRequestedTyp... | false | false | false | false | false | 0 |
Xen_Hv_Check(void)
{ uint32_t eax, ebx, ecx, edx;
char signature[13];
Xen_Cpuid(0x40000000, &eax, &ebx, &ecx, &edx);
*(uint32_t *)(signature + 0) = ebx;
*(uint32_t *)(signature + 4) = ecx;
*(uint32_t *)(signature + 8) = edx;
signature[12] = '\0';
if (strcmp("XenVMMXenVMM", signature) || (eax < 0x40000002))
{
... | false | false | false | false | false | 0 |
compute_something_fast(void) {
unsigned char s[256], i, j, t;
int count = 1000, k;
unsigned long output = 0;
for (k = 0; k < 256; k++) s[k] = k;
i = 0;
j = 0;
while(count--) {
i++;
j = j + s[i];
t = s[i];
s[i] = s[j];
s[j] = t;
output += s[(s... | false | false | false | false | false | 0 |
giggle_view_shell_append_view (GiggleViewShell *shell,
GiggleView *view)
{
GiggleViewShellPriv *priv;
const char *accelerator;
GtkAction *action;
GSList *group;
unsigned i;
g_return_if_fail (GIGGLE_IS_VIEW_SHELL (shell));
g_return_if_fail (GIGGLE_IS_VIE... | false | false | false | false | false | 0 |
GetWaitObjects(WaitObjectContainer &container, CallStack const& callStack)
{
if (!m_eofReceived)
container.AddReadFd(m_s, CallStack("SocketReceiver::GetWaitObjects()", &callStack));
} | false | false | false | false | false | 0 |
__os_realloc(env, size, storep)
ENV *env;
size_t size;
void *storep;
{
int ret;
void *p, *ptr;
ptr = *(void **)storep;
/* Never allocate 0 bytes -- some C libraries don't like it. */
if (size == 0)
++size;
/* If we haven't yet allocated anything yet, simply call malloc. */
if (ptr == NULL)
return (__os... | false | false | false | false | false | 0 |
_midgard_view_derived_delete_storage(MidgardConnection *mgd, MidgardDBObjectClass *klass)
{
g_return_val_if_fail(mgd != NULL, FALSE);
g_return_val_if_fail(klass != NULL, FALSE);
MgdSchemaTypeAttr *type_attr = midgard_core_class_get_type_attr(klass);
/* Should work with at least: MySQL, SQLite and PostgreSQL */
... | false | false | false | false | false | 0 |
setupValueParameter(int row, ActionTools::ScriptParameter::ParameterType type, const QString &value, bool code)
{
switch(type)
{
case ActionTools::ScriptParameter::Text:
{
ActionTools::CodeLineEdit *valueWidget = new ActionTools::CodeLineEdit(this);
valueWidget->setCode(code);
valueWidget->setText(value);... | false | false | false | false | false | 0 |
clear()
{
std::vector<Section*>::iterator iter;
for(iter = d_sections.begin(); iter != d_sections.end(); iter++)
{
delete (*iter);
}
d_sections.clear();
d_sectionmap.clear();
// We create one to begin with, swo that we always
// have a valid d_currentSection to work with.
d_currentSection ... | false | false | false | false | false | 0 |
get_status () const
{
std::string result;
if (message_waiting_number > 0) {
gchar* str = NULL;
/* translators : the result will look like :
* "registered (with 2 voice mail messages)"
*/
str = g_strdup_printf (ngettext ("%s (with %d voice mail message)",
"... | false | false | false | false | false | 0 |
tab_head()
{
if( m_iconbox.children().size() == 1 ) return;
std::string url_to;
Gtk::Box_Helpers::BoxList::iterator it = m_iconbox.children().begin();
SKELETON::View* view = dynamic_cast< SKELETON::View* >( it->get_widget() );
if( view ) url_to = view->get_url();
if( !url_to.empty() ) switch_... | false | false | false | false | false | 0 |
ray_get_mode(struct net_device *dev, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
ray_dev_t *local = netdev_priv(dev);
if (local->sparm.b5.a_network_type)
wrqu->mode = IW_MODE_INFRA;
else
wrqu->mode = IW_MODE_ADHOC;
return 0;
} | false | false | false | false | false | 0 |
VTThrd_init()
{
/* get the maximum number of threads */
VTThrdMaxNum = (uint32_t)vt_env_max_threads();
/* create vector of the thread objects */
VTThrdv = (VTThrd**)calloc(VTThrdMaxNum, sizeof(VTThrd*));
if ( VTThrdv == NULL )
vt_error();
#if (defined(VT_MT) || defined (VT_HYB) || defined(VT_JAVA))
/... | false | false | false | false | false | 0 |
increase_timeout_because_unit_moved(void)
{
if (game.info.timeout > 0 && game.server.timeoutaddenemymove > 0) {
double maxsec = (read_timer_seconds(game.server.phase_timer)
+ (double) game.server.timeoutaddenemymove);
if (maxsec > game.info.seconds_to_phasedone) {
game.info.seconds_to_phasedone ... | false | false | false | false | false | 0 |
generate_new_server_duid(void) {
struct interface_info *p;
u_int32_t time_val;
struct data_string generated_duid;
/*
* Verify we have a type that we support.
*/
if ((server_duid_type != DUID_LL) && (server_duid_type != DUID_LLT)) {
log_error("Invalid DUID type %d specified, "
"only LL and LLT types sup... | false | true | false | false | false | 1 |
connect_open(void)
{
char host[200], *prt;
struct hostent *hp;
struct sockaddr_in soc_in;
int port = 0;
Trace((stderr, "opening connection to cddb server\n"));
/* in case of failure */
Connection = NULL;
if(cddb.protocol == 3) /* http proxy */
strcpy(host, cddb.proxy_server);
else
strcpy(host, cd... | false | false | false | false | false | 0 |
fst_open(struct net_device *dev)
{
int err;
struct fst_port_info *port;
port = dev_to_port(dev);
if (!try_module_get(THIS_MODULE))
return -EBUSY;
if (port->mode != FST_RAW) {
err = hdlc_open(dev);
if (err) {
module_put(THIS_MODULE);
return err;
}
}
fst_openport(port);
netif_wake_queue(d... | false | false | false | false | false | 0 |
wdata_check(writer_data_t* data)
{
queue* elem, *tmp;
double center_lat, center_lon;
if ((data->ct <= WAYPOINTS_PER_BLOCK) ||
/* avoid endless loop for points (more than WAYPOINTS_PER_BLOCK)
at same coordinates */
((data->bds.min_lat >= data->bds.max_lat) && (data->bds.min_lon >= data->bds.m... | false | false | false | false | false | 0 |
libsyssys_sleep(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
{
ScmObj seconds_scm;
int seconds;
ScmObj SCM_SUBRARGS[1];
int SCM_i;
SCM_ENTER_SUBR("sys-sleep");
for (SCM_i=0; SCM_i<1; SCM_i++) {
SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
}
seconds_scm = SCM_SUBRARGS[0];
if (!SCM_INTP(seconds_scm)) Sc... | false | false | false | false | false | 0 |
TryGetFunctionPrototype(Register function,
Register result,
Label* miss) {
// Check that the receiver isn't a smi.
testl(function, Immediate(kSmiTagMask));
j(zero, miss);
// Check that the function really is a function.
... | false | false | false | false | false | 0 |
exec_cmd(char *cmd)
{
#if (defined(HAVE_WAITPID) || defined(HAVE_WAIT)) && (defined(HAVE_VFORK) || defined(HAVE_FORK))
int kid;
int exit_code;
switch((kid=vfork()))
{
case -1:
if(!(options & OPT_QUIET))
{
perror("fork");
}
return(-1);
break;
case 0:
/* child ... | false | false | false | false | true | 1 |
gf119_sor_dp_lnk_ctl(struct nvkm_output_dp *outp, int nr, int bw, bool ef)
{
struct nvkm_device *device = outp->base.disp->engine.subdev.device;
const u32 soff = gf119_sor_soff(outp);
const u32 loff = gf119_sor_loff(outp);
u32 dpctrl = 0x00000000;
u32 clksor = 0x00000000;
clksor |= bw << 18;
dpctrl |= ((1 << nr... | false | false | false | false | false | 0 |
toString(const String &separator) const
{
String s;
ConstIterator it = begin();
ConstIterator itEnd = end();
while(it != itEnd) {
s += *it;
it++;
if(it != itEnd)
s += separator;
}
return s;
} | false | false | false | false | false | 0 |
clearconsole(unsigned int console){
unsigned int i = 0;
for (i = 0; i < 80*25*2; i++) {
consmem[console][i] = ' ';
consmem[console][i+1] = 0x07;
i++;
}
position[console]=0;
refreshconsole(console);
} | false | false | false | false | false | 0 |
htc_process_trailer(struct htc_target *target, u8 *buffer,
int len, enum htc_endpoint_id from_ep)
{
struct htc_credit_report *report;
struct htc_record_hdr *record;
u8 *record_buf, *orig_buf;
int orig_len, status;
orig_buf = buffer;
orig_len = len;
status = 0;
while (len > 0) {
if (len < sizeof(st... | false | false | false | false | false | 0 |
assign_array_var_from_word_list (var, list, flags)
SHELL_VAR *var;
WORD_LIST *list;
int flags;
{
register arrayind_t i;
register WORD_LIST *l;
ARRAY *a;
a = array_cell (var);
i = (flags & ASS_APPEND) ? array_max_index (a) + 1 : 0;
for (l = list; l; l = l->next, i++)
if (var->assign_func... | false | false | false | false | false | 0 |
_frame_callback(GtkWindow *window,
GdkEvent *event, gpointer data)
{
if (event->expose.send_event == 0) {
default_sview_config.fi_popup_width = event->configure.width;
default_sview_config.fi_popup_height = event->configure.height;
working_sview_config.fi_popup_width = event->configure.width;
working_svie... | false | false | false | false | false | 0 |
doexecbuf(c)
int c;
{
static int lastc = NUL;
long i;
if (c == '@') /* repeat previous one */
c = lastc;
if (!is_yank_buffer(c, FALSE)) /* check for valid buffer */
return FAIL;
lastc = c;
if (c == ':') /* use last command line */
{
if (last_cmdline == NULL)
{
EMSG(e_nolastcmd);
return F... | false | false | false | false | false | 0 |
pix_abs16_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
{
int s, i;
s = 0;
for(i=0;i<h;i++) {
s += abs(pix1[0] - pix2[0]);
s += abs(pix1[1] - pix2[1]);
s += abs(pix1[2] - pix2[2]);
s += abs(pix1[3] - pix2[3]);
s += abs(pix1[4] - pix2[4]);
s +... | false | false | false | false | false | 0 |
new_fixup (struct bfd_link_info *info,
struct linux_link_hash_entry *h,
bfd_vma value,
int builtin)
{
struct fixup *f;
f = (struct fixup *) bfd_hash_allocate (&info->hash->table,
sizeof (struct fixup));
if (f == NULL)
return f;
f->next = linux_hash_table (info)->fixup_list;
linux_hash_... | false | false | false | false | false | 0 |
decode(unsigned char *sym, int *metric)
{
unsigned int currptr, prevptr;
int met[4];
currptr = ptr;
prevptr = (currptr - 1) % PATHMEM;
// if (prevptr < 0) prevptr = PATHMEM - 1;
met[0] = mettab[0][sym[1]] + mettab[0][sym[0]];
met[1] = mettab[0][sym[1]] + mettab[1][sym[0]];
met[2] = mettab[1][sym[1]] + mettab[... | false | false | false | false | false | 0 |
getDstAddr() const
{
if(!payload_type_ || !payload_) {
return NetworkAddress();
}
payload_type_t type = PAYLOAD_TYPE_T_NTOH(*payload_type_);
if(type == PAYLOAD_TYPE_TAP) { // Ehternet
// TODO
return NetworkAddress();
} else if(type == PAYLOAD_TYPE_TUN4) { // IPv4
if(length_ < (sizeof(payload... | false | false | false | false | false | 0 |
find_interval(PLFLT a0, PLFLT a1, PLINT c0, PLINT c1, PLFLT *x)
{
register int n;
n = 0;
if (c0 == OK) {
x[n++] = 0.0;
n_point++;
}
if (c0 == c1)
return n;
if (c0 == NEG || c1 == POS) {
if (c0 == NEG) {
x[n++] = linear(a0, a1, sh_min);
min_pts[min_points++] = n_point++;
}
if (c... | false | false | false | false | false | 0 |
complains (const location *loc, warnings flags, const char *message,
va_list args)
{
severity s = warning_severity (flags);
if ((flags & complaint) && complaint_status < status_complaint)
complaint_status = status_complaint;
if (severity_warning <= s)
{
const char* prefix =
s == ... | false | false | false | false | false | 0 |
L4()
{register object *base=vs_base;
register object *sup=base+VM4; VC4
vs_check;vs_top=sup;
{object V8=base[0]->c.c_cdr;
base[2]= (V8->c.c_car);}
V9= list(2,((object)VV[10]),list(2,((object)VV[11]),base[2]));
base[3]= list(3,((object)VV[8]),((object)VV[9]),listA(3,((object)VV[0]),make_cons(/* INLINE-ARGS */V9,Cn... | false | false | false | false | false | 0 |
setDisplay ()
{
#ifdef SSTREAM_DEFECT
ostrstream key;
#else
std::ostringstream key;
#endif
key << "TDISP" << index();
int status = 0;
FITSUtil::auto_array_ptr<char> dispValue (new char[FLEN_VALUE]);
#ifdef SSTREAM_DEFECT
key << std::ends;
fits_read_key_str(fitsPointer(), key.str(), dispValue.get(),0,&st... | false | false | false | false | false | 0 |
react(agent_reaction_t *reaction, Agent *agent, int fd, int revents, void *arg)
{
int err, ret;
if ((err = agent_unlock(agent)))
return set_errno(err);
ret = reaction(agent, fd, revents, arg);
if ((err = agent_wrlock(agent)))
return set_errno(err);
return ret;
} | false | false | false | false | false | 0 |
tgt_init(opj_tgt_tree_t * p_tree,OPJ_UINT32 p_num_leafs_h, OPJ_UINT32 p_num_leafs_v)
{
OPJ_INT32 l_nplh[32];
OPJ_INT32 l_nplv[32];
opj_tgt_node_t *l_node = 00;
opj_tgt_node_t *l_parent_node = 00;
opj_tgt_node_t *l_parent_node0 = 00;
OPJ_UINT32 i;
OPJ_INT32 j,k;
OPJ_UINT32 l_num_levels;
OPJ_UINT32 n;
... | false | false | false | false | false | 0 |
createNewDocument(const E_DocumentType documentType)
{
/* document type is stored only once (namely in the document tree) */
OFCondition result = DocumentTree.changeDocumentType(documentType);
if (result.good())
{
/* clear object (all member variables) */
clear();
/* set initial ... | false | false | false | false | false | 0 |
policy_node_match(const X509_POLICY_LEVEL *lvl,
const X509_POLICY_NODE *node, const ASN1_OBJECT *oid)
{
int i;
ASN1_OBJECT *policy_oid;
const X509_POLICY_DATA *x = node->data;
if ( (lvl->flags & X509_V_FLAG_INHIBIT_MAP)
|| !(x->flags & POLICY_DATA_FLAG_MAP_MASK))
{
if (!OBJ_cmp(x->valid_policy, ... | false | false | false | false | false | 0 |
Scm_TreeCoreCheckConsistency(ScmTreeCore *tc)
{
Node *r = ROOT(tc);
int cnt = 0;
if (!BLACKP(r)) Scm_Error("[internal] tree map root node is not black.");
if (r) check_traverse(r, 1, &cnt);
if (cnt != tc->num_entries) {
Scm_Error("[internal] tree map node count mismatch: record %d vs actual... | false | false | false | false | false | 0 |
gnm_solver_check_timeout (GnmSolver *solver)
{
GnmSolverParameters *sp;
g_return_val_if_fail (GNM_IS_SOLVER (solver), FALSE);
sp = solver->params;
if (solver->status != GNM_SOLVER_STATUS_RUNNING)
return FALSE;
if (gnm_solver_elapsed (solver) <= sp->options.max_time_sec)
return FALSE;
gnm_solver_stop (sol... | false | false | false | false | false | 0 |
omapi_reregister_io_object (omapi_object_t *h,
int (*readfd) (omapi_object_t *),
int (*writefd) (omapi_object_t *),
isc_result_t (*reader)
(omapi_object_t *),
isc_result_t (*writer)
(omapi_object_t *),
isc_result_t (*reaper)
(omapi_object_t *))
{
omapi_io_object_t *ob... | false | false | false | false | false | 0 |
action_new_launcher_callback (GtkAction *action, gpointer data)
{
char *desktop_directory;
g_assert (NEMO_IS_VIEW (data));
desktop_directory = nemo_get_desktop_directory ();
nemo_launch_application_from_command (gtk_widget_get_screen (GTK_WIDGET (data)),
"gnome-desktop-item-edit",
FALSE,
... | false | false | false | false | false | 0 |
ec_deinit (void *opaque)
{
mpi_ec_t ctx = opaque;
int i;
_gcry_mpi_barrett_free (ctx->t.p_barrett);
/* Domain parameter. */
mpi_free (ctx->p);
mpi_free (ctx->a);
mpi_free (ctx->b);
_gcry_mpi_point_release (ctx->G);
mpi_free (ctx->n);
/* The key. */
_gcry_mpi_point_release (ctx->Q);
mpi_free... | false | false | false | false | false | 0 |
end_of_attribute_or_not(p, limit)
char *p ; /* expected to point to "$" */
char *limit ;
{
enum { dollar, first_, second_, inname } state ;
char *endp ;
state = dollar ;
if (*p++ != '$') {
return 0 ;
}
endp = p ;
while (endp <= limit) {
switch (state) {
case dollar:
if (*p++ != ... | false | false | false | false | false | 0 |
removeRows(int row, int count, const QModelIndex &parent)
{
beginRemoveRows(parent, row, row + count - 1);
for(int i = 0; i < count; ++i)
{
mScript->removeAction(row);
}
endRemoveRows();
return true;
} | false | false | false | false | false | 0 |
IsCon(const int x)
{
return (outArray[x]==ge||outArray[x]==le
||outArray[x]==gt||outArray[x]==lt
||outArray[x]==eq||outArray[x]==ne);
} | false | false | false | false | false | 0 |
expando_query(SERVER_REC *server, void *item, int *free_ret)
{
return !IS_QUERY(item) ? "" : QUERY(item)->name;
} | false | false | false | false | false | 0 |
wq_worker_sleeping(struct task_struct *task, int cpu)
{
struct worker *worker = kthread_data(task), *to_wakeup = NULL;
struct worker_pool *pool;
/*
* Rescuers, which may not have all the fields set up like normal
* workers, also reach here, let's not access anything before
* checking NOT_RUNNING.
*/
if (wo... | false | false | false | false | false | 0 |
get_trigger_oid(Oid relid, const char *trigname, bool missing_ok)
{
Relation tgrel;
ScanKeyData skey[2];
SysScanDesc tgscan;
HeapTuple tup;
Oid oid;
/*
* Find the trigger, verify permissions, set up object address
*/
tgrel = heap_open(TriggerRelationId, AccessShareLock);
ScanKeyInit(&skey[0],
Anum_p... | false | false | false | false | false | 0 |
shortcut(quint32 unicode)
{
return m_symbol_shortcuts.contains(unicode) ? m_symbol_shortcuts.value(unicode)->key() : QKeySequence();
} | false | false | false | false | false | 0 |
pass_rule() {
try { // for error handling
match(PASS);
#line 948 "pf.g"
importer->clear();
importer->setCurrentLineNumber(LT(0)->getLine());
importer->newPolicyRule();
importer->action = "pass";
*dbg << LT(1)->getLine() << ":" << " pass ";
#line 1291 "PFCfgParser.cpp"
rule_extended();
#line ... | false | false | false | false | false | 0 |
Draw_Fractal (IfsData * data)
{
FRACTAL *F = data->Root;
int i, j;
F_PT x, y, xo, yo;
SIMI *Cur, *Simi;
for (Cur = F->Components, i = F->Nb_Simi; i; --i, Cur++) {
Cur->Cx = DBL_To_F_PT (Cur->c_x);
Cur->Cy = DBL_To_F_PT (Cur->c_y);
Cur->Ct = DBL_To_F_PT (cos (Cur->A));
Cur->St = DBL_To_F_PT (... | false | false | false | false | false | 0 |
decode_frame_mad(bgav_stream_t * s)
{
mad_priv_t * priv;
int i, j, done;
priv = s->data.audio.decoder->priv;
/* Check if we need new data */
if((priv->buf.size <= MAD_BUFFER_GUARD) && !get_data(s))
return 0;
if(priv->partial)
mad_stream_buffer(&priv->stream, priv->buf.buffer,
... | false | false | false | false | false | 0 |
nisNetgroupTripleValidate(
Syntax *syntax,
struct berval *val )
{
char *p, *e;
int commas = 0;
if ( BER_BVISEMPTY( val ) ) {
return LDAP_INVALID_SYNTAX;
}
p = (char *)val->bv_val;
e = p + val->bv_len;
if ( *p != '(' /*')'*/ ) {
return LDAP_INVALID_SYNTAX;
}
for ( p++; ( p < e ) && ( *p != /*'('*/ ')'... | false | false | false | false | false | 0 |
eem_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
{
struct usb_composite_dev *cdev = f->config->cdev;
int value = -EOPNOTSUPP;
u16 w_index = le16_to_cpu(ctrl->wIndex);
u16 w_value = le16_to_cpu(ctrl->wValue);
u16 w_length = le16_to_cpu(ctrl->wLength);
DBG(cdev, "invalid control req%02... | false | false | false | false | false | 0 |
keyInput(KGameIO* input, QDataStream& stream, QKeyEvent* key, bool* eatevent)
{
// Ignore non running
if (!mIsRunning) return;
// Ignore non key press
if (key->type() != QEvent::KeyPress) return ;
// Check key code
int code=key->key();
if (code< Qt::Key_1 || code> Qt::Key_7) return ;
// Our player... | false | false | false | false | false | 0 |
sort_bucket (ira_allocno_t *bucket_ptr)
{
ira_allocno_t a, head;
int n;
for (n = 0, a = *bucket_ptr; a != NULL; a = ALLOCNO_NEXT_BUCKET_ALLOCNO (a))
sorted_allocnos[n++] = a;
if (n <= 1)
return;
qsort (sorted_allocnos, n, sizeof (ira_allocno_t),
bucket_allocno_compare_func);
head = NULL;
for (n... | false | false | false | false | false | 0 |
test_merge_workdir_setup__pull_two(void)
{
git_oid our_oid;
git_oid octo1_oid;
git_oid octo2_oid;
git_merge_head *our_head, *their_heads[2];
cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
cl_git_pass(git_oid_fromstr(&octo1_oid, OCTO1_OID));
... | false | false | false | false | false | 0 |
glade_widget_adaptor_get_parent_adaptor_by_type (GType adaptor_type)
{
GladeWidgetAdaptor *parent_adaptor = NULL;
GType iter_type;
for (iter_type = g_type_parent (adaptor_type);
iter_type > 0; iter_type = g_type_parent (iter_type))
{
if ((parent_adaptor =
glade_widget_adaptor_get_by_t... | false | false | false | false | false | 0 |
gnm_func_get_description (GnmFunc const *fn_def)
{
gint i;
g_return_val_if_fail (fn_def != NULL, NULL);
gnm_func_load_if_stub ((GnmFunc *)fn_def);
for (i = 0;
fn_def->help && fn_def->help[i].type != GNM_FUNC_HELP_END;
i++) {
const char *desc;
if (fn_def->help[i].type != GNM_FUNC_HELP_NAME)
con... | false | false | false | false | false | 0 |
MsgTypeToString(int msgType) {
switch (msgType) {
case SOLICIT_MSG:
return "SOLICIT";
break;
case ADVERTISE_MSG:
return "ADVERTISE";
case REQUEST_MSG:
return "REQUEST";
case REPLY_MSG:
return "REPLY";
case RELEASE_MSG:
return "RELEASE";
case CONFIRM_MSG:
return "CONFIRM";
case DEC... | false | false | false | false | false | 0 |
gwy_layer_point_draw(GwyVectorLayer *layer,
GdkDrawable *drawable,
GwyRenderingTarget target)
{
gint i, n;
if (!layer->selection)
return;
g_return_if_fail(GDK_IS_DRAWABLE(drawable));
if (!GWY_LAYER_POINT(layer)->draw_marker)
return;
n = g... | false | false | false | false | false | 0 |
Find (void* key) {
int n = Hash(key);
UList* slot = _slot[n];
if (slot != nil) {
for (UList* u = slot->First(); u != slot->End(); u = u->Next()) {
UHashElem* elem = Elem(u);
if (Equal(elem->GetKey(), key)) {
return elem;
}
}
}
ret... | false | false | false | false | false | 0 |
whplink(struct dentry *h_dentry, struct inode *inode,
aufs_bindex_t bindex, struct au_branch *br)
{
int err, wkq_err;
struct au_wbr *wbr;
struct dentry *h_parent;
char a[PLINK_NAME_LEN];
struct qstr tgtname = QSTR_INIT(a, 0);
wbr = au_sbr(inode->i_sb, bindex)->br_wbr;
h_parent = wbr->wbr_plink;
tgtname.le... | false | false | false | false | false | 0 |
QRinput_encodeMode8(QRinput_List *entry, int version)
{
int ret, i;
unsigned int val;
entry->bstream = BitStream_new();
if(entry->bstream == NULL) return -1;
val = 0x4;
ret = BitStream_appendNum(entry->bstream, 4, val);
if(ret < 0) goto ABORT;
val = entry->size;
ret = BitStream_appendNum(entry->bstream, QR... | false | false | false | false | false | 0 |
m_displaymsg(struct Client *source_p, const char *channel, int underline, int action, const char *nick, const char *text)
{
struct Channel *chptr;
struct membership *msptr;
char nick2[NICKLEN+1];
char *nick3 = rb_strdup(nick);
char text2[BUFSIZE];
if(!IsFloodDone(source_p))
flood_endgrace(source_p);
if((chpt... | true | true | false | false | false | 1 |
is_header_line(const char *s)
{
const char *p = strchr(s, ':');
if (!p || p == s || !*(p + 1) || strchr(s, '='))
return 0;
return 1;
} | false | false | false | false | false | 0 |
getTargetPrinterNumberOfConfigurationSettings(const char *targetID)
{
Uint32 result = 0;
if (pConfig)
{
pConfig->select_section(targetID, L2_COMMUNICATION);
if (pConfig->section_valid(1))
{
int counter = 1;
char l0_key[80];
do
{
sprintf(l0_key, "CONFIGURATION_%d", cou... | false | false | false | false | false | 0 |
tools_check_basename(user_interaction & dialog, const path & loc, string & base, const string & extension)
{
NLS_SWAP_IN;
try
{
regular_mask suspect = regular_mask(string(".+\\.[1-9][0-9]*\\.")+extension, true);
string old_path = (loc+base).display();
// is basename is suspect ?
if(!suspect.is_... | false | false | false | false | false | 0 |
__pyx_f_7dumbnet_ip_ntoa(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_buf = 0;
ip_addr_t __pyx_v_ia;
unsigned int __pyx_v_i;
PyObject *__pyx_r;
int __pyx_1;
unsigned long __pyx_2;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"buf",0};
if (!PyArg_Pars... | false | false | false | false | false | 0 |
pch_can_error(struct net_device *ndev, u32 status)
{
struct sk_buff *skb;
struct pch_can_priv *priv = netdev_priv(ndev);
struct can_frame *cf;
u32 errc, lec;
struct net_device_stats *stats = &(priv->ndev->stats);
enum can_state state = priv->can.state;
skb = alloc_can_err_skb(ndev, &cf);
if (!skb)
return;
... | false | false | false | false | false | 0 |
bnxt_hwrm_clear_vnic_rss(struct bnxt *bp)
{
int i;
for (i = 0; i < bp->nr_vnics; i++)
bnxt_hwrm_vnic_set_rss(bp, i, false);
} | false | false | false | false | false | 0 |
get_page_at_coords (GeditPrintPreview *preview,
gint x,
gint y)
{
GeditPrintPreviewPrivate *priv;
GtkAdjustment *hadj, *vadj;
gint r, c, pg;
priv = preview->priv;
if (priv->tile_h <= 0 || priv->tile_h <= 0)
return -1;
get_adjustments (preview, &hadj, &vadj);
x += gtk... | false | false | false | false | false | 0 |
apply(const plan *ego_, R *I, R *O)
{
const P *ego = (const P *) ego_;
plan_dft *cld1;
plan_rdft *cld2;
INT roff = ego->roff, ioff = ego->ioff;
/* DFT local dimensions */
cld1 = (plan_dft *) ego->cld1;
if (ego->preserve_input) {
cld1->apply(ego->cld1, I+roff, I+ioff, O+roff, ... | false | false | false | false | false | 0 |
R3Contains(const R3Line& line, const R3Ray& ray)
{
// Return whether line contains ray
return (R3Parallel(line, ray) &&
R3Contains(line, ray.Start()));
} | false | false | false | false | false | 0 |
spif_array_iterator(spif_array_t self)
{
ASSERT_RVAL(!SPIF_ARRAY_ISNULL(self), SPIF_NULL_TYPE(iterator));
return SPIF_CAST(iterator) spif_array_iterator_new(self);
} | false | false | false | false | false | 0 |
GetCellLists(vtkIntArray *regions,
int setIndex, vtkIdList *inRegionCells, vtkIdList *onBoundaryCells)
{
vtkDataSet *set = this->GetDataSet(setIndex);
if (!set)
{
vtkErrorMacro(<<"vtkKdTree::GetCellLists no such data set");
return 0;
}
return this->GetCellLists(regions, set,
... | false | false | false | false | false | 0 |
write(int fd, const void *buf, size_t count)
{
libc_func(write, ssize_t, int, const void *, size_t);
ssize_t res;
res = _write(fd, buf, count);
script_record_op('w', fd, buf, res);
return res;
} | false | false | false | false | false | 0 |
cb_get_level (cb_tree x)
{
const char *p;
const char *name;
int level = 0;
name = CB_NAME (x);
/* get level */
for (p = name; *p; p++) {
if (!isdigit (*p)) {
goto level_error;
}
level = level * 10 + (*p - '0');
}
/* check level */
switch (level) {
case 66:
case 77:
case 78:
case 88:
break;
d... | false | false | false | false | false | 0 |
dtb_setup_hpet(void)
{
#ifdef CONFIG_HPET_TIMER
struct device_node *dn;
struct resource r;
int ret;
dn = of_find_compatible_node(NULL, NULL, "intel,ce4100-hpet");
if (!dn)
return;
ret = of_address_to_resource(dn, 0, &r);
if (ret) {
WARN_ON(1);
return;
}
hpet_address = r.start;
#endif
} | false | false | false | false | false | 0 |
GenCW(int16 *CwBuf,int Samples)
{
int i = 0;
char c;
while(i < Samples) {
if(ElementCount == 0) {
if(bToneOn) {
// Send intra-character space
bToneOn = FALSE;
ElementCount = DitSamples;
bElementSpace = TRUE;
RampCount = CwRampCount;
... | false | false | false | false | false | 0 |
update_word_xt(F_WORD *word)
{
/* If we just enabled the profiler, reset call count */
if(profiling_p)
{
word->counter = tag_fixnum(0);
if(!word->profiling)
{
REGISTER_UNTAGGED(word);
F_COMPILED *profiling = compile_profiling_stub(word);
UNREGISTER_UNTAGGED(word);
word->profiling = profiling;
}
... | false | false | false | false | false | 0 |
connection_control_closed(control_connection_t *conn)
{
tor_assert(conn);
conn->event_mask = 0;
control_update_global_event_mask();
if (conn->is_owning_control_connection) {
lost_owning_controller("connection", "closed");
}
} | false | false | false | false | false | 0 |
update_preview (GtkFileChooser *chooser,
GnomeDesktopThumbnailFactory *thumb_factory)
{
gchar *uri;
uri = gtk_file_chooser_get_preview_uri (chooser);
if (uri) {
GdkPixbuf *pixbuf = NULL;
const gchar *mime_type = NULL;
... | false | false | false | false | false | 0 |
find_and_add_filter(
git_vector *filters, git_repository *repo, const char *path,
int (*apply)(struct git_filter *self, git_buf *dest, const git_buf *source))
{
struct crlf_attrs ca;
struct crlf_filter *filter;
int error;
/* Load gitattributes for the path */
if ((error = crlf_load_attributes(&ca, repo, path)) ... | false | false | false | false | false | 0 |
fm_power_up(struct fmdev *fmdev, u8 mode)
{
u16 payload;
__be16 asic_id, asic_ver;
int resp_len, ret;
u8 fw_name[50];
if (mode >= FM_MODE_ENTRY_MAX) {
fmerr("Invalid firmware download option\n");
return -EINVAL;
}
/*
* Initialize FM common module. FM GPIO toggling is
* taken care in Shared Transport dr... | false | true | false | false | false | 1 |
randomize_c(int randomize, circle * c)
{
if (randomize / 2) {
double temp;
temp = c->x;
c->x = c->y;
c->y = temp;
}
if (randomize % 2) {
c->x = -c->x;
c->y = -c->y;
}
} | false | false | false | false | false | 0 |
parse_header(char *s)
{
unsigned long parsed[12];
char buf[9];
int i;
buf[8] = '\0';
for (i = 0, s += 6; i < 12; i++, s += 8) {
memcpy(buf, s, 8);
parsed[i] = simple_strtoul(buf, NULL, 16);
}
ino = parsed[0];
mode = parsed[1];
uid = parsed[2];
gid = parsed[3];
nlink = parsed[4];
mtime = parsed[5];
bod... | false | false | false | false | false | 0 |
json_count_array_elements(JsonLexContext *lex)
{
JsonLexContext copylex;
int count;
/*
* It's safe to do this with a shallow copy because the lexical routines
* don't scribble on the input. They do scribble on the other pointers etc,
* so doing this with a copy makes that safe.
*/
memcpy(©lex, lex, ... | false | true | false | false | false | 1 |
zend_get_executed_lineno(TSRMLS_D) /* {{{ */
{
if(EG(exception) && EG(opline_ptr) && active_opline->opcode == ZEND_HANDLE_EXCEPTION &&
active_opline->lineno == 0 && EG(opline_before_exception)) {
return EG(opline_before_exception)->lineno;
}
if (EG(opline_ptr)) {
return active_opline->lineno;
} else {
retu... | false | false | false | false | false | 0 |
gst_structure_can_intersect (const GstStructure * struct1,
const GstStructure * struct2)
{
g_return_val_if_fail (GST_IS_STRUCTURE (struct1), FALSE);
g_return_val_if_fail (GST_IS_STRUCTURE (struct2), FALSE);
if (G_UNLIKELY (struct1->name != struct2->name))
return FALSE;
/* tries to intersect if we have... | false | false | false | false | false | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.