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 |
|---|---|---|---|---|---|---|
__lambda73_ (BoxesProperties* self) {
BoxesLibvirtMachine* machine = NULL;
BoxesApp* _tmp0_ = NULL;
BoxesCollectionItem* _tmp1_ = NULL;
BoxesLibvirtMachine* _tmp2_ = NULL;
BoxesLibvirtMachine* _tmp3_ = NULL;
#line 295 "/extra-data/checkout/gnome/gnome-boxes/src/properties.vala"
_tmp0_ = boxes_app_app;
#line 295 "... | false | false | false | false | false | 0 |
run_shuffling_tool (data_shuffling_t *st)
{
GSList *cur;
GnmCell *cell;
int i, j;
if (st->type == SHUFFLE_COLS) {
/* Find empty space. */
for (i = gnm_sheet_get_last_col (st->sheet); i >= 0; i--)
for (j = gnm_sheet_get_last_row (st->sheet); j >= 0; j--) {
cell = sheet_cell_get (st->sheet, i, j);
... | false | false | false | false | false | 0 |
dns_sock_timer_cancel(int timer_id)
{
int i;
dns_sock_t *sock;
for (i = 0; i < NELEMS(SockPool); i++) {
sock = &SockPool[i];
if (sock->sock_timer.st_id == timer_id) {
plog(LOG_DEBUG, "%s: timer cancelled: sock = %p", MODULE, sock);
sock->sock_timer.st_timeout = 0;
... | false | false | false | false | false | 0 |
known_msg(num, id)
int num, id;
{
int i;
for(i = 0; i < msg_hdr[num].n_msg; i++)
if(msg_hdr[num].qt_msg[i].msgnum == id) return(TRUE);
return(FALSE);
} | false | false | false | false | false | 0 |
mc_setup_block_mode (Magicolor_Scanner *s)
{
/* block_len should always be a multiple of bytes_per_line, so
* we retrieve only whole lines at once */
s->block_len = (int)(0xff00/s->scan_bytes_per_line) * s->scan_bytes_per_line;
s->blocks = s->data_len / s->block_len;
s->last_len = s->data_len - (s->blocks * s->bl... | false | false | false | false | false | 0 |
print_equation_system_info (const equation_system *sys,
const DATASET *dset,
gretlopt opt, PRN *prn)
{
int header = (opt & OPT_H);
int i, vi, lag;
if (header && sys->name != NULL && !sys_anonymous(sys->name)) {
pprintf(prn, "%s %s\n", _("Equation system"), sys->name);
}
if (!h... | false | false | false | false | false | 0 |
httpHeaderNoteParsedEntry(http_hdr_type id, String context, int error)
{
Headers[id].stat.parsCount++;
if (error) {
Headers[id].stat.errCount++;
debug(55, 2) ("cannot parse hdr field: '%s: %s'\n",
strBuf(Headers[id].name), strBuf(context));
}
} | false | false | false | false | false | 0 |
OrderFor(char *ident, int order)
{
if (! ordermap) {
ordermapmax = (nidents > TWENTY ? nidents : TWENTY) * 2;
/* Assume nidents read is indication of the No of
idents in the .aux file (*2 for good luck !) */
ordermap = xmalloc(ordermapmax * sizeof(struct order));
}
if (ordermapindex < ord... | false | false | false | false | false | 0 |
geda_settings_get_entries(GtkWidget *dialog, GedaSettings *geda)
{
geda->include_dir=update_str(geda->include_dir,
get_gtk_entry(dialog, "include_directory_entry"));
geda->gnetlist_command_line=update_str(geda->gnetlist_command_line,
get_gtk_entry(dialog, "gnetlist_command_line_entry"));
ged... | false | false | false | false | false | 0 |
r ( // r (theta)
size_t dimension_, // #(distinct values)
const Int4 *score_, // scores in increasing order
const double *prob_, // probability of corresponding value
double theta_) // argument of rate
// assumes logarithmic regime
{
double sum = 0.0;
for (size_t i = 0; i < dimension_; i++) {
sum... | false | false | false | false | false | 0 |
gm_worlds_view_finalize(GObject *object) {
GmWorldsView *obj = GM_WORLDS_VIEW(object);
GtkTreeModel *model = obj->priv->model;
GmWorld *list_world;
GtkTreeIter iter;
if (gtk_tree_model_get_iter_first(model, &iter)) {
do {
gtk_tree_model_get(model, &iter, GM_WORLDS_VIEW_WORLD_COLUMN,
&list_world, -1);
... | false | false | false | false | false | 0 |
efreet_default_dirs_get(const char *user_dir, Eina_List *system_dirs,
const char *suffix)
{
const char *xdg_dir;
char dir[PATH_MAX];
Eina_List *list = NULL;
Eina_List *l;
EINA_SAFETY_ON_NULL_RETURN_VAL(user_dir, NULL);
EINA_SAFETY_ON_NULL_RETU... | false | false | false | false | false | 0 |
set_pkt_end_ptr (packetinfo *pi)
{
/* Paranoia! */
if (pi->pheader->len <= SNAPLENGTH) {
pi->end_ptr = (pi->packet + pi->pheader->len);
} else {
pi->end_ptr = (pi->packet + SNAPLENGTH);
}
return;
} | false | false | false | false | false | 0 |
write_word_data()
{
FILE *chewing_file;
FILE *char_file;
#ifdef USE_BINARY_DATA
FILE *index_begin_file;
FILE *index_phone_file;
unsigned char size;
#else
FILE *index_file;
#endif
int i;
uint16_t previous_phone;
int phone_num;
int pos;
chewing_file = fopen(CHEWING_DEFINITION_FILE, "w");
#ifdef USE_BINARY_DA... | false | false | false | false | true | 1 |
drm_agp_acquire(struct drm_device * dev)
{
if (!dev->agp)
return -ENODEV;
if (dev->agp->acquired)
return -EBUSY;
if (!(dev->agp->bridge = agp_backend_acquire(dev->pdev)))
return -ENODEV;
dev->agp->acquired = 1;
return 0;
} | false | false | false | false | false | 0 |
open_policy_on_entry_event_after(GtkWidget * widget __attribute__ ((unused)), GdkEvent * event
__attribute__ ((unused)), gpointer user_data)
{
struct open_policy *op = (struct open_policy *)user_data;
gboolean sens = FALSE;
if (strcmp(gtk_entry_get_text(op->base_entry), "") != 0) {
sens = TRUE;
}
gtk_w... | false | false | false | false | false | 0 |
onscroll(GtkWidget *widget, GdkEventScroll *event, void *data)
{
if (event->direction == GDK_SCROLL_UP)
gli_input_handle_key(keycode_MouseWheelUp);
else if (event->direction == GDK_SCROLL_DOWN)
gli_input_handle_key(keycode_MouseWheelDown);
} | false | false | false | false | false | 0 |
G_Assign_Array(GVarElt *g_elem, WamWord *stc_adr, int array_op,
Bool backtrack, Bool copy)
{
WamWord word, tag_mask;
int arity;
Bool same_init_value;
WamWord init_word;
WamWord lst_word;
int new_size, size;
GVarElt *p;
int i;
arity = Arity(stc_adr);
DEREF(Arg(stc_adr, 0), word, tag_mask);... | false | false | false | false | false | 0 |
in(Socket * sock, Socket * peersock, HTTPHeader * requestheader, HTTPHeader * docheader, bool runav, int *headersent)
{
//Socket *sock = where to read from
//Socket *peersock = browser to send stuff to for keeping it alive
//HTTPHeader *requestheader = header client used to request
//HTTPHeader *docheader = header ... | false | false | false | false | false | 0 |
rt2x00queue_create_tx_descriptor_plcp(struct rt2x00_dev *rt2x00dev,
struct sk_buff *skb,
struct txentry_desc *txdesc,
const struct rt2x00_rate *hwrate)
{
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
struct ieee80211_tx_rate *txrate = &tx_info->control.rates[0];
unsigned int data... | false | false | false | true | false | 1 |
Pull(vtkInformation *info)
{
vtkExecutiveSet eSet;
CollectUpstreamModules(this, eSet);
vtkExecutiveCollection *execs = vtkExecutiveCollection::New();
for (vtkExecutiveSet::iterator ti = eSet.begin(); ti != eSet.end(); ti++)
{
execs->AddItem(*ti);
}
vtkExecutionScheduler::GetGlobalScheduler()->Sch... | false | false | false | false | false | 0 |
get_color_array (glColorHistoryModel *this,
guint *n_elements)
{
GVariant *value;
GVariant *child_value;
gsize i;
guint *array;
value = g_settings_get_value (this->priv->history, "recent-colors");
*n_elements = g_variant_n_children (... | false | false | false | false | false | 0 |
GWEN_XMLNode_GetCharValueByPath(GWEN_XMLNODE *n,
const char *name,
const char *defValue){
GWEN_XMLNODE *nn;
nn=GWEN_XMLNode_GetNodeByXPath(n, name, 0);
if (nn) {
GWEN_XMLNODE *dn;
dn=GWEN_XMLNode_GetFirstData(nn);
... | false | false | false | false | false | 0 |
build_ack(private_mode_config_t *this, message_t *message)
{
cp_payload_t *cp;
enumerator_t *enumerator;
host_t *host;
configuration_attribute_type_t type;
entry_t *entry;
cp = cp_payload_create_type(PLV1_CONFIGURATION, CFG_ACK);
/* return empty attributes for installed IPs */
enumerator = this->vips->create... | false | false | false | false | false | 0 |
pd6729_get_status(struct pcmcia_socket *sock, u_int *value)
{
struct pd6729_socket *socket
= container_of(sock, struct pd6729_socket, socket);
unsigned int status;
unsigned int data;
struct pd6729_socket *t;
/* Interface Status Register */
status = indirect_read(socket, I365_STATUS);
*value = 0;
if ((statu... | false | false | false | false | false | 0 |
howNear(const Hep2Vector & p ) const {
double d = (*this - p).mag2();
double pdp = dot(p);
if ( (pdp > 0) && (d < pdp) ) {
return std::sqrt (d/pdp);
} else if ( (pdp == 0) && (d == 0) ) {
return 0;
} else {
return 1;
}
} | false | false | false | false | false | 0 |
GetRemoteDebuggingMap(cbProject* project)
{
if (!project)
project = m_pProject;
ProjectRemoteDebuggingMap::iterator it = m_RemoteDebugging.find(project);
if (it == m_RemoteDebugging.end()) // create an empty set for this project
it = m_RemoteDebugging.insert(m_RemoteDebugging.begin(), std::... | false | false | false | false | false | 0 |
ves_icall_System_Reflection_Module_InternalGetTypes (MonoReflectionModule *module)
{
MonoArray *exceptions;
int i;
if (!module->image)
return mono_array_new (mono_object_domain (module), mono_defaults.monotype_class, 0);
else {
MonoArray *res = mono_module_get_types (mono_object_domain (module), module->image,... | false | false | false | false | false | 0 |
sshcom_encrypted(const Filename *filename, char **comment)
{
struct sshcom_key *key = load_sshcom_key(filename, NULL);
int pos, len, answer;
*comment = NULL;
if (!key)
return 0;
/*
* Check magic number.
*/
if (GET_32BIT(key->keyblob) != 0x3f6ff9eb)
return 0; ... | false | false | false | false | false | 0 |
DtsFWFifoStatus(
HANDLE hDevice,
uint32_t *CpbSize,
uint32_t *CpbFullness
)
{
BC_STATUS sts = BC_STS_SUCCESS;
DecCmdChannelStatus *pCmd=NULL;
DecRspChannelStatus *pRsp = NULL;
DTS_LIB_CONTEXT *Ctx = NULL;
BC_IOCTL_DATA *pIocData = NULL;
DTS_GET_CTX(hDevice,Ctx);
if(Ctx->State == BC_DEC_STATE_CLOSE... | false | false | false | false | false | 0 |
cmd_name(int idx, char **cp) {
static char *kp;
static char fail[]="Keyword not found";
if (kp==NULL) kp = (char*) myallocz(80);
for (unsigned int i=0;i<NKEYS;i++) {
if (mkeywfn[i].index==idx) {
strcpy(kp,mkeywfn[i].word);
*cp = kp;
return;
}
}
*cp = &fail[0];
} | false | false | false | false | false | 0 |
convertOptLengthSpecC(ELObj *obj, const Identifier *ident,
const Location &loc,
FOTBuilder::OptLengthSpec &result)
{
obj = convertFromString(obj, convertAllowBoolean|convertAllowNumber, loc);
if (obj == makeFalse()) {
result.hasLength = 0;
return 1;
}
if (convertLengthSpecC(obj, ident, loc, re... | false | false | false | false | false | 0 |
_k_canRead()
{
Q_Q(KPtyDevice);
qint64 readBytes = 0;
#ifdef Q_OS_IRIX // this should use a config define, but how to check it?
size_t available;
#else
int available;
#endif
if (!::ioctl(q->masterFd(), PTY_BYTES_AVAILABLE, (char *) &available)) {
#ifdef Q_OS_SOLARIS
// A Pty is a STREAMS mo... | false | false | false | false | false | 0 |
pcm_sanity_check(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime;
if (PCM_RUNTIME_CHECK(substream))
return -ENXIO;
runtime = substream->runtime;
if (snd_BUG_ON(!substream->ops->copy && !runtime->dma_area))
return -EINVAL;
if (runtime->status->state == SNDRV_PCM_STATE_OPEN)
return -EBAD... | false | false | false | false | false | 0 |
g_dbus_create_reply_valist(DBusMessage *message,
int type, va_list args)
{
DBusMessage *reply;
reply = dbus_message_new_method_return(message);
if (reply == NULL)
return NULL;
if (dbus_message_append_args_valist(reply, type, args) == FALSE) {
dbus_message_unref(reply);
return NULL;
}
return reply;
... | false | false | false | false | false | 0 |
slapi_value_get_uint(const Slapi_Value *value)
{
if ( value == NULL ) return 0;
if ( value->bv_val == NULL ) return 0;
if ( !checkBVString( value ) ) return 0;
return (unsigned int)strtoul( value->bv_val, NULL, 10 );
} | false | false | false | false | false | 0 |
comp_GainTable(Task *task)
{
int i;
Array_def_use_table *lm_array;
Lms_pg *pg;
Block *bpt;
pg = &(task->hmdf_info->pg_head[task->SelectPro]);
lm_array = lms_get_all_array_on_pg(pg);
for (i = 1; i <= task->TaskNum; i++) {
if (!in_IntSet(task->TaskF, i)) {
Array_d... | false | false | false | false | false | 0 |
DoGetToken()
{
int start = m_TokenIndex;
bool needReplace = false;
wxString str;
wxChar c = CurrentChar();
if (c == '_' || wxIsalpha(c))
{
// keywords, identifiers, etc.
// operator== is cheaper than wxIsalnum, also MoveToNextChar already includes IsEOF
while ( ( ... | false | false | false | false | false | 0 |
drain(int4 node, int4 pid, int fd)
{
int4 list; /* trace list # */
int4 n_index, n_flags; /* node entry info */
int4 p_index, p_flags; /* pid entry info */
int4 r; /* length of traces ret'd */
int flush_delay; /* signal then delay */
/*
* Determine list number.
*/
if (ao_taken(op, "l")) {
ao_intp... | false | false | false | false | false | 0 |
sendservermode(bool send = true)
{
int sm = (autoteam ? AT_ENABLED : AT_DISABLED) | ((mastermode & MM_MASK) << 2) | (matchteamsize << 4);
if(send) sendf(-1, 1, "ri2", SV_SERVERMODE, sm);
return sm;
} | false | false | false | false | false | 0 |
goo_canvas_set_static_root_item_model (GooCanvas *canvas,
GooCanvasItemModel *model)
{
GooCanvasPrivate *priv;
g_return_if_fail (GOO_IS_CANVAS (canvas));
g_return_if_fail (GOO_IS_CANVAS_ITEM_MODEL (model));
priv = GOO_CANVAS_GET_PRIVATE (canvas);
if (priv->static_root_item_model == model)
... | false | false | false | false | false | 0 |
VerifyDescriptors(void)
{
struct stat statBuf;
if ((fstat(STDIN_FILENO, &statBuf) < 0) ||
(fstat(STDOUT_FILENO, &statBuf) < 0) ||
(fstat(STDERR_FILENO, &statBuf) < 0))
{
_exit(99);
}
} | false | false | false | false | false | 0 |
retrocl_housekeeping ( time_t cur_time, void *noarg )
{
int ldrc;
if (retrocl_be_changelog == NULL) {
LDAPDebug0Args(LDAP_DEBUG_TRACE,"not housekeeping if no cl be\n");
return;
}
if ( !ts.ts_s_initialized ) {
slapi_log_error( SLAPI_LOG_FATAL, RETROCL_PLUGIN_NAME, "changelog_housekeeping ca... | false | false | false | false | false | 0 |
caribou_column_model_first_key (CaribouColumnModel* self) {
CaribouKeyModel* result = NULL;
GeeArrayList* _tmp0_ = NULL;
gpointer _tmp1_ = NULL;
g_return_val_if_fail (self != NULL, NULL);
_tmp0_ = self->priv->keys;
_tmp1_ = gee_list_first ((GeeList*) _tmp0_);
result = (CaribouKeyModel*) _tmp1_;
return result;
} | false | false | false | false | false | 0 |
get_bytes(struct tdb_context *tdb,
tdb1_off_t off, tdb1_len_t len)
{
TDB_DATA d;
d.dsize = len;
if (tdb->tdb1.transaction == NULL && tdb->file->map_ptr != NULL)
d.dptr = (unsigned char *)tdb->file->map_ptr + off;
else
d.dptr = tdb1_alloc_read(tdb, off, d.dsize);
return d;
} | false | false | false | false | false | 0 |
format_humanmem(char *buf, size_t len, unsigned long mem)
{
if (mem >= 1024*1024)
snprintf(buf, len, "%4.2fGB", (float)mem/(1024*1024));
else if (mem >= 1024)
snprintf(buf, len, "%4.2fMB", (float)mem/1024);
else
snprintf(buf, len, "%4.2fkB", (float)mem);
return buf;
} | false | false | false | false | false | 0 |
on_camera_added (EmpathyCameraDeviceMonitor *device,
gchar *id,
gchar *filename,
gchar *product_name,
gint api_version,
EmpathyCameraMonitor *self)
{
EmpathyCamera *camera;
if (self->priv->cameras == NULL)
return;
camera = empathy_camera_new (id, filename, product_name);
g_queue_push_... | false | false | false | false | false | 0 |
getPropertySubset(
const tstring& prefix) const
{
Properties ret;
std::vector<tstring> const keys = propertyNames();
size_t const prefix_len = prefix.size ();
for (std::vector<tstring>::const_iterator it = keys.begin();
it != keys.end(); ++it)
{
int result = it->compare (0, prefi... | false | false | false | false | false | 0 |
vm_matrix_cmp( matrix * a, matrix * b )
{
float tmp1,tmp2,tmp3;
tmp1 = fl_abs(vm_vec_dot( &a->vec.uvec, &b->vec.uvec ) - 1.0f);
tmp2 = fl_abs(vm_vec_dot( &a->vec.fvec, &b->vec.fvec ) - 1.0f);
tmp3 = fl_abs(vm_vec_dot( &a->vec.rvec, &b->vec.rvec ) - 1.0f);
// mprintf(( "Mat=%.16f, %.16f, %.16f\n", tmp1, tmp2, tmp3 )... | false | false | false | false | false | 0 |
Ns_RWLockUnlock(Ns_RWLock *rwPtr)
{
RwLock *lockPtr = (RwLock *) *rwPtr;
Ns_MutexLock(&lockPtr->mutex);
if (--lockPtr->lockcnt < 0) {
lockPtr->lockcnt = 0;
}
if (lockPtr->nwriters) {
Ns_CondSignal(&lockPtr->wcond);
} else if (lockPtr->nreaders) {
Ns_CondBroadcast(&lockPtr->rcond);
}
... | false | false | false | false | false | 0 |
gfire_process_list_clear(gfire_process_list *p_list)
{
if(!p_list)
return;
while(p_list->processes)
{
gfire_process_info_free((process_info*)p_list->processes->data);
p_list->processes = g_list_delete_link(p_list->processes, p_list->processes);
}
} | false | false | false | false | false | 0 |
UIntDec(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
exp->string = PrintUInt((--op1->ui));
if(!exp->expType)
{
exp->expType = op1->type;
if(op1->type)
op1->type->refCount++;
}
return 0x1;
} | false | false | false | false | false | 0 |
_theme_hook(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
const char *t;
evas_event_freeze(evas_object_evas_get(obj));
_elm_widget_mirrored_reload(obj);
_mirrored_set(obj, elm_widget_mirrored_get(obj));
t = eina_stringshare_add(elm_object_text_get(obj));
_elm_theme_object_set(ob... | false | false | false | false | false | 0 |
output_tfm(Metrics &metrics, const String &ps_name, int boundary_char,
const FontInfo &finfo, String tfm_filename, String vf_filename,
ErrorHandler *errh)
{
String pl_filename;
bool vpl = vf_filename;
if (no_create) {
errh->message("would write %s to temporary file", (vpl ? "VPL" : "PL"));
pl_fil... | false | false | false | false | false | 0 |
slapi_rdn_partial_dup(Slapi_RDN *from, Slapi_RDN **to, int rdnidx)
{
char **ptr = NULL;
int lastidx = -1;
if (NULL == from || NULL == to || rdnidx < 0)
{
return -1;
}
*to = NULL;
for (ptr = from->all_rdns; ptr && *ptr; ptr++) lastidx++;
if (rdnidx > lastidx)
{
return -1;
}
if (NULL == from->all_nrdns)... | false | false | false | true | false | 1 |
calculate_exposures(int x, int y, int z)
{
int e = 0;
if (z == GRID_SZ-1)
return 0;
if (grid[x+1][y+1][z+1]) e++;
if (grid[x-1][y+1][z+1]) e++;
if (grid[x+1][y-1][z+1]) e++;
if (grid[x-1][y-1][z+1]) e++;
if (grid[x-1][y][z+1]) e+=2;
if (grid[x+1][y][z+1]) e+=2;
if (grid[x][y-1][z+1]) e+=2;
if (g... | false | false | false | false | false | 0 |
quota_readlink (call_frame_t *frame, xlator_t *this, loc_t *loc, size_t size)
{
quota_local_t *local = NULL;
int32_t ret = -1;
local = quota_local_new ();
if (local == NULL) {
goto unwind;
}
frame->local = local;
ret = loc_copy (&local-... | false | false | false | false | true | 1 |
wire_ttl_to_str(rrset_dump_params_t *p)
{
uint32_t data;
size_t in_len = sizeof(data);
size_t out_len = 0;
int ret;
p->ret = -1;
// Check input size.
if (in_len > p->in_max) {
return;
}
// Fill in input data.
if (memcpy(&data, p->in, in_len) == NULL) {
return;
}
if (p->style->human_ttl) {
... | false | true | false | false | false | 1 |
radeon_wb_init(struct radeon_device *rdev)
{
int r;
if (rdev->wb.wb_obj == NULL) {
r = radeon_bo_create(rdev, RADEON_GPU_PAGE_SIZE, PAGE_SIZE, true,
RADEON_GEM_DOMAIN_GTT, 0, NULL, NULL,
&rdev->wb.wb_obj);
if (r) {
dev_warn(rdev->dev, "(%d) create WB bo failed\n", r);
return r;
}
r = ... | false | false | false | false | false | 0 |
_dictExpandIfNeeded(dict *d)
{
/* Incremental rehashing already in progress. Return. */
if (dictIsRehashing(d)) return DICT_OK;
/* If the hash table is empty expand it to the intial size. */
if (d->ht[0].size == 0) return dictExpand(d, DICT_HT_INITIAL_SIZE);
/* If we reached the 1:1 ratio, and we ... | false | false | false | false | false | 0 |
payloader_filter (GstPluginFeature * feature, FilterData * data)
{
gboolean res;
const gchar *klass;
GstElementFactory *fact;
GList **list = NULL;
/* we only care about element factories */
if (G_UNLIKELY (!GST_IS_ELEMENT_FACTORY (feature)))
return FALSE;
if (gst_plugin_feature_get_rank (feature) < ... | false | false | false | false | false | 0 |
parseAttribute(AttributeImpl *attr)
{
switch ( attr->id() )
{
case ATTR_TYPE:
case ATTR_CODETYPE:
if (attr->val()) {
setServiceType(attr->val()->string());
setNeedComputeContent();
}
break;
case ATTR_WIDTH:
i... | false | false | false | false | false | 0 |
generate (CProject &project, Unit *unit) {
string include_directive;
// get the name, which we have to use to include the file
Filename include_file = project.getInclString (unit->name ());
include_directive += "#include \"";
include_directive += include_file.name ();
include_directive += "\"";
r... | false | false | false | false | false | 0 |
gp2ap020a00f_read_channel(struct gp2ap020a00f_data *data,
struct iio_chan_spec const *chan, int *val)
{
enum gp2ap020a00f_cmd cmd;
int err;
switch (chan->scan_index) {
case GP2AP020A00F_SCAN_MODE_LIGHT_CLEAR:
cmd = GP2AP020A00F_CMD_READ_RAW_CLEAR;
break;
case GP2AP020A00F_SCAN_MODE_LIGHT_IR:
cmd = GP2AP... | false | false | false | false | false | 0 |
__ptrace_unlink(struct task_struct *child)
{
const struct cred *old_cred;
BUG_ON(!child->ptrace);
child->ptrace = 0;
child->parent = child->real_parent;
list_del_init(&child->ptrace_entry);
old_cred = child->ptracer_cred;
child->ptracer_cred = NULL;
put_cred(old_cred);
spin_lock(&child->sighand->siglock);
... | false | false | false | false | false | 0 |
no_response_to_proxied_request(void *ctx)
{
REQUEST *request = ctx;
home_server *home;
char buffer[128];
rad_assert(request->magic == REQUEST_MAGIC);
rad_assert(request->child_state == REQUEST_PROXIED);
/*
* If we've failed over to an internal home server,
* replace the callback with the correct one. This
... | true | true | false | false | false | 1 |
write_flags(Bit16u flags, bx_bool change_IOPL, bx_bool change_IF)
{
// Build a mask of the following bits:
// x,NT,IOPL,OF,DF,IF,TF,SF,ZF,x,AF,x,PF,x,CF
Bit32u changeMask = 0x0dd5;
#if BX_CPU_LEVEL >= 3
changeMask |= EFlagsNTMask; // NT is modified as requested.
if (change_IOPL)
changeMask |= EFlagsI... | false | false | false | false | false | 0 |
do_plot (header *hdx, header *hdy, int m)
{ int cx,rx,cy,ry,i,ix,iy;
double *x,*y,h;
getmatrix(hdx,&rx,&cx,&x); getmatrix(hdy,&ry,&cy,&y);
if (cx!=cy || (rx>1 && ry!=rx))
{ error=22; output("Plot columns must agree!\n");
return;
}
if (scaling)
{ minmax(x,(long)cx*rx,&x_min,&x_max,&ix,&iy);
minmax(y,(long)cy*... | false | false | false | false | false | 0 |
inputweightsstr2(AjPStr str, long a, long b, long *weightsum,
steptr weight, boolean *weights, const char *prog)
{
/* input the character weights, 0 or 1 */
Char ch = '\0';
long i;
*weightsum = 0;
for (i = a; i < b; i++) {
ch = ajStrGetCharPos(str, i-1);
weight[i] = 1;
if (ch == '0' || ch... | false | false | false | false | false | 0 |
get_addr(unsigned char **here,int len)
{
if (!len) return NULL;
(*here) += len;
return *here-len;
} | false | false | false | false | false | 0 |
update_onlmtasks(Stasche *sinfo)
{
const int pc_num = sinfo->pc_num;
const int *ntasks = sinfo->ntasks;
int **sched = sinfo->sched;
Module_table *module = sinfo->module;
Array_table *ahead = module->array_head;
int i, j;
int prev_level;
for (i = 0; i < pc_num; i++) {
Array_def_u... | false | false | false | false | false | 0 |
png_read_finish_row(png_structrp png_ptr)
{
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Start of interlace block */
static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
/* Offset to next interlace block */
static PNG_CONST png_byte png_pass_inc[7] = {8, 8,... | false | false | false | false | false | 0 |
twl_rtc_interrupt(int irq, void *rtc)
{
unsigned long events;
int ret = IRQ_NONE;
int res;
u8 rd_reg;
res = twl_rtc_read_u8(&rd_reg, REG_RTC_STATUS_REG);
if (res)
goto out;
/*
* Figure out source of interrupt: ALARM or TIMER in RTC_STATUS_REG.
* only one (ALARM or RTC) interrupt source may be enabled
* ... | false | false | false | false | false | 0 |
cypress_process_packet(struct psmouse *psmouse, bool zero_pkt)
{
int i;
struct input_dev *input = psmouse->dev;
struct cytp_data *cytp = psmouse->private;
struct cytp_report_data report_data;
struct cytp_contact *contact;
struct input_mt_pos pos[CYTP_MAX_MT_SLOTS];
int slots[CYTP_MAX_MT_SLOTS];
int n;
cypress... | false | false | false | false | false | 0 |
startLeader( const LeaderNIC & ) {
checkForParagraphReopening();
lastFlowObjectWasWhitespace = false;
mifDoc.outSpecialChar( MifDoc::sTab );
inLeader = true;
setCurLeaderStream( new MifTmpOutputByteStream() );
} | false | false | false | false | false | 0 |
gt_pch_nx_VEC_ipa_edge_args_t_gc (void *x_p)
{
struct VEC_ipa_edge_args_t_gc * const x = (struct VEC_ipa_edge_args_t_gc *)x_p;
if (gt_pch_note_object (x, x, gt_pch_p_22VEC_ipa_edge_args_t_gc, gt_ggc_e_22VEC_ipa_edge_args_t_gc))
{
{
size_t i0;
size_t l0 = (size_t)(((*x).base).num);
... | false | false | false | false | false | 0 |
keepalive()
{
for (size_t j = 0; j < ndeeper; ++j)
deeper[j]->keepalive();
} | false | false | false | false | false | 0 |
copy_to_index(Tree t, Indexterm *terms, int importance,
conststring secno, conststring doctitle)
{
conststring id, title;
string h;
Indexterm term;
int i, n;
id = get_attrib(t, "id");
#ifdef USE_DATA_ATTRIBUTE
if (! (title = get_attrib(t, "data-index")))
#endif
title = get_attrib(t, "title");
/... | false | false | true | true | false | 1 |
write_keyword(FILE *fp, gchar *keyword, gint id, struct GMS_keyword_pak *values)
{
gint i=0;
while (values[i].label)
{
if (values[i].id == id)
fprintf(fp, " %s%s", keyword, values[i].label);
i++;
}
} | false | false | false | false | false | 0 |
zend_check_private_int(zend_function *fbc, zend_class_entry *ce, char *function_name_strval, int function_name_strlen TSRMLS_DC) /* {{{ */
{
if (!ce) {
return 0;
}
/* We may call a private function if:
* 1. The class of our object is the same as the scope, and the private
* function (EX(fbc)) has the sam... | false | false | false | false | false | 0 |
uea_set_bulk_timeout(struct uea_softc *sc, u32 dsrate)
{
int ret;
u16 timeout;
/* in bulk mode the modem have problem with high rate
* changing internal timing could improve things, but the
* value is mysterious.
* ADI930 don't support it (-EPIPE error).
*/
if (UEA_CHIP_VERSION(sc) == ADI930 ||
altse... | false | false | false | false | false | 0 |
xmlSchemaCheckUnionTypeDefCircular(xmlSchemaParserCtxtPtr pctxt,
xmlSchemaTypePtr type)
{
if (! WXS_IS_UNION(type))
return(0);
return(xmlSchemaCheckUnionTypeDefCircularRecur(pctxt, type,
type->memberTypes));
} | false | false | false | false | false | 0 |
process_library (struct filename *l)
{
char *buffptr;
char *objsptr;
struct filename *f;
size_t bufflen;
int ret;
char buff[COB_MEDIUM_BUFF];
char name[COB_MEDIUM_BUFF];
char objs[COB_MEDIUM_BUFF] = "\0";
bufflen = 0;
for (f = l; f; f = f->next) {
bufflen += strlen (f->object) + 2;
}
if (bufflen >... | false | false | false | true | false | 1 |
fsp_session_set_location_finish (FspSession *self,
GAsyncResult *res,
GError **error)
{
gpointer result = NULL;
g_return_val_if_fail (FSP_IS_SESSION (self), FALSE);
g_return_val_if_fail (G_IS_ASYNC_RESULT (res)... | false | false | false | false | false | 0 |
set(const QList<MUCItem>& items, MUCManager::Action action = MUCManager::Unknown) {
action_ = action;
iq_ = createIQ(doc(), "set", room_.full(), id());
QDomElement muc = doc()->createElement("query");
muc.setAttribute("xmlns", "http://jabber.org/protocol/muc#admin");
iq_.appendChild(muc);
foreach(MUCIte... | false | false | false | false | false | 0 |
dot(const GLEPoint3D& p, GLEPoint3D* r) const {
int idx = 0;
for (int row = 0; row < 3; row++) {
double result = 0.0;
for (int col = 0; col < 3; col++) {
result += m_C[idx++]*p.m_C[col];
}
r->m_C[row] = result;
}
} | false | false | false | false | false | 0 |
si470x_fops_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
struct si470x_device *radio = video_drvdata(file);
int retval = 0;
unsigned int block_count = 0;
/* switch on rds reception */
if ((radio->registers[SYSCONFIG1] & SYSCONFIG1_RDS) == 0)
si470x_rds_on(radio);
/* block if no ne... | false | false | false | false | false | 0 |
gimple_stmt_nonzero_warnv_p (gimple stmt, bool *strict_overflow_p)
{
switch (gimple_code (stmt))
{
case GIMPLE_ASSIGN:
return gimple_assign_nonzero_warnv_p (stmt, strict_overflow_p);
case GIMPLE_CALL:
return gimple_alloca_call_p (stmt);
default:
gcc_unreachable ();
}
} | false | false | false | false | false | 0 |
evas_object_clip_dirty(Evas_Object *obj)
{
Eina_List *l;
Evas_Object *data;
if (obj->cur.cache.clip.dirty) return ;
obj->cur.cache.clip.dirty = 1;
EINA_LIST_FOREACH(obj->clip.clipees, l, data)
evas_object_clip_dirty(data);
} | false | false | false | false | false | 0 |
unpack_comm(int n, int first, double *buf)
{
int i,m,last;
double **v = atom->v;
double **omega = atom->omega;
m = 0;
last = first + n;
for (i = first; i < last; i++) {
v[i][0] = buf[m++];
v[i][1] = buf[m++];
v[i][2] = buf[m++];
omega[i][0] = buf[m++];
omega[i][1] = buf[m++];
omega... | false | false | false | false | false | 0 |
append_radio_msg(struct sk_buff *skb, int id,
struct hwsim_new_radio_params *param)
{
int ret;
ret = nla_put_u32(skb, HWSIM_ATTR_RADIO_ID, id);
if (ret < 0)
return ret;
if (param->channels) {
ret = nla_put_u32(skb, HWSIM_ATTR_CHANNELS, param->channels);
if (ret < 0)
return ret;
}
if (param->reg... | false | false | false | false | false | 0 |
createNagAction(const Nag& nag)
{
QAction* action = new QAction(NagSet::nagToMenuString(nag), this);
m_actions[action] = EditAction(EditAction::AddNag, nag);
return action;
} | false | false | false | false | false | 0 |
hash_element_dtor(void *user, void *element)
{
struct curl_hash *h = (struct curl_hash *) user;
struct curl_hash_element *e = (struct curl_hash_element *) element;
if (e->key)
free(e->key);
h->dtor(e->ptr);
free(e);
} | false | false | false | false | false | 0 |
stv0900_activate_s2_modcod(struct stv0900_internal *intp,
enum fe_stv0900_demod_num demod)
{
u32 matype,
mod_code,
fmod,
reg_index,
field_index;
dprintk("%s\n", __func__);
if (intp->chip_id <= 0x11) {
msleep(5);
mod_code = stv0900_read_reg(intp, PLHMODCOD);
matype = mod_code & 0x3;
mod_code = ... | false | false | false | false | false | 0 |
stfl_ipool_destroy(struct stfl_ipool *pool)
{
if (!pool)
return;
stfl_ipool_flush(pool);
free(pool->code);
if (pool->to_wc_desc != (iconv_t)(-1))
iconv_close(pool->to_wc_desc);
if (pool->from_wc_desc != (iconv_t)(-1))
iconv_close(pool->from_wc_desc);
free(pool);
} | false | false | false | false | false | 0 |
lv_mirror_count(const struct logical_volume *lv)
{
struct lv_segment *seg;
uint32_t s, mirrors;
if (!(lv->status & MIRRORED))
return 1;
seg = first_seg(lv);
/* FIXME: RAID10 only supports 2 copies right now */
if (!strcmp(seg->segtype->name, "raid10"))
return 2;
if (lv->status & PVMOVE)
return seg->are... | false | false | false | false | false | 0 |
ath9k_hw_init_config(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
ah->config.dma_beacon_response_time = 1;
ah->config.sw_beacon_response_time = 6;
ah->config.cwm_ignore_extcca = false;
ah->config.analog_shiftreg = 1;
ah->config.rx_intr_mitigation = true;
if (AR_SREV_9300_20_OR_LATER(a... | false | false | false | false | false | 0 |
DeallocateDefgenericBinaryData(
void *theEnv)
{
#if (BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE) && (! RUN_TIME)
unsigned long space;
space = DefgenericBinaryData(theEnv)->GenericCount * sizeof(struct defgeneric);
if (space != 0) genlongfree(theEnv,(void *) DefgenericBinaryData(theEnv)->DefgenericArray,space)... | false | false | false | false | false | 0 |
ra_response_chunk_commit(struct ra_client *client) {
if(RC->flags & CF_DONE) {
return;
}
if(RC->entity.length) {
buffer_add_f(&RC->send, "%x\r\n", RC->entity.length);
buffer_add(&RC->send, RC->entity.data, RC->entity.length);
buffer_clear(&RC->entity);
buffer_add_s(&... | false | false | false | false | false | 0 |
edge_to_cases_cleanup (const void *key ATTRIBUTE_UNUSED, void **value,
void *data ATTRIBUTE_UNUSED)
{
tree t, next;
for (t = (tree) *value; t; t = next)
{
next = CASE_CHAIN (t);
CASE_CHAIN (t) = NULL;
}
*value = NULL;
return true;
} | 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.