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 |
|---|---|---|---|---|---|---|
png_inflate(png_structp png_ptr, const png_byte *data, png_size_t size,
png_bytep output, png_size_t output_size)
{
png_size_t count = 0;
png_ptr->zstream.next_in = (png_bytep)data; /* const_cast: VALID */
png_ptr->zstream.avail_in = size;
while (1)
{
int ret, avail;
/* Reset the o... | true | true | false | false | false | 1 |
add_delta_constraints(
__isl_take isl_basic_map *path,
__isl_keep isl_basic_set *delta, unsigned off, unsigned nparam,
unsigned d, int *div_purity, int eq, int *impurity)
{
int i, k;
int n = eq ? delta->n_eq : delta->n_ineq;
isl_int **delta_c = eq ? delta->eq : delta->ineq;
unsigned n_div;
n_div = isl_basic_se... | false | false | false | false | false | 0 |
translate_contour_hid_event(struct media_ctrl *ctrl, struct input_event *ev, struct media_ctrl_event *me)
{
int lv, cv;
me->type = 0;
if (ev->type == EV_REL) {
/* First check the outer dial */
if (ev->code == REL_WHEEL) {
cv = (signed int)ev->value;
if (cv == 1 || cv == -1 ) cv = 0;
... | false | false | false | false | false | 0 |
shutdown_executor(TSRMLS_D) /* {{{ */
{
zend_try {
/* Removed because this can not be safely done, e.g. in this situation:
Object 1 creates object 2
Object 3 holds reference to object 2.
Now when 1 and 2 are destroyed, 3 can still access 2 in its destructor, with
very problematic results */
/* zend_obje... | false | false | false | false | false | 0 |
DeletePropertyWithHandler(
String* name_raw, DeleteMode mode) {
Isolate* isolate = GetIsolate();
HandleScope scope(isolate);
Handle<Object> receiver(this);
Handle<Object> name(name_raw);
Handle<Object> handler(this->handler());
// Extract trap function.
Handle<String> trap_name = isolate->factory()->... | false | false | false | false | false | 0 |
reply_ptrlist(const int sock, const classcode_t classcode, const ULONG flags)
{
LONG pind;
unsigned nptrs;
slotno_t *rbuf, *rbufp;
struct api_msg outmsg;
outmsg.code = API_PTRLIST;
outmsg.retcode = 0;
PTRS_LOCK;
#ifdef USING_MMAP
if (Ptr_seg.inf.segsize != Job_seg.dptr->js_psegid)
#else
if (Ptr_seg.inf.bas... | false | false | false | true | true | 1 |
HandleSplitTimeEnd(MushcoreXML& inXML)
{
istringstream data(inXML.TopData());
const char *failMessage="Bad format for splittime. Should be <splittime>100,200,350</splittime>";
char comma;
do
{
tVal splitTime;
if (!(data >> splitTime)) inXML.Throw(failMessage);
m_splitTimes.p... | false | false | false | false | false | 0 |
FillRecordList(const std::string &dbname)
{
try {
// start fresh
m_record_list->DeleteAllItems();
// grab our DB
DBMap::DBCachePtr db = m_dbmap->LoadDBCache(dbname);
// cycle through the cache, and insert the descriptions
// given for each record
DBCache::const_iterator b = db->begin(), e = db->end();... | false | false | false | false | false | 0 |
be_filter_destruct(struct bufferevent *bev)
{
struct bufferevent_filtered *bevf = upcast(bev);
EVUTIL_ASSERT(bevf);
if (bevf->free_context)
bevf->free_context(bevf->context);
} | false | false | false | false | false | 0 |
set_hardware_clock(const time_t newtime,
const bool universal, const bool testing)
{
struct tm new_broken_time;
/*
* Time to which we will set Hardware Clock, in broken down format,
* in the time zone of caller's choice
*/
if (universal)
new_broken_time = *gmtime(&newtime);
else
new_broken_time = *l... | false | false | false | false | false | 0 |
addGeometryDirectly( OGRGeometry * poNewGeom )
{
papoGeoms = (OGRGeometry **) OGRRealloc( papoGeoms,
sizeof(void*) * (nGeomCount+1) );
papoGeoms[nGeomCount] = poNewGeom;
nGeomCount++;
if( poNewGeom->getCoordinateDimension() == 3 )
nCoordDimension ... | false | false | false | false | false | 0 |
SplitString(const char* p, char sep, bool isPath)
{
kwsys_stl::string path = p;
kwsys_stl::vector<kwsys::String> paths;
if(path.empty())
{
return paths;
}
if(isPath && path[0] == '/')
{
path.erase(path.begin());
paths.push_back("/");
}
kwsys_stl::string::size_type pos1 = 0;
kwsys... | false | false | false | false | false | 0 |
func_inv_compose_point(const CArrayDouble<6+3> &x, const double &dummy, CArrayDouble<3> &Y)
{
MRPT_UNUSED_PARAM(dummy);
CPose3D q(x[0],x[1],x[2],x[3],x[4],x[5]);
const CPoint3D p(x[6+0],x[6+1],x[6+2]);
const CPoint3D pp = p-q;
Y[0]=pp.x();
Y[1]=pp.y();
Y[2]=pp.z();
} | false | false | false | false | false | 0 |
qasm_scan_save( ){
include_stack[include_stack_ptr] = YY_CURRENT_BUFFER;
if( qasm_filename )
include_strings[include_stack_ptr] = strdup( qasm_filename );
else
include_strings[include_stack_ptr] = NULL;
include_lineno[include_stack_ptr] = qasmlineno;
include_stack_ptr ++;
} | false | false | false | false | false | 0 |
ttm_set_pages_caching(struct dma_pool *pool,
struct page **pages, unsigned cpages)
{
int r = 0;
/* Set page caching */
if (pool->type & IS_UC) {
r = set_pages_array_uc(pages, cpages);
if (r)
pr_err("%s: Failed to set %d pages to uc!\n",
pool->dev_name, cpages);
}
if (pool->type & IS_WC) {
r... | false | false | false | false | false | 0 |
forward_event (GstAdder * adder, GstEvent * event, gboolean flush)
{
gboolean ret;
GstIterator *it;
GstIteratorResult ires;
GValue vret = { 0 };
EventData data;
GST_LOG_OBJECT (adder, "Forwarding event %p (%s)", event,
GST_EVENT_TYPE_NAME (event));
data.event = event;
data.flush = flush;
g_va... | false | false | false | false | false | 0 |
pk_plugin_get_uid_min (void)
{
gboolean ret;
guint i;
gchar *data = NULL;
gchar **split = NULL;
GError *error = NULL;
guint uid_min = G_MAXUINT;
/* get contents */
ret = g_file_get_contents ("/etc/login.defs", &data, NULL, &error);
if (!ret) {
g_warning ("failed to get login UID_MIN: %s",
error->messa... | false | false | false | false | true | 1 |
e_selectable_cut_clipboard (ESelectable *selectable)
{
ESelectableInterface *interface;
g_return_if_fail (E_IS_SELECTABLE (selectable));
interface = E_SELECTABLE_GET_INTERFACE (selectable);
if (interface->cut_clipboard != NULL)
interface->cut_clipboard (selectable);
} | false | false | false | false | false | 0 |
elm_toolbar_item_state_del(Elm_Object_Item *it, Elm_Toolbar_Item_State *state)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
Eina_List *del_state;
Elm_Toolbar_Item_State *it_state;
Elm_Toolbar_Item *item;
if (!state) return EINA_FALSE;
item = (Elm_Toolbar_Item *)it;
if (!item->states) return E... | false | false | false | false | false | 0 |
success( QByteArray data )
{
QList<QVariant> retVals;
QString error;
bool parsed = XmlRpc::parse( data, retVals, error );
if ( !parsed )
{
LOGL( 1, error );
setFailed( WebRequestResult_Custom, "Couldn't parse response" );
return;
}
// There was previously no proper ... | false | false | false | false | false | 0 |
scaleMask(SplashImageMaskSource src, void *srcData,
int srcWidth, int srcHeight,
int scaledWidth, int scaledHeight) {
SplashBitmap *dest;
dest = new SplashBitmap(scaledWidth, scaledHeight, 1, splashModeMono8,
gFalse);
if (scaledHeight < srcHeight) {
if (scaledWidth < srcWidth) {
scaleMaskY... | false | false | false | false | false | 0 |
calc_timeout(struct taia *then, struct taia *now)
{
double d;
struct taia tmp;
if (taia_less (then, now))
return 0;
taia_sub (&tmp, then, now);
d = taia_approx (&tmp);
if (d > 1000.0)
d = 1000.0; /* hu? */
return d * 1000.0 + 20.0;
} | false | false | false | false | false | 0 |
isUpperCase(unsigned int c) /* IN - ISO character to test */
{
//static char upperCaseCharacters[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337";
int i;
for (i = 0; i < strlen(upperCaseChara... | false | false | false | false | false | 0 |
_dbus_transport_open_autolaunch (DBusAddressEntry *entry,
DBusTransport **transport_p,
DBusError *error)
{
const char *method;
method = dbus_address_entry_get_method (entry);
_dbus_assert (method != NULL);
if (strcmp (method, "aut... | false | false | false | false | false | 0 |
_dxf_EncodeImage(Field image)
{
Type t; Category c;
int r, s;
Object attr;
Object encodedimage = NULL;
Object o = DXGetComponentAttribute(image, IMAGE, X_SERVER);
translationP translation = NULL;
Array a = (Array)DXGetComponentValue(image, IMAGE);
if (! a)
{
DXSetError(ERROR_INTERNA... | false | false | false | false | false | 0 |
vmw_kms_cursor_bypass_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{
struct drm_vmw_cursor_bypass_arg *arg = data;
struct vmw_display_unit *du;
struct drm_crtc *crtc;
int ret = 0;
mutex_lock(&dev->mode_config.mutex);
if (arg->flags & DRM_VMW_CURSOR_BYPASS_ALL) {
list_for_each_ent... | false | false | false | false | false | 0 |
CMD_AddToMenu(F_CMD_ARGS)
{
MenuRoot *mr;
MenuRoot *mrPrior;
char *token, *rest,*item;
token = PeekToken(action, &rest);
if (!token)
{
return;
}
mr = menus_find_menu(token);
if (mr && MR_MAPPED_COPIES(mr) != 0)
{
fvwm_msg(ERR,"add_item_to_menu", "menu %s is in use", token);
return;
}
mr = FollowMenuC... | false | false | false | false | false | 0 |
cmos_aie_poweroff(struct device *dev)
{
struct cmos_rtc *cmos = dev_get_drvdata(dev);
struct rtc_time now;
time64_t t_now;
int retval = 0;
unsigned char rtc_control;
if (!cmos->alarm_expires)
return -EINVAL;
spin_lock_irq(&rtc_lock);
rtc_control = CMOS_READ(RTC_CONTROL);
spin_unlock_irq(&rtc_lock);
/* We... | false | false | false | false | false | 0 |
static_plane (gamgi_plane *plane, gamgi_window *window)
{
gamgi_dlist *dlist;
if (cache.new[STATIC_RED] == TRUE) plane->red = cache.red;
if (cache.new[STATIC_GREEN] == TRUE) plane->green = cache.green;
if (cache.new[STATIC_BLUE] == TRUE) plane->blue = cache.blue;
for (dlist = plane->text_start; dlist != NULL; dlist =... | false | false | false | false | false | 0 |
authorized_principal(context, p, auth_etype)
krb5_context context;
krb5_principal p;
krb5_enctype auth_etype;
{
char *name, *ptr;
char buf[1024];
krb5_error_code retval;
FILE *acl_file;
int end;
krb5_enctype acl_... | false | false | false | false | false | 0 |
rb_ary_and(VALUE ary1, VALUE ary2)
{
VALUE hash, ary3, v;
st_data_t vv;
long i;
ary2 = to_ary(ary2);
ary3 = rb_ary_new2(RARRAY_LEN(ary1) < RARRAY_LEN(ary2) ?
RARRAY_LEN(ary1) : RARRAY_LEN(ary2));
hash = ary_make_hash(ary2);
if (RHASH_EMPTY_P(hash))
return ary3;
for (i=0; ... | false | false | false | false | false | 0 |
bid_keycmp(const char *p, const char *key, ssize_t len)
{
int match_len = 0;
while (len > 0 && *p && *key) {
if (*p == *key) {
--len;
++p;
++key;
++match_len;
continue;
}
return (0);/* Not match */
}
if (*key != '\0')
return (0);/* Not match */
/* A following character should be specified ... | false | false | false | false | false | 0 |
FVMakeAllItalic(FontViewBase *fv,SplineChar *sc,int layer,ItalicInfo *ii) {
RefChar *ref;
sc->ticked = true;
for ( ref=sc->layers[layer].refs; ref!=NULL; ref=ref->next ) {
if ( !ref->sc->ticked && IsSelected(fv,ref->sc)) {
if ( !FVMakeAllItalic(fv,ref->sc,layer,ii))
return( false );
}
}
SCMa... | false | false | false | false | false | 0 |
gauss_rpsdf_guess(gint n_dat,
const gdouble *x,
const gdouble *y,
gdouble *param,
gboolean *fres)
{
gdouble sw, w, xx, l, k2, k4, b0, b2, d, alpha, beta;
gint i;
param[0] = 0.0;
param[1] = 1.0;
sw = k2 = k4 = b0 = b2 = 0.0;
... | false | false | false | false | false | 0 |
setAll (const void *pValue_)
{
if (_pOperations->refCount (_pElements) > 1)
{
_pOperations->deallocate (_pElements, _len);
_pElements = _pOperations->allocateWithSize (_pOperations->size (_pElements));
_pOperations->fill (_pElements, 0, _len, pValue_, MSRaw);
}
else // if (refCount == 1) -... | false | false | false | false | false | 0 |
is_sqp(struct mlx4_ib_dev *dev, struct mlx4_ib_qp *qp)
{
int proxy_sqp = 0;
int real_sqp = 0;
int i;
/* PPF or Native -- real SQP */
real_sqp = ((mlx4_is_master(dev->dev) || !mlx4_is_mfunc(dev->dev)) &&
qp->mqp.qpn >= dev->dev->phys_caps.base_sqpn &&
qp->mqp.qpn <= dev->dev->phys_caps.base_sqpn + 3);
... | false | false | false | false | false | 0 |
accept_sec_context(struct client *client,
int32_t *hContext,
int32_t flags,
const krb5_data *itoken,
krb5_data *otoken,
int32_t *hDelegCred)
{
int32_t val;
krb5_data_zero(otoken);
put32(client, eAcceptContext);
put32(client, *hContext);
put32(client, flags);
putdata(clie... | false | false | false | false | false | 0 |
sigchain_pop(int sig)
{
struct sigchain_signal *s = signals + sig;
check_signum(sig);
if (s->n < 1)
return 0;
if (signal(sig, s->old[s->n - 1]) == SIG_ERR)
return -1;
s->n--;
return 0;
} | false | false | false | false | false | 0 |
totem_fullscreen_exit_popup_draw_cb (GtkWidget *widget,
cairo_t *cr,
TotemFullscreen *fs)
{
GdkScreen *screen;
screen = gtk_widget_get_screen (widget);
if (gdk_screen_is_composited (screen) == FALSE)
return FALSE;
gtk_widget_set_app_paintable (widget, TRUE);
cairo_set_source_rgba (cr, 1., 1.... | false | false | false | false | false | 0 |
set_tree_store_model_data(GtkTreeStore *tree, GtkTreeIter *iter, Sensor *s)
{
if (!s)
return;
gtk_tree_store_set(tree, iter,
NAME_COLUMN, s->id_name ? s->id_name : "??",
ENABLE_COLUMN, s->enabled,
LABEL_COLUMN, s->name ? s->name : "??",
SENSOR_COLUMN, s,
VISIBLE_COLUMN, TRUE,
-1);
if (s->alert)
... | false | false | false | false | false | 0 |
FindAffectedRegisters(OutSet* affected_registers) {
int max_register = RegExpCompiler::kNoRegister;
for (DeferredAction* action = actions_;
action != NULL;
action = action->next()) {
if (action->type() == ActionNode::CLEAR_CAPTURES) {
Interval range = static_cast<DeferredClearCaptures*>(acti... | false | false | false | false | false | 0 |
big_file_check(const char *what, DBM *db, const void *bvec, int bcnt)
{
size_t prev_bno = 0; /* 0 is invalid: it's the first bitmap */
const void *q;
int n;
if (!big_check_start(db))
return TRUE; /* Cannot validate, assume it's OK */
for (q = bvec, n = bcnt; n > 0; n--) {
size_t bno = peek_be32(q);
bit_... | false | false | false | false | false | 0 |
ExecCheckRTEPerms(RangeTblEntry *rte)
{
AclMode requiredPerms;
Oid relOid;
Oid userid;
/*
* Only plain-relation RTEs need to be checked here. Function RTEs are
* checked by init_fcache when the function is prepared for execution.
* Join, subquery, and special RTEs need no checks.
*/
if (rte->rtekind... | false | false | false | false | false | 0 |
wait_robot_exit(GPid pid, int)
{
if (child_pid != -1) {
ptm_conn.disconnect();
waitpid(child_pid, NULL, 0);
child_pid = -1;
is_running = false;
on_robot_exit();
printf(" i have exit ======\n");
}
} | false | false | false | false | false | 0 |
acct_mgmt(char *service, char *user)
{
struct pam_conv conv = {misc_conv, NULL};
int retval;
pam_handle_t *pamh = NULL;
retval = pam_start(service, user, &conv, &pamh);
if (retval == PAM_SUCCESS)
retval = pam_set_item(pamh, PAM_RUSER, user);
#ifdef PAM_FAIL_DELAY
if (retval == PAM_SUCCESS)
retval = ... | false | false | false | false | false | 0 |
__pyx_f_7sklearn_8ensemble_18_gradient_boosting_array_index(__pyx_t_7sklearn_8ensemble_18_gradient_boosting_int32 __pyx_v_val, __Pyx_memviewslice __pyx_v_arr) {
__pyx_t_7sklearn_8ensemble_18_gradient_boosting_int32 __pyx_v_res;
__pyx_t_7sklearn_8ensemble_18_gradient_boosting_int32 __pyx_v_i;
__pyx_t_7sklearn_8ens... | false | false | false | false | false | 0 |
appendPQExpBufferVA(PQExpBuffer str, const char *fmt, va_list args)
{
size_t avail;
size_t needed;
int nprinted;
/*
* Try to format the given string into the available space; but if there's
* hardly any space, don't bother trying, just enlarge the buffer first.
*/
if (str->maxlen > str->len + 16)
{
/... | false | false | false | false | false | 0 |
ldapqry_perform_locate( LdapQuery *qry ) {
/* Connect */
qry->ldap = NULL;
ldapqry_connect( qry );
if( ADDRQUERY_RETVAL(qry) == LDAPRC_SUCCESS ) {
/* Perform search */
ldapqry_locate_retrieve( qry );
}
/* Disconnect */
ldapqry_disconnect( qry );
qry->ldap = NULL;
/* Process callback */
if( qry->callBack... | false | false | false | false | false | 0 |
settings_kv_set(kv_t *kv, char *value, array_t *contents)
{
if (value && kv->value && streq(value, kv->value))
{ /* no update required */
free(value);
return;
}
/* if the new value was shorter we could overwrite the existing one but that
* could lead to reads of partially updated values from other threads th... | false | false | false | false | false | 0 |
cam_keypoints_tracking2_print_matches(CamImage *img1, CamImage *img2, char *outfile, CamKeypointsMatches *matches, int nb)
{
CamImage res;
CamROI roi;
char filename[256];
register int i;
int x1;
int x2;
int y1;
int y2;
camAllocateRGBImage(&res, img1->width, img1->height * 2);
camSetROI(&roi,... | false | false | false | false | false | 0 |
alternate_replace_string(char *string) {
unsigned int i;
log_event(CPDEBUG, "removing alternate special characters from title", string);
for (i=0;i<(unsigned int)strlen(string);i++)
if ( isascii(string[i]) && /* leaving non-ascii characters intact */
(!isalnum(string[i])) &&
string[i] !... | false | false | false | false | false | 0 |
handleRecord(const int groupcode,
const dimeParam ¶m,
dimeMemHandler * const memhandler)
{
switch (groupcode) {
case 66:
this->attributesFollow = param.int16_data;
return true;
case 2:
{
// will only arrive here during read(). Allocate a temporary buffer
// to store the blockna... | false | false | false | false | false | 0 |
print_cell(int idx, struct cell *c)
{
if (!c) {
printf("idx =%d(null cell):\n", idx);
return ;
}
printf("idx=%d:", idx);
switch (c->type) {
case TT_SUPER:
print_super_cell(c);
break;
case TT_ALLOCED:
print_alloced_cell();
break;
case TT_NODE:
print_node_cell(c);
break;
ca... | false | false | false | false | false | 0 |
ixgbe_napi_disable_all(struct ixgbe_adapter *adapter)
{
int q_idx;
for (q_idx = 0; q_idx < adapter->num_q_vectors; q_idx++) {
napi_disable(&adapter->q_vector[q_idx]->napi);
while (!ixgbe_qv_disable(adapter->q_vector[q_idx])) {
pr_info("QV %d locked\n", q_idx);
usleep_range(1000, 20000);
}
}
} | false | false | false | false | false | 0 |
open_browser_window (GFile *location,
GFile *file_to_select,
gboolean force_new_window)
{
gboolean reuse_active_window;
GtkWidget *window;
if (! force_new_window) {
GSettings *settings;
settings = g_settings_new (GTHUMB_BROWSER_SCHEMA);
reuse_active_window = g_settings_get_boolean (set... | false | false | false | false | false | 0 |
_GPSDraw_ImageMagnified(GWindow w, GImage *image, GRect *dest, int32 x, int32 y, int32 width, int32 height) {
GPSWindow ps = (GPSWindow) w;
struct _GImage *base = image->list_len==0?image->u.image:image->u.images[0];
GRect src,temp;
src.width = (dest->width/(double) width)*base->width;
src.height =... | false | false | false | false | false | 0 |
vlv_initial_power_sequencer_setup(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_device *dev = intel_dig_port->base.base.dev;
struct drm_i915_private *dev_priv = dev->dev_private;
enum port port = intel_dig_port->port;
lockdep_assert_held(&dev_priv->p... | false | false | false | false | false | 0 |
_g_mime_type_get_from_extension (const char *ext)
{
int i;
if (ext == NULL)
return NULL;
for (i = G_N_ELEMENTS (file_ext_type) - 1; i >= 0; i--) {
if (file_ext_type[i].ext == NULL)
continue;
if (strcasecmp (ext, file_ext_type[i].ext) == 0)
return _g_str_get_static (file_ext_type[i].mime_type);
}
ret... | false | false | false | false | false | 0 |
tms36xx_sh_stop(void)
{
int i;
for( i = 0; i < intf->num; i++ )
{
if( tms36xx[i] )
{
if (tms36xx[i]->subtype)
free(tms36xx[i]->subtype);
free(tms36xx[i]);
}
tms36xx[i] = NULL;
}
} | false | false | false | false | false | 0 |
notebook_tab_click(GtkWidget *widget, GdkEventButton *event, gpointer data)
{
guint state;
/* toggle additional widgets on double click */
if (event->type == GDK_2BUTTON_PRESS)
{
if (interface_prefs.notebook_double_click_hides_widgets)
on_menu_toggle_all_additional_widgets1_activate(NULL, NULL);
return TRU... | false | false | false | false | false | 0 |
ab_ck_aassign(pTHX_ OP *o) {
o = (*ab_old_ck_aassign)(aTHX_ o);
if (o->op_type == OP_AASSIGN && FEATURE_ARYBASE_IS_ENABLED) {
OP *right = cBINOPx(o)->op_first;
OP *left = cBINOPx(right->op_sibling)->op_first->op_sibling;
right = cBINOPx(right)->op_first->op_sibling;
ab_process_assignment(left, right);
}
ret... | false | false | false | false | false | 0 |
vmw_fence_obj_lookup(struct ttm_object_file *tfile, u32 handle)
{
struct ttm_base_object *base = ttm_base_object_lookup(tfile, handle);
if (!base) {
pr_err("Invalid fence object handle 0x%08lx.\n",
(unsigned long)handle);
return ERR_PTR(-EINVAL);
}
if (base->refcount_release != vmw_user_fence_base_re... | false | false | false | false | false | 0 |
GetColumnDefCollation(ParseState *pstate, ColumnDef *coldef, Oid typeOid)
{
Oid result;
Oid typcollation = get_typcollation(typeOid);
int location = -1;
if (coldef->collClause)
{
/* We have a raw COLLATE clause, so look up the collation */
location = coldef->collClause->location;
result = LookupCollat... | false | false | false | false | false | 0 |
spl_ptr_heap_destroy(spl_ptr_heap *heap TSRMLS_DC) { /* {{{ */
int i;
for (i=0; i < heap->count; ++i) {
heap->dtor(heap->elements[i] TSRMLS_CC);
}
efree(heap->elements);
efree(heap);
} | false | false | false | false | false | 0 |
rtl_merge_blocks (basic_block a, basic_block b)
{
rtx b_head = BB_HEAD (b), b_end = BB_END (b), a_end = BB_END (a);
rtx del_first = NULL_RTX, del_last = NULL_RTX;
rtx b_debug_start = b_end, b_debug_end = b_end;
bool forwarder_p = (b->flags & BB_FORWARDER_BLOCK) != 0;
int b_empty = 0;
if (dump_file)
fpr... | false | false | false | false | false | 0 |
splitScalar64BitUnaryOp(
SmallVectorImpl<MachineInstr *> &Worklist,
MachineInstr *Inst,
unsigned Opcode) const {
MachineBasicBlock &MBB = *Inst->getParent();
MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo();
MachineOperand &Dest = Inst->getOperand(0);
MachineOperand &Src0 = Inst->getOperand(1);
... | false | false | false | false | false | 0 |
smp_fetch_sc_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
{
struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
if (!stkctr)
return 0;
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
smp-... | false | false | false | false | false | 0 |
octstr_imm(const char *cstr)
{
Octstr *os;
long i, index;
unsigned char *data;
gw_assert(immutables_init);
gw_assert(cstr != NULL);
index = CSTR_TO_LONG(cstr) % MAX_IMMUTABLES;
data = (unsigned char *) cstr;
mutex_lock(&immutables_mutex);
i = index;
for (; ; ) {
if (immutable... | false | false | false | false | false | 0 |
flock_translate_cmd(int cmd) {
if (cmd & LOCK_MAND)
return cmd & (LOCK_MAND | LOCK_RW);
switch (cmd) {
case LOCK_SH:
return F_RDLCK;
case LOCK_EX:
return F_WRLCK;
case LOCK_UN:
return F_UNLCK;
}
return -EINVAL;
} | false | false | false | false | false | 0 |
renderFrame (struct state *st)
{
int n;
memcpy (st->workImage->data, st->backgroundImage->data,
st->workImage->bytes_per_line * st->workImage->height);
sortTiles (st);
for (n = 0; n < st->tileCount; n++)
{
renderTile (st, st->sortedTiles[n]);
}
#ifdef HAVE_XSHM_EXTENSION
if (st->u... | false | true | false | false | false | 1 |
is_res_read(struct tm6000_core *dev, struct tm6000_fh *fh)
{
/* Is the current fh handling it? if so, that's OK */
if (dev->resources == fh && dev->is_res_read)
return true;
return false;
} | false | false | false | false | false | 0 |
cmd_set_color_curve(SANE_Handle handle, unsigned char col)
{
/* sends the color curve data for one color*/
KodakAio_Scanner *s = (KodakAio_Scanner *) handle;
SANE_Status status = SANE_STATUS_GOOD;
unsigned char tx_col[8];
unsigned char rx[8];
unsigned char tx_curve[256];
unsigned char i;
DBG(32, "%s: start\n", _... | true | true | false | false | false | 1 |
move_window (
FATFS *fs, /* File system object */
DWORD sector /* Sector number to make appearance in the fs->win[] */
) /* Move to zero only writes back dirty window */
{
DWORD wsect;
wsect = fs->winsect;
if (wsect != sector) { /* Changed current window */
#if !_FS_READONLY
if (fs->wflag) { /*... | false | false | false | false | false | 0 |
handleClick(const XButtonEvent &up, int count) {
if (up.button == 1 && (count % 2) == 0) {
int no = findItemByPoint(up.x, up.y);
if (no != -1) {
YListItem *i = getItem(no);
activateItem(i);
}
}
} | false | false | false | false | false | 0 |
parse_protocol_version (gchar * protocol, GstRTSPMsgType * type,
GstRTSPVersion * version)
{
GstRTSPResult res = GST_RTSP_OK;
gchar *ver;
if (G_LIKELY ((ver = strchr (protocol, '/')) != NULL)) {
guint major;
guint minor;
gchar dummychar;
*ver++ = '\0';
/* the version number must be form... | false | false | false | false | false | 0 |
vml_bzptarray(GVJ_t * job, pointf * A, int n)
{
int i;
char *c;
c = "m "; /* first point */
for (i = 0; i < n; i++) {
/* integers only in path! */
gvprintf(job, "%s%.0f,%.0f ", c, A[i].x, graphHeight-A[i].y);
if (i == 0)
c = "c "; /* second point */
else
c = ""; /* remaining po... | false | false | false | false | false | 0 |
ui_dialogdraw(struct uih_context *c, void *data)
{
int n;
for (n = 0; n < dialog.nitems; n++)
dialog.items[n].type->draw(dialog.items + n);
} | false | false | false | false | false | 0 |
ve_config_delete_section (VeConfig *config,
const char *section)
{
VeSection *sec;
g_return_if_fail (config != NULL);
g_return_if_fail (section != NULL);
if (section == NULL) {
config->dirty = TRUE;
destroy_section (config->root);
config->root = new_section (config, NULL);
return;
}
sec = find_se... | false | false | false | false | false | 0 |
PrintDataTo(
StringStream* stream) {
external_pointer()->PrintNameTo(stream);
stream->Add(".");
switch (elements_kind()) {
case EXTERNAL_BYTE_ELEMENTS:
stream->Add("byte");
break;
case EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
stream->Add("u_byte");
break;
case EXTERNAL_SHORT_ELEMEN... | false | false | false | false | false | 0 |
isLastInShower(const Particle & p) {
return p.children().size() > 1
&& p.children()[0]->id() != p.id()
&& p.children()[1]->id() != p.id();
} | false | false | false | false | false | 0 |
calledAETitleAccepted(const OFString & /* callingAE */,
const OFString &calledAE)
{
if (m_respondWithCalledAETitle) // default is to use the called AE title
{
return OFTrue;
}
if (calledAE != m_aetitle)
return OFFalse;
else
return OFTrue;
} | false | false | false | false | false | 0 |
set_Wunused (int setting)
{
warn_unused_function = setting;
warn_unused_label = setting;
/* Unused function parameter warnings are reported when either
``-Wextra -Wunused'' or ``-Wunused-parameter'' is specified.
Thus, if -Wextra has already been seen, set warn_unused_parameter;
otherwise set maybe... | false | false | false | false | false | 0 |
set(const void* value)
{
const char* str = (const char*)value;
if(strcmp(str, m_value.c_str()) == 0)
return false;
m_value = str;
return true;
} | false | false | false | false | false | 0 |
binary_upgrade_extension_member(PQExpBuffer upgrade_buffer,
DumpableObject *dobj,
const char *objlabel)
{
DumpableObject *extobj = NULL;
int i;
if (!dobj->ext_member)
return;
/*
* Find the parent extension. We could avoid this search if we wanted to
* add a link field to DumpableObject, b... | false | false | false | false | false | 0 |
gst_video_overlay_expose (GstVideoOverlay * overlay)
{
GstVideoOverlayInterface *iface;
g_return_if_fail (overlay != NULL);
g_return_if_fail (GST_IS_VIDEO_OVERLAY (overlay));
iface = GST_VIDEO_OVERLAY_GET_INTERFACE (overlay);
if (iface->expose) {
iface->expose (overlay);
}
} | false | false | false | false | false | 0 |
db_anjuta_symbol_get_member (IJsSymbol *obj, const gchar * name)
{
DbAnjutaSymbol *self = DB_ANJUTA_SYMBOL (obj);
DbAnjutaSymbolPrivate *priv = DB_ANJUTA_SYMBOL_PRIVATE (self);
g_assert (priv->obj != NULL);
if (priv->self)
{
DEBUG_PRINT ("TODO:%s %d", __FILE__, __LINE__);
}
else
{
g_assert (priv->file != ... | false | false | false | false | false | 0 |
force_read(int cfd, char *p, size_t l)
{
int m;
while (l)
{
m=read(cfd, p, l);
if (m <= 0)
{
fprintf(stderr,
"WARN: socket closed while reading"
" environment.\n");
exit(0);
}
p += m;
l -= m;
}
} | false | false | false | false | false | 0 |
mhAddServerCertFileArray(mhServCtx_t *ctx, const char **certFiles)
{
apr_pool_t *pool = ctx->pool;
mhServerSetupBldr_t *ssb = createServerSetupBldr(pool);
apr_array_header_t *certFileAry;
const char *certFile;
int i = 0;
certFileAry = apr_array_make(ctx->pool, 5, sizeof(const char *));
do ... | false | false | false | false | false | 0 |
trace_exit()
{
GSList *list=trace_buffer;
while (list) {
g_free(list->data);
list=list->next;
}
g_slist_free(trace_buffer);
} | false | false | false | false | false | 0 |
Define ( XMP_StringPtr _uri, XMP_StringPtr _suggPrefix,
XMP_StringPtr * prefixPtr, XMP_StringLen * prefixLen )
{
XMP_AutoLock tableLock ( &this->lock, kXMP_WriteLock );
bool prefixMatches = false;
XMP_Assert ( (_uri != 0) && (*_uri != 0) && (_suggPrefix != 0) && (*_suggPrefix != 0) );
XMP_VarString ur... | false | false | false | false | false | 0 |
obj_context_close(TSS_HCONTEXT tspContext)
{
struct tsp_object *obj;
struct tr_context_obj *context;
if ((obj = obj_list_get_obj(&context_list, tspContext)) == NULL)
return;
context = (struct tr_context_obj *)obj->data;
#ifdef TSS_BUILD_TRANSPORT
if (context->transAuth.AuthHandle) {
RPC_FlushSpecific(tspCon... | false | false | false | false | false | 0 |
get_vm_block(struct ct_vm *vm, unsigned int size, struct ct_atc *atc)
{
struct ct_vm_block *block = NULL, *entry;
struct list_head *pos;
size = CT_PAGE_ALIGN(size);
if (size > vm->size) {
dev_err(atc->card->dev,
"Fail! No sufficient device virtual memory space available!\n");
return NULL;
}
mutex_lock(&v... | false | false | false | false | false | 0 |
UpdateScreen() {
UpdateRect( PG_Rect(0, 0, PG_Application::GetScreenWidth(), PG_Application::GetScreenHeight()) );
PG_Application::UpdateRect( PG_Application::GetScreen(), 0, 0, 0, 0 );
} | false | false | false | false | false | 0 |
TclWeb_GetEnvVars(Tcl_Obj *envvar, TclWebRequest *req)
{
int i;
apr_array_header_t *env_arr;
apr_table_entry_t *env;
Tcl_Obj *key;
Tcl_Obj *val;
TclWeb_InitEnvVars( req );
Tcl_IncrRefCount(envvar);
/* Transfer Apache internal CGI variables to TCL request namespace. */
env_arr = (... | false | false | false | false | false | 0 |
aac_sri(double r)
{
int sri;
int samplerate= (int)(r+0.5);
const int sample_rates[16] = {
96000, 88200, 64000, 48000, 44100, 32000,
24000, 22050, 16000, 12000, 11025, 8000, 7350
};
for (sri=0; sri < sizeof(sample_rates)/sizeof(sample_rates[0]); sri++)
{
if(sample_rates[sri] == samplerate)... | false | false | false | false | false | 0 |
isKeepAlive() const
{
const char * proxy = getHeaderValue( HEADER_PROXY_CONNECTION );
const char * local = getHeaderValue( HEADER_CONNECTION );
if( ( NULL != proxy && 0 == strcasecmp( proxy, "Keep-Alive" ) )
|| ( NULL != local && 0 == strcasecmp( local, "Keep-Alive" ) ) ) {
return 1;
}
return 0;
} | false | false | false | false | false | 0 |
file_getenv(const char *envName)
{
char *envString;
long envValue = -1;
long fact = 1;
envString = getenv(envName);
if ( envString )
{
int loop;
for ( loop = 0; loop < (int) strlen(envString); loop++ )
{
if ( ! isdigit((int) envString[loop]) )
{
switch ( tolower((int) envStr... | false | false | false | false | false | 0 |
handleClick(const XButtonEvent &up, int count) {
if (up.button == 1) {
if (cpuCommand && cpuCommand[0] &&
(taskBarLaunchOnSingleClick ? count == 1 : !(count % 2)))
wmapp->runCommandOnce(cpuClassHint, cpuCommand);
}
} | false | false | false | false | false | 0 |
strarr_free(strarr arr)
{
char** pstr = arr;
while(*pstr!=NULL)
{
free(*pstr);
++pstr;
}
free(arr);
} | false | false | false | false | false | 0 |
e_util_edje_collection_exists(const char *file, const char *coll)
{
Eina_List *clist, *l;
char *str;
clist = edje_file_collection_list(file);
EINA_LIST_FOREACH(clist, l, str)
{
if (!strcmp(coll, str))
{
edje_file_collection_list_free(clist);
return 1;
... | 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.