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 |
|---|---|---|---|---|---|---|
showPause ()
{
hideItems();
if (!m_gameScene->items().contains(m_dimmOverlay))
{
m_gameScene->addItem(m_dimmOverlay);
}
if (!m_gameScene->items().contains(m_pauseLabel))
{
m_gameScene->addItem(m_pauseLabel);
}
if (!m_gameScene->items().contains(m_continueAf... | false | false | false | false | false | 0 |
intel_uncore_fw_domains_init(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
if (INTEL_INFO(dev_priv)->gen <= 5)
return;
if (IS_GEN9(dev)) {
dev_priv->uncore.funcs.force_wake_get = fw_domains_get;
dev_priv->uncore.funcs.force_wake_put = fw_domains_put;
fw_domain_init(dev_pri... | false | false | false | false | false | 0 |
hooke3_energy_gradient(e_info)
struct qinfo *e_info;
{
REAL d,diff,coeff;
REAL energy;
int j;
REAL length;
length = *((REAL*)get_extra(e_info->id,hooke3_attr));
d = sqrt(SDIM_dot(e_info->sides[0][0],e_info->sides[0][0]));
if ( frickenhaus_flag && (d < length) ) return 0.0;
diff = (d - length);
if ( d... | false | false | false | false | false | 0 |
zd1201_suspend(struct usb_interface *interface,
pm_message_t message)
{
struct zd1201 *zd = usb_get_intfdata(interface);
netif_device_detach(zd->dev);
zd->was_enabled = zd->mac_enabled;
if (zd->was_enabled)
return zd1201_disable(zd);
else
return 0;
} | false | false | false | false | false | 0 |
attributeRef(unsigned long n, NodePtr &ptr) const
{
NamedNodeListPtr atts;
AccessResult ret = getAttributes(atts);
if (ret != accessOK)
return ret;
return atts->nodeList()->ref(n, ptr);
} | false | false | false | false | false | 0 |
locate_newblock(blk)
long blk;
{
if (wfd == -1)
return ERR;
if (blk <= 0L)
return ERR;
if (wp > wblkbuf)
write_newblock();
if (lseek(wfd, (blk - 1L) * BLKSIZ, 0) < 0)
return ERR;
wp = wblkbuf;
wblkno = blk;
return OK;
} | false | false | false | false | false | 0 |
procset(const char* kbuf, size_t ksiz, const char* vbuf, size_t vsiz,
const char* host, int32_t port, double tout,
const char* swname, double swtime, const char* ssname, bool ssbrd,
const char* dbexpr, int32_t mode, int64_t xt) {
kt::RemoteDB db;
... | false | false | false | false | false | 0 |
swap(RastSubdocState &to)
{
{
SgmlParser *tem = to.parser_;
to.parser_ = parser_;
parser_ = tem;
}
{
Boolean tem = to.hadActiveLpdOrDtd_;
to.hadActiveLpdOrDtd_ = hadActiveLpdOrDtd_;
hadActiveLpdOrDtd_ = tem;
}
{
Boolean tem = to.hadDocumentElement_;
to.hadDocumentElement_ = had... | false | false | false | false | false | 0 |
static_voronoi_color (GtkWidget *widget, void *data)
{
gamgi_window *window = GAMGI_CAST_WINDOW data;
GtkWidget *dialog = window->dialog0;
GtkWidget *entry_red, *entry_green, *entry_blue;
GtkWidget *label_red, *label_green, *label_blue;
char token[GAMGI_ENGINE_TOKEN];
entry_red = (GtkWidget *) g_object_get_data (G_OBJ... | false | false | false | false | false | 0 |
incHebGregDate(
date_t *dtHeb,
date_t *dtGreg,
long *dtAbs,
int *wkday,
year_t *theYear
)
{
incDate (dtGreg, 1L);
*dtHeb = nextHebDate (*dtHeb);
(*dtAbs)++;
*wkday = (*wkday + 1) % 7;
if (TISHREI == dtHeb->mm && /* if Rosh Hashana then reset YearData */
1 == dtHeb->dd)
... | false | false | false | false | false | 0 |
_wp_readn (int fd, void *ptr, size_t n)
{
size_t nleft = n;
ssize_t nread;
while (nleft >0)
{
if ((nread = read (fd, ptr, nleft)) < 0)
{
if (errno == EINTR)
{
nread = 0;
}
else
{
wp_sys_func_warning ();
return -1;
}
}
else if (nread == 0)
{
break; /* EOF */
}
nleft -=... | false | true | false | false | true | 1 |
gxbcol (XStandardColormap* best, XColor * cell) {
XColor color, colors[256];
unsigned long bestpixel=0;
gaint d, i;
gaint min;
for (i=0; i<256; i++) {
colors[i].pixel = i;
}
XQueryColors(display, cmap, colors, 256);
min = 65536;
for (i=0; i<256; i++) {
d = abs(cell->red - colors[i].red)
... | false | false | false | false | false | 0 |
get_dir_list_from_file_list (GHashTable *h_dirs,
const char *base_dir,
GList *files,
gboolean is_dir_list)
{
GList *scan;
GList *dir_list = NULL;
int base_dir_len;
if (base_dir == NULL)
base_dir = "";
base_dir_len = strlen (base_dir);
for (scan = files; scan; scan = scan->ne... | false | false | false | false | false | 0 |
network_status_changed (gpointer *connectivity,
GeoclueNetworkStatus status,
GcMasterProvider *provider)
{
GcMasterProviderPrivate *priv;
priv = GET_PRIVATE (provider);
priv->net_status = status;
/* update connection-cacheable providers */
if (status == GEOCLUE... | false | false | false | false | false | 0 |
gw_catalog_compare_search_gulong ( GtkCList *clist, const gpointer ptr1, const gpointer ptr2)
{
struct search_item_info *search_item_info1 = NULL, *search_item_info2 = NULL;
gulong nb1 = 0, nb2 = 0;
gint type1, type2;
gchar *str_name1 = NULL, *str_name2 = NULL;
gint result = 0;
#ifdef GW_DEBUG_GUI_CALLBACK_COMPO... | false | false | false | false | false | 0 |
globus_l_args_check_options(
int option_count,
globus_args_option_descriptor_t * options ,
char ** error_msg )
{
# define ERROR7 _GCSL("Error : flags -help, -usage, -version,and -versions are reserved.\n")
# define ERRORID0 _GCSL("Error... | false | false | false | false | false | 0 |
parse_service_token_response(apr_xml_doc *xd,
server_rec *server,
apr_pool_t *pool,
time_t curr)
{
MWA_SERVICE_TOKEN *st;
apr_xml_elem *e, *sib;
size_t bskey_len;
char *bskey;
time_t first_renewal_attempt, expirat... | false | false | false | false | false | 0 |
next_dslot (int next)
{
return (jfs.dttype == DTTYPE_INLINE)
? (dtslot_t *)&dtroot->slot[next]
: &((dtslot_t *)dtpage->slot)[next];
} | false | false | false | false | false | 0 |
tspWriteLastServerToFile(char *last_server_file, char *last_server) {
FILE *file;
/* Some internal checking */
if (last_server_file == NULL) {
Display(LOG_LEVEL_1, ELError, "tspWriteLastServerToFile", GOGO_STR_RDR_WRITE_LAST_SERVER_INT_ERR);
return TSP_REDIRECT_INTERNAL_ERR;
}
if (last_server == NULL) {
D... | false | false | false | false | true | 1 |
ompi_group_range_incl(ompi_group_t* group, int n_triplets, int ranges[][3],
ompi_group_t **new_group)
{
int j,k;
int *ranks_included=NULL;
int index,first_rank,last_rank,stride;
int count,result;
count = 0;
/* determine the number of included processes for the range-... | false | false | false | true | false | 1 |
write_data_buffer(int fd, char* file_buffer, int size, syncsendbuf *sbuf)
{
int err = 0;
int total = 0;
sbuf->id = ID_DATA;
while (total < size) {
int count = size - total;
if (count > SYNC_DATA_MAX) {
count = SYNC_DATA_MAX;
}
memcpy(sbuf->data, &file_buffer... | false | false | false | false | false | 0 |
RInputRange(szPrompt, low, high, pm)
byte *szPrompt;
real low, high;
int pm;
{
byte szLine[cchSzDef];
real r;
loop {
InputString(szPrompt, szLine);
r = RParseSz(szLine, pm);
if (FBetween(r, low, high))
return r;
sprintf(szLine, "Value %.0f out of range from %.0f to %.0f.",
r, low, hig... | false | false | false | false | false | 0 |
da9150_fg_irq(int irq, void *data)
{
struct da9150_fg *fg = data;
u32 e_fg_status;
/* Read FG IRQ status info */
e_fg_status = da9150_fg_read_attr(fg, DA9150_QIF_E_FG_STATUS,
DA9150_QIF_E_FG_STATUS_SIZE);
/* Handle warning/critical threhold events */
if (e_fg_status & DA9150_FG_IRQ_SOC_MASK)
da9150_fg_... | false | false | false | false | false | 0 |
gt_extractfeat_runner(GT_UNUSED int argc, const char **argv,
int parsed_args, void *tool_arguments,
GtError *err)
{
GtNodeStream *gff3_in_stream = NULL, *extract_feature_stream = NULL;
GtExtractFeatArguments *arguments = tool_arguments;
GtRegionMap... | false | false | false | false | false | 0 |
getReferenceFrame(CoordinateFrame& cframe) const {
cframe.translation = center();
Vector3 Y = (p1 - p2).direction();
Vector3 X = (abs(Y.dot(Vector3::unitX())) > 0.9) ? Vector3::unitY() : Vector3::unitX();
Vector3 Z = X.cross(Y).direction();
X = Y.cross(Z);
cframe.rotation.setColumn(0, X... | false | false | false | false | false | 0 |
avl_presentlist_insert(
syncinfo_t* si,
struct berval *syncUUID )
{
struct berval *syncuuid_bv = ch_malloc( sizeof( struct berval ) + syncUUID->bv_len + 1 );
syncuuid_bv->bv_len = syncUUID->bv_len;
syncuuid_bv->bv_val = (char *)&syncuuid_bv[1];
AC_MEMCPY( syncuuid_bv->bv_val, syncUUID->bv_val, syncUUID->bv_len )... | false | false | false | false | false | 0 |
add_object_to_track (GESTimelineObject * object, GESTrack * track)
{
if (!ges_timeline_object_create_track_objects (object, track)) {
GST_WARNING ("error creating track objects");
}
} | false | false | false | false | false | 0 |
fitstable_open_extension(fitstable_t* tab, int ext) {
if (in_memory(tab)) {
fitsext_t* theext;
if (ext > bl_size(tab->extensions)) {
ERROR("Table has only %i extensions, but you requested #%i",
bl_size(tab->extensions), ext);
return -1;
}
theext = bl_access(tab->extensions, ext-1);
tab->table = t... | false | false | false | false | false | 0 |
vidioc_s_input(struct file *file, void *fh, unsigned int input)
{
struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
struct mxb *mxb = (struct mxb *)dev->ext_priv;
int err = 0;
int i = 0;
DEB_EE("VIDIOC_S_INPUT %d\n", input);
if (input >= MXB_INPUTS)
return -EINVAL;
mxb->cur_input = input;
saa7146_... | false | false | false | false | false | 0 |
dict___contains__(PyDictObject *self, PyObject *key)
/*[clinic end generated code: output=3cf3f8aaf2cc5cc3 input=b852b2a19b51ab24]*/
{
register PyDictObject *mp = self;
Py_hash_t hash;
PyDictKeyEntry *ep;
PyObject **value_addr;
if (!PyUnicode_CheckExact(key) ||
(hash = ((PyASCIIObject *) ke... | false | false | false | false | false | 0 |
purge_request(struct dlm_ls *ls, struct dlm_message *ms, int nodeid)
{
uint32_t type = ms->m_type;
/* the ls is being cleaned up and freed by release_lockspace */
if (!ls->ls_count)
return 1;
if (dlm_is_removed(ls, nodeid))
return 1;
/* directory operations are always purged because the directory is
alw... | false | false | false | false | false | 0 |
genie_read_real_format (NODE_T * p, MOID_T * mode, BYTE_T * item, A68_REF ref_file)
{
if (IS (p, GENERAL_PATTERN) && NEXT_SUB (p) == NO_NODE) {
genie_read_standard (p, mode, item, ref_file);
} else if (IS (p, GENERAL_PATTERN) && NEXT_SUB (p) != NO_NODE) {
read_number_generic (p, mode, item, ref_file);
} e... | false | false | false | false | false | 0 |
GetVisual(int class, Visual ** visual, int *depth)
{
XVisualInfo *visualsavailable;
int nvisuals = 0;
long vinfo_mask = VisualClassMask;
XVisualInfo vinfo;
vinfo.class = class;
*depth = 0;
*visual = 0;
visualsavailable = XGetVisualInfo(dpy, vinfo_mask, &vinfo, &nvisuals);
if (visu... | false | false | false | false | false | 0 |
getPathDist(uint16_t k, uint16_t step) const
{
const double t = PATH_TIME_STEP*step;
const double dir = CParameterizedTrajectoryGenerator::index2alpha(k);
const double TR2_ = 1.0/(2*T_ramp);
const double vxf = V_MAX * cos(dir), vyf = V_MAX * sin(dir);
const double vxi = curVelLocal.vx, vyi = curVelLocal.vy;
con... | false | false | false | false | false | 0 |
gf_ipmpx_dump_WatermarkingInit(GF_IPMPX_Data *_p, FILE *trace, u32 indent, Bool XMTDump)
{
GF_IPMPX_WatermarkingInit*p = (GF_IPMPX_WatermarkingInit*)_p;
StartElement(trace, (char*) ( (_p->tag==GF_IPMPX_AUDIO_WM_INIT_TAG) ? "IPMP_AudioWatermarkingInit" : "IPMP_VideoWatermarkingInit"), indent, XMTDump);
indent++;
Du... | false | false | false | false | false | 0 |
procout(const char *nurl, int id, const char *uri){
ESTNODE *node;
int err;
err = FALSE;
node = est_node_new(nurl);
if(g_pxhost && g_pxport > 0) est_node_set_proxy(node, g_pxhost, g_pxport);
if(g_timeout >= 0) est_node_set_timeout(node, g_timeout);
if(g_authname && g_authpass) est_node_set_auth(node, g_au... | false | false | false | false | false | 0 |
configdebug(void *opt, char *cmd, char *arg1, char *arg2, int rc) {
char **args = (char **)opt;
char *a, *c;
if (rc == 0) {
shortwarn(cmd, arg1, rc);
return;
}
if (rc > 1)
longwarn(cmd, arg1, arg2, rc);
if (strcaseeq(arg1, "ON") || strcaseeq(arg1, "TRUE") ||
strcaseeq(arg1, "ALL"))
co... | false | false | false | false | false | 0 |
soap_markelement(struct soap *soap, const void *ptr, int type)
{
(void)soap; (void)ptr; (void)type; /* appease -Wall -Werror */
switch (type)
{
case SOAP_TYPE_Calc_ns__pow:
soap_serialize_ns__pow(soap, (const struct ns__pow *)ptr);
break;
case SOAP_TYPE_Calc_ns__powResponse:
soap_serialize_ns__powResponse(so... | false | false | false | false | false | 0 |
fs_multicast_stream_transmitter_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
FsMulticastStreamTransmitter *self = FS_MULTICAST_STREAM_TRANSMITTER (objec... | false | false | false | false | false | 0 |
visitEnum(const EnumPtr& p)
{
if(p->isLocal())
{
return;
}
ostringstream ostr;
ostr << "enum " << p->name() << endl;
EnumeratorList enums = p->getEnumerators();
for(EnumeratorList::iterator q = enums.begin(); q != enums.end(); ++q)
{
ostr << (*q)->name() << endl;
}... | false | false | false | false | false | 0 |
afr_dir_fop_mark_entry_pending_changelog (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
local = frame->local;
priv = this->private;
if (local->op_ret < 0)
goto out;
if (local->success_count =... | false | false | false | false | false | 0 |
check_scroll_area(int x, int y) {
SDL_Rect rect_north = {0, 0, Main.map->w, SCROLL_MAP_AREA};
SDL_Rect rect_east = {Main.map->w - SCROLL_MAP_AREA, 0, SCROLL_MAP_AREA, Main.map->h};
SDL_Rect rect_south = {0, Main.map->h - SCROLL_MAP_AREA, Main.map->w, SCROLL_MAP_AREA};
SDL_Rect rect_west = {0, 0, SCROLL_MAP_A... | false | false | false | false | false | 0 |
updateSettings()
{
AmarokConfig::setWriteBack( m_writeBack->isChecked() );
AmarokConfig::setWriteBackStatistics( m_writeBackStatistics->isChecked() );
AmarokConfig::setWriteBackCover( m_writeBackCover->isChecked() );
if( writeBackCoverDimensions() > 0 )
AmarokConfig::setWriteBackCoverDimensions(... | false | false | false | false | false | 0 |
map_ram_probe(struct map_info *map)
{
struct mtd_info *mtd;
/* Check the first byte is RAM */
#if 0
map_write8(map, 0x55, 0);
if (map_read8(map, 0) != 0x55)
return NULL;
map_write8(map, 0xAA, 0);
if (map_read8(map, 0) != 0xAA)
return NULL;
/* Check the last byte is RAM */
map_write8(map, 0x55, map->size-... | false | false | false | false | false | 0 |
append_lists(struct list *l1,
struct list *l2)
{
struct clause *c;
int i;
if (l1->last_cl) /* if l1 not empty */
l1->last_cl->next_cl = l2->first_cl;
else
l1->first_cl = l2->first_cl;
if (l2->first_cl) { /* if l2 not empty */
l2->first_cl->prev_cl = l1->last_cl;
l1->last_cl = l2->last_... | false | false | false | false | false | 0 |
_elm_entry_text_set(Evas_Object *obj, const char *item, const char *entry)
{
int len = 0;
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (!entry) entry = "";
if (item)
{
if (!strcmp(item, "guide"))
edje_object_part_text_set(wd->e... | false | true | true | false | false | 1 |
tls_connect(SSL_CTX *ctx, int fd)
{
struct tls_info *info=SSL_CTX_get_app_data(ctx);
SSL *ssl;
int rc;
/*
** Initialize a tls_transfer_info object.
*/
if (fcntl(fd, F_SETFL, O_NONBLOCK))
{
nonsslerror(info, "fcntl");
return (NULL);
}
#ifdef SO_KEEPALIVE
{
int dummy;
dummy=1;
if (setsockopt(fd... | false | false | false | false | false | 0 |
main (int argc, char **argv) /* icm-comp source(txt) dest(bin) */
{
if (argc != 3)
{
copyright("Make Optimizing Compiler", version, release);
error("Usage: %s source dest\n"
"where:\n"
"\tsource: source file to compile\n"
"\t (normally ... | false | false | false | false | true | 1 |
print (ostream &out, const char *inner, bool prefix) const {
out << "<undefined>";
if (inner)
out << " " << inner;
} | false | false | false | false | false | 0 |
includeInRadius(const FXSphered& sphere){
register FXdouble dx,dy,dz,dist;
if(0.0<=sphere.radius){
if(0.0<=radius){
dx=sphere.center.x-center.x;
dy=sphere.center.y-center.y;
dz=sphere.center.z-center.z;
dist=sqrt(dx*dx+dy*dy+dz*dz)+sphere.radius;
if(radius<dist) radius=dist;
... | false | false | false | false | false | 0 |
xenbus_unmap_ring_vfree_hvm(struct xenbus_device *dev, void *vaddr)
{
int rv;
struct xenbus_map_node *node;
void *addr;
struct unmap_ring_vfree_hvm info = {
.idx = 0,
};
unsigned int nr_pages;
spin_lock(&xenbus_valloc_lock);
list_for_each_entry(node, &xenbus_valloc_pages, next) {
addr = node->hvm.addr;
i... | false | false | false | false | false | 0 |
doAction(SoAction *action)
//
////////////////////////////////////////////////////////////////////////
{
SbBool doCenter;
SoState *state = action->getState();
SbVec2f t2;
SbVec3f t3;
doCenter = (! center.isIgnored() && ! center.isDefault());
// Do these in GL (right-to-left) order
if (! tr... | false | false | false | false | false | 0 |
interp_render_arc_segment( vec3d *v1, vec3d *v2, int depth )
{
float d = vm_vec_dist_quick( v1, v2 );
const float scaler = 0.30f;
if ( (d < scaler) || (depth > 4) ) {
// the real limit appears to be 33, so we should never hit this unless the code changes
Assert( Num_arc_segment_points < MAX_ARC_SEGMENT_POINTS )... | false | false | false | false | false | 0 |
sec_pkcs12_get_attribute_value(sec_PKCS12SafeBag *bag,
SECOidTag attributeType)
{
int i;
if(!bag->attribs) {
PORT_SetError(SEC_ERROR_INVALID_ARGS);
return NULL;
}
for (i = 0; bag->attribs[i] != NULL; i++) {
if (SECOID_FindOIDTag(&bag->attribs[i]->attrType) == attributeType) {
return ... | false | false | false | false | false | 0 |
on_star_align_changed (GtkAdjustment *adjustment, gpointer user_data)
{
const char *propname = user_data;
float f = gtk_adjustment_get_value(adjustment);
if (g_last_image)
g_object_set (g_last_image, propname, f, NULL);
} | false | false | false | false | false | 0 |
read1(FileArea *a, FileOfs rstart, byte *buf, uint count)
{
CopiedFileArea *c;
ModifiedFileArea *m;
if ((m = dynamic_cast<ModifiedFileArea*>(a))) {
memcpy(buf, m->buf + rstart, count);
} else if ((c = dynamic_cast<CopiedFileArea*>(a))) {
mFile->seek(c->src_start+rstart);
mFile->read(buf, count);
} else asser... | false | false | false | false | false | 0 |
remount_stub (XDR *xdr_in)
{
int r;
struct guestfs_remount_args args;
const char *mountpoint;
int rw;
if (optargs_bitmask & UINT64_C(0xfffffffffffffffe)) {
reply_with_error ("unknown option in optional arguments bitmask (this can happen if a program is compiled against a newer version of libguestfs, then... | false | false | false | false | false | 0 |
AcpiPsGetNextNamepath (
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_STATE *ParserState,
ACPI_PARSE_OBJECT *Arg,
BOOLEAN PossibleMethodCall)
{
ACPI_STATUS Status;
char *Path;
ACPI_PARSE_OBJECT *NameOp;
ACPI_OPERAND_OBJEC... | false | false | false | false | false | 0 |
cache_unaware(void) {
for(int i=0; i<matrix_n; i++)
for(int j=0; j<matrix_p; j++)
for(int k=0; k<matrix_m; k++)
A(i,k)*B(k,j);
} | false | false | false | false | false | 0 |
vmxnet3_poll_rx ( struct net_device *netdev ) {
struct vmxnet3_nic *vmxnet = netdev_priv ( netdev );
struct vmxnet3_rx_comp *rx_comp;
struct io_buffer *iobuf;
unsigned int comp_idx;
unsigned int desc_idx;
unsigned int generation;
size_t len;
while ( 1 ) {
/* Look for completed descriptors */
comp_idx = ( ... | false | false | false | false | false | 0 |
isc_sockaddr_v6fromin(isc_sockaddr_t *sockaddr, const struct in_addr *ina,
in_port_t port)
{
memset(sockaddr, 0, sizeof(*sockaddr));
sockaddr->type.sin6.sin6_family = AF_INET6;
#ifdef ISC_PLATFORM_HAVESALEN
sockaddr->type.sin6.sin6_len = sizeof(sockaddr->type.sin6);
#endif
sockaddr->type.sin6.sin6_addr.s6_a... | false | false | false | false | false | 0 |
gog_graph_view_render (GogView *view, GogViewAllocation const *bbox)
{
GogGraphView *gview = GOG_GRAPH_VIEW (view);
GSList *ptr;
GogView *child_view;
gview_parent_klass->render (view, bbox);
/* render everything except labels */
for (ptr = view->children ; ptr != NULL ; ptr = ptr->next) {
child_view = ptr->d... | false | false | false | false | false | 0 |
pipe_pointer(int mask, int x, int y, rfbClientPtr client) {
int can_input = 0, uid = 0;
allowed_input_t input;
ClientData *cd = (ClientData *) client->clientData;
char hint[MAX_BUTTONS * 20];
if (pipeinput_int == PIPEINPUT_VID) {
v4l_pointer_command(mask, x, y, client);
} else if (pipeinput_int == PIPEINPUT_CO... | true | true | false | false | true | 1 |
vnc_connection_coroutine(void *opaque)
{
VncConnection *conn = VNC_CONNECTION(opaque);
VncConnectionPrivate *priv = conn->priv;
int ret;
struct signal_data s;
VNC_DEBUG("Started background coroutine");
if (priv->fd != -1) {
if (!vnc_connection_open_fd_internal(conn))
goto c... | false | false | false | false | false | 0 |
event_deferred_cb_queue_init(struct deferred_cb_queue *cb)
{
memset(cb, 0, sizeof(struct deferred_cb_queue));
TAILQ_INIT(&cb->deferred_cb_list);
} | false | false | false | false | false | 0 |
parse_file(
const char* filename, const char* host_venue, bool& found_venue
) {
FILE* f;
GLOBAL_PREFS_MASK mask;
int retval;
#ifndef _USING_FCGI_
f = fopen(filename, "r");
#else
f = FCGI::fopen(filename, "r");
#endif
if (!f) return ERR_FOPEN;
MIOFILE mf;
mf.init_file(f);
XML_PAR... | false | false | false | false | false | 0 |
getBaseCharac( LordCharac type )
{
int ret = 0;
switch( type ) {
case ATTACK:
ret = _attack;
break;
case DEFENSE:
ret = _defense;
break;
case POWER:
ret = _power;
break;
case KNOWLEDGE:
ret = _knowledge;
break;
case MOVE:
ret = _move;
break;
case MAXMOVE:
ret = _maxMove;
break;
case TECHN... | false | false | false | false | false | 0 |
SPI_prepare_cursor(const char *src, int nargs, Oid *argtypes,
int cursorOptions)
{
_SPI_plan plan;
SPIPlanPtr result;
if (src == NULL || nargs < 0 || (nargs > 0 && argtypes == NULL))
{
SPI_result = SPI_ERROR_ARGUMENT;
return NULL;
}
SPI_result = _SPI_begin_call(true);
if (SPI_result < 0)
return NU... | false | false | false | false | false | 0 |
count_leading_zeros(int input)
{
int output = 0;
int curbyte = 0;
curbyte = input >> 24;
if (curbyte) goto found;
output += 8;
curbyte = input >> 16;
if (curbyte & 0xff) goto found;
output += 8;
curbyte = input >> 8;
if (curbyte & 0xff) goto found;
output += 8;
curbyt... | false | false | false | false | false | 0 |
ztype2ltype(int zaxistype)
{
int ltype;
ltype = -1;
if ( zaxistype == ZAXIS_SURFACE ) ltype = 1;
else if ( zaxistype == ZAXIS_PRESSURE ) ltype = 100;
else if ( zaxistype == ZAXIS_ALTITUDE ) ltype = 103;
else if ( zaxistype == ZAXIS_HEIGHT ) ltype = 105;
e... | false | false | false | false | false | 0 |
gnumeric_rank (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
gnm_float *xs;
int i, r, n;
GnmValue *result = NULL;
gnm_float x;
gboolean increasing;
x = value_get_as_float (argv[0]);
xs = collect_floats_value (argv[1], ei->pos,
COLLECT_IGNORE_STRINGS |
COLLECT_IGNORE_BOOLS |
COLLECT_I... | false | false | false | false | false | 0 |
rewrite_call_expr_valist (location_t loc, int oldnargs, tree *args,
int skip, tree fndecl, int n, va_list newargs)
{
int nargs = oldnargs - skip + n;
tree *buffer;
if (n > 0)
{
int i, j;
buffer = XALLOCAVEC (tree, nargs);
for (i = 0; i < n; i++)
buffer[i] = va_arg (newargs, tree);
... | false | false | false | false | false | 0 |
scsi_proc_hostdir_add(struct scsi_host_template *sht)
{
if (!sht->show_info)
return;
mutex_lock(&global_host_template_mutex);
if (!sht->present++) {
sht->proc_dir = proc_mkdir(sht->proc_name, proc_scsi);
if (!sht->proc_dir)
printk(KERN_ERR "%s: proc_mkdir failed for %s\n",
__func__, sht->p... | false | false | false | false | false | 0 |
pg_latin12wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
{
int cnt = 0;
while (len > 0 && *from)
{
*to++ = *from++;
len--;
cnt++;
}
*to = 0;
return cnt;
} | false | false | false | false | false | 0 |
GetNextRawFeature()
{
if( GetStatement() == NULL )
return NULL;
/* -------------------------------------------------------------------- */
/* If we are marked to restart then do so, and fetch a record. */
/* -------------------------------------------------------------------- */
if( !poStmt->... | false | false | false | false | false | 0 |
file_info_dht_query(const sha1_t *sha1)
{
fileinfo_t *fi;
g_assert(sha1);
if (!dht_bootstrapped())
return;
fi = file_info_by_sha1(sha1);
if (fi)
fi_dht_query(fi);
} | false | false | false | false | false | 0 |
test_cr_declaration_parse_list (void)
{
GString *str = NULL;
guchar *tmp_str = NULL;
CRDeclaration *decl = NULL,
*cur_decl = NULL;
decl = cr_declaration_parse_list_from_buf (gv_decl_list_buf,
CR_UTF_8);
if (!decl... | false | false | false | false | false | 0 |
diff(const Path & tmpPath, const Path & path,
const Revision & revision1, const Revision & revision2,
const bool recurse, const bool ignoreAncestry,
const bool noDiffDeleted) throw(ClientException)
{
Pool pool;
svn_error_t * error;
apr_status_t status;
apr_... | false | false | false | false | false | 0 |
mb_cache_destroy(struct mb_cache *cache)
{
struct mb_cache_entry *entry, *next;
unregister_shrinker(&cache->c_shrink);
/*
* We don't bother with any locking. Cache must not be used at this
* point.
*/
list_for_each_entry_safe(entry, next, &cache->c_list, e_list) {
if (!hlist_bl_unhashed(&entry->e_hash_lis... | false | false | false | false | false | 0 |
apcsmart_reset_req(StonithPlugin * s, int request, const char *host)
{
char ** hl;
int b_found=FALSE;
struct pluginDevice * ad = (struct pluginDevice *) s;
int rc;
ERRIFNOTCONFIGED(s, S_OOPS);
if (host == NULL) {
LOG(PIL_CRIT, "%s: invalid hostname argument.", __FUNCTION__);
return (S_INVAL);
}
... | false | false | false | false | false | 0 |
_MD_DetachUnixProcess(PRProcess *process)
{
PRStatus retVal = PR_SUCCESS;
pr_PidRecord *pRec;
PR_Lock(pr_wp.ml);
pRec = FindPidTable(process->md.pid);
if (NULL == pRec) {
pRec = PR_NEW(pr_PidRecord);
if (NULL == pRec) {
PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
retVal = PR_FAILURE;
g... | false | false | false | false | false | 0 |
flac_decoder_metadata_callback(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
{
EncoderSession *e = (EncoderSession*)client_data;
FLACDecoderData *data = &e->fmt.flac.client_data;
(void)decoder;
if (data->fatal_error)
return;
if (
data->num_metadata_blocks == ... | false | false | false | false | false | 0 |
ungrab_pointer (GdkDisplay *display)
{
GdkDevice *pointer = (GdkDevice *) NULL;
GdkDeviceManager *device_manager = (GdkDeviceManager *) NULL;
display = gdk_display_get_default ();
device_manager = gdk_display_get_device_manager (display);
pointer = gdk_device_manager_get_client_pointer (device... | false | false | false | false | false | 0 |
getContext(Window win, int x, int y, int last_x, int last_y, bool doBorders) {
int context = 0;
if (gripLeft().window() == win) return Keys::ON_LEFTGRIP;
if (gripRight().window() == win) return Keys::ON_RIGHTGRIP;
if (doBorders) {
using RectangleUtil::insideBorder;
int borderw = window(... | false | false | false | false | false | 0 |
i915_irq_handler(int irq, void *arg)
{
struct drm_device *dev = arg;
struct drm_i915_private *dev_priv = dev->dev_private;
u32 iir, new_iir, pipe_stats[I915_MAX_PIPES];
u32 flip_mask =
I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT |
I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT;
int pipe, ret = IRQ_NONE;
if (!in... | false | false | false | false | false | 0 |
gwy_data_field_area_subtract_poly(GwyDataField *data_field,
gint col, gint row,
gint width, gint height,
gint nterms,
const gint *term_powers,
const g... | false | false | false | false | false | 0 |
_bfd_generic_set_section_contents (bfd *abfd,
sec_ptr section,
const void *location,
file_ptr offset,
bfd_size_type count)
{
if (count == 0)
return TRUE;
if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0
|| bfd_bwrite (location, count, abfd) != count)
return FA... | false | false | false | false | false | 0 |
setComment2(const char * pszComment)
{
DELETEP(m_pComment2);
m_pComment2 = new UT_UTF8String(pszComment);
} | false | false | false | false | false | 0 |
globus_i_gass_copy_ftp_client_op_done_callback(
void * user_arg,
globus_ftp_client_handle_t * handle,
globus_object_t * err)
{
globus_i_gass_copy_monitor_t * monitor;
monitor = (globus_i_gass_copy_monitor_t *) user_arg;
glob... | false | false | false | false | false | 0 |
elf_ofs_to_addr(elf_section_headers *section_headers, uint elfclass, FileOfs ofs, ELFAddress *addr)
{
switch (elfclass) {
case ELFCLASS32: {
ELF_SECTION_HEADER32 *s = section_headers->sheaders32;
for (uint i = 0; i < section_headers->count; i++) {
if ((elf_phys_and_mem_section((elf_section_header*)s, elfcl... | false | false | false | false | false | 0 |
Disable(const char* className)
{
for(int i =0; i < this->OverrideArrayLength; i++)
{
if(strcmp(this->OverrideClassNames[i], className) == 0)
{
this->OverrideArray[i].EnabledFlag = 0;
}
}
} | false | false | false | false | false | 0 |
SelectDevice
(
const PRINTER_TYPE Model
)
{
#ifdef APDK_CAPTURE
Capture_SelectDevice(Model);
#endif
DRIVER_ERROR err;
if (thePrinter) // if printer exists due to bidi or previous call
{
delete thePrinter;
thePrinter = NULL;
}
err = DR->SelectDevice(Model);
ERRCHECK;
... | false | false | false | false | false | 0 |
hard_link_photo (EBookBackendFile *bf,
EContact *contact,
EContactField field,
const gchar *src_filename,
GError **error)
{
gchar *fullname = NULL, *name, *str;
gint i = 0, ret;
const gchar *suffix;
/* Copy over the file suffix */
suffix = strr... | false | false | false | false | false | 0 |
_bfd_elf_merge_object_attributes (bfd *ibfd, bfd *obfd)
{
obj_attribute *in_attr;
obj_attribute *out_attr;
int vendor;
/* The only common attribute is currently Tag_compatibility,
accepted in both processor and "gnu" sections. */
for (vendor = OBJ_ATTR_FIRST; vendor <= OBJ_ATTR_LAST; vendor++)
{
... | false | false | false | false | false | 0 |
Evaluate(double uvw[3], double Pt[3], double Duvw[9])
{
double u = uvw[0];
double v = uvw[1];
double *Du = Duvw;
double *Dv = Duvw + 3;
for ( int i = 0; i < 3; ++i)
{
Pt[i] = Du[i] = Dv[i] = 0;
}
double cu = cos(u);
double su = sin(u);
double cv = cos(v);
double sv = sin(v);
double tm... | false | false | false | false | false | 0 |
addTestToSuites(test_element_t *e,ListNode_t * test_suites_list_headp) {
ListNode_t * listp = ListFind(test_suites_list_headp,isSuite, (char *)e->test.suite_name);
if (NULL == listp) {
test_suite_element_t *sp = create_test_suite_element( (char *)e->test.suite_name);
ListAddEnd(test_suites_list_headp, &sp->li... | false | false | false | false | false | 0 |
check_file_signature2(
const char* md5, const char* signature_text,
const char* key_text, bool& answer
) {
R_RSA_PUBLIC_KEY key;
unsigned char signature_buf[SIGNATURE_SIZE_BINARY];
int retval;
DATA_BLOCK signature;
retval = sscan_key_hex(key_text, (KEY*)&key, sizeof(key));
if (retval) {... | false | false | false | false | false | 0 |
ExtractReadGroup(const string& headerLine) const {
string readGroup("");
stringstream headerLineSs(headerLine);
string part;
// parse @RG header line, looking for the ID: tag
while( getline(headerLineSs, part, '\t') ) {
stringstream partSs(part);
string subtag;
getline(part... | false | false | false | false | false | 0 |
GProgressChangeLine2(const unichar_t *line2) {
if ( current==NULL )
return;
free( current->line2 );
current->line2 = u_copy(line2);
if ( current->line2!=NULL ) {
GDrawSetFont(current->gw,current->font);
current->l2width = GDrawGetBiTextWidth(current->gw,current->line2,-1,-1,NULL);
}
if ( curre... | false | false | false | false | false | 0 |
handle_select( FL_OBJECT * obj,
int event,
FL_Coord mx FL_UNUSED_ARG,
FL_Coord my FL_UNUSED_ARG,
int key,
void * ev FL_UNUSED_ARG )
{
FLI_SELECT_SPEC *sp = obj->spec;
FL_POPUP_RETURN *ret = NULL;
unsi... | 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.