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 |
|---|---|---|---|---|---|---|
arrow_type_box(GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag)
{
pointf m, q, v, a[4];
v.x = -u.y * 0.4;
v.y = u.x * 0.4;
m.x = p.x + u.x * 0.8;
m.y = p.y + u.y * 0.8;
q.x = p.x + u.x;
q.y = p.y + u.y;
a[0].x = p.x + v.x;
a[0].y = p.y + v.y;
a[1].x ... | false | false | false | false | false | 0 |
xfs_sort_for_rename(
struct xfs_inode *dp1, /* in: old (source) directory inode */
struct xfs_inode *dp2, /* in: new (target) directory inode */
struct xfs_inode *ip1, /* in: inode of old entry */
struct xfs_inode *ip2, /* in: inode of new entry */
struct xfs_inode *wip, /* in: whiteout inode */
struct xfs_inode ... | false | false | false | false | false | 0 |
Open(uint32_t iTimeoutMs /* = CEC_DEFAULT_CONNECT_TIMEOUT */, bool bSkipChecks /* = false */, bool bStartListening /* = true */)
{
bool bConnectionOpened(false);
{
CLockObject lock(m_mutex);
/* we need the port settings here */
if (!m_port)
{
LIB_CEC->AddLog(CEC_LOG_ERROR, "port is NULL");
... | false | false | false | false | false | 0 |
gkrellm_draw_text(GdkDrawable *drawable, GkrellmTextstyle *ts, gint x, gint y,
gchar *s, gint len)
{
if (!drawable || !ts || !s)
return;
if (ts->effect)
{
gdk_gc_set_foreground(_GK.text_GC, &ts->shadow_color);
gkrellm_gdk_draw_text(drawable, ts->font, _GK.text_GC,
x + 1, y + 1, s, len);
}
gdk_gc_s... | false | false | false | false | false | 0 |
insert_into_miniFAT_chain (fat_chain * chain, unsigned int sector)
{
/* inserting a sector into the miniFAT chain [linked list] */
fat_entry *entry = malloc (sizeof (fat_entry));
if (entry == NULL)
return FREEXL_INSUFFICIENT_MEMORY;
entry->current_sector = chain->next_sectorMini;
chain->next_sectorMini... | false | false | false | false | false | 0 |
OnOK( wxCommandEvent &WXUNUSED(event) )
{
try
{
CMD_inquire::Instance()->ProcessString( textCtrl_->GetValue() );
}
catch ( ECommandError const &e )
{
ExGlobals::StopAllScripts();
wxMessageDialog *md = new wxMessageDialog( this, wxString(e.what(),wxConvUTF8),
... | false | false | false | false | false | 0 |
hashfirstcodes_getencseqkmers_twobitencoding(const GtEncseq *encseq,
unsigned int kmersize)
{
GtTimer *timer = NULL;
GtHashfirstcodes hashfirstcodes;
unsigned long numofsequences, psum;
GT_UNUSED unsigned long totallength;
/*GT_UNUSED unsigned long countsum;*/... | false | false | false | false | false | 0 |
hp_wmi_init(void)
{
int err;
int event_capable = wmi_has_guid(HPWMI_EVENT_GUID);
int bios_capable = wmi_has_guid(HPWMI_BIOS_GUID);
if (!bios_capable && !event_capable)
return -ENODEV;
if (event_capable) {
err = hp_wmi_input_setup();
if (err)
return err;
}
if (bios_capable) {
hp_wmi_platform_dev =
... | false | false | false | false | false | 0 |
decompositionLU(matrice *matriceA, matrice **matriceA_L, matrice **matriceA_U) // retourne 1 si succes ou 0 si une erreur s'est produite
{
if(matriceA->symetrique==SYMETRIQUE || matriceA->inversible!=INVERSIBLE || matriceA->positive!=POSITIVE)
return 0;
else
{
char nouv... | false | false | false | false | false | 0 |
gnome_prefs_toggle_new (GtkWidget *table,
const gchar *label_txt,
const gchar *conf_key,
const gchar *tooltip,
int row)
{
GnomePrefsWindow *gpw = NULL;
GValue value = { 0, {{0}, {0}}};
GtkWidget *toggle = NULL;
gboolean writable = FALSE;
int cols = 0;
writable = gm_conf_is_key_writable (conf_... | false | false | false | false | false | 0 |
nv_pcmark(cap)
cmdarg_T *cap;
{
#ifdef FEAT_JUMPLIST
pos_T *pos;
# ifdef FEAT_FOLDING
linenr_T lnum = curwin->w_cursor.lnum;
int old_KeyTyped = KeyTyped; /* getting file may reset it */
# endif
if (!checkclearopq(cap->oap))
{
if (cap->cmdchar == 'g')
pos = movechangelist((int)cap->cou... | false | false | false | false | false | 0 |
bsched_unused(bsched_bws_t bws)
{
const bsched_t *bs = bsched_get(bws);
uint unused;
if (!(bs->flags & BS_F_ENABLED)) /* Scheduler disabled */
return BS_BW_MAX;
unused = uint_saturate_sub(bs->bw_max, bs->bw_last_period);
return uint_saturate_sub(unused, bs->bw_urgent);
} | false | false | false | false | false | 0 |
displayFormTree(formTree* ftree) {
while(1) {
if(ftree == NULL) {
printf("Null formula, going up!\n");
return;
}
if(ftree->path_selector == EXISTS || ftree->path_selector == ALWAYS ||
ftree->path_selector == EXISTSPARA || ftree->path_selector == A... | false | false | false | false | false | 0 |
xkb_events_filter (GdkXEvent *xev_,
GdkEvent *gdkev_,
gpointer user_data)
{
XEvent *xev = (XEvent *) xev_;
XkbEvent *xkbev = (XkbEvent *) xev;
GsdKeyboardManager *manager = (GsdKeyboardManager *) user_data;
if (xev->type != manager->priv->xkb_event_base ||
xkbev->any.x... | false | false | false | false | false | 0 |
gen8_upload_sf_clip_viewport(struct brw_context *brw)
{
struct gl_context *ctx = &brw->ctx;
const GLfloat depth_scale = 1.0F / ctx->DrawBuffer->_DepthMaxF;
float y_scale, y_bias;
const bool render_to_fbo = _mesa_is_user_fbo(ctx->DrawBuffer);
float *vp = brw_state_batch(brw, AUB_TRACE_SF_VP_STATE,
... | false | false | false | false | false | 0 |
translate_indicator (TreeNode *x, char *loj, char *eng)/*{{{*/
{
char *trans;
int negated;
char buffer[256];
XCaiIndicator *xci;
if (prop_neg_indicator(x, NO)) {
negated = 1;
} else {
negated = 0;
}
xci = prop_cai_indicator(x, NO);
if (xci) {
switch (xci->code) {
case CC_CAI:
... | false | false | false | false | false | 0 |
sec_pkcs12_decoder_asafes_notify(void *arg, PRBool before, void *dest,
int real_depth)
{
SEC_PKCS12DecoderContext *p12dcx;
sec_PKCS12SafeContentsContext *safeContentsCtx;
/* make sure no error occurred. */
p12dcx = (SEC_PKCS12DecoderContext *)arg;
if(!p12dcx || p12dcx->error) {
return;
... | false | false | false | false | false | 0 |
cli_set_mode(int argc, char **argv, struct s_hardware *hardware)
{
cli_mode_t new_mode;
reset_more_printf();
if (argc <= 0) {
more_printf("Which mode?\n");
return;
}
/*
* Note! argv[0] is a string representing the mode, we need the
* equivalent cli_mode_t to pass it to set_mode.
*... | false | false | false | false | false | 0 |
get_ch_mode(jxr_image_t image, struct rbitstream*str)
{
int ch_mode;
if (image->num_channels == 1) {
ch_mode = 0; /* UNIFORM */
} else {
ch_mode = _jxr_rbitstream_uint2(str);
}
return ch_mode;
} | false | false | false | false | false | 0 |
PixarLogVSetField(TIFF* tif, uint32 tag, va_list ap)
{
static const char module[] = "PixarLogVSetField";
PixarLogState *sp = (PixarLogState *)tif->tif_data;
int result;
switch (tag) {
case TIFFTAG_PIXARLOGQUALITY:
sp->quality = (int) va_arg(ap, int);
if (tif->tif_mode != O_RDONLY && (sp->state... | false | false | false | false | false | 0 |
fill_cmd_oem_intel_node_manager_get_node_manager_policy (uint8_t domain_id,
uint8_t policy_id,
fiid_obj_t obj_cmd_rq)
{
if (!IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id)
|| !fiid_obj_vali... | false | false | false | false | false | 0 |
next_is_keyword_line(char* line_buffer)
{
if ( 0 == strncmp("NODAL COORDINATES", line_buffer, 17) )
return FIDAP_NODAL_COORDINATES_ID;
else if ( 0 == strncmp("ELEMENT GROUPS", line_buffer, 14) )
return FIDAP_ELEMENT_GROUPS_ID;
else if ( 0 == strncmp("VERSION", line_buffer, 7) )
return FIDAP_VERSION_... | false | false | false | false | false | 0 |
caribou_group_model_get_levels (CaribouGroupModel* self, int* result_length1) {
gchar** result = NULL;
GeeHashMap* _tmp0_ = NULL;
GeeSet* _tmp1_ = NULL;
GeeSet* _tmp2_ = NULL;
GeeSet* _tmp3_ = NULL;
gint _tmp4_ = 0;
gpointer* _tmp5_ = NULL;
gchar** _tmp6_ = NULL;
gint _tmp6__length1 = 0;
gchar** _tmp7_ = NULL... | false | false | false | false | false | 0 |
xmlFreeCatalogEntry(xmlCatalogEntryPtr ret) {
if (ret == NULL)
return;
/*
* Entries stored in the file hash must be deallocated
* only by the file hash cleaner !
*/
if (ret->dealloc == 1)
return;
if (xmlDebugCatalogs) {
if (ret->name != NULL)
xmlGeneri... | false | false | false | false | false | 0 |
project_selection_changed_cb (GladeProject *project, GladeWindow *window)
{
GladeWidget *glade_widget = NULL;
GList *list;
gint num;
/* This is sometimes called with a NULL project (to make the label
* insensitive with no projects loaded)
*/
g_return_if_fail (GLADE_IS_WINDOW (window));
/* Only update the to... | false | false | false | false | false | 0 |
operator==(const Self & region) const
{
bool same;
same = ( m_Index == region.m_Index );
same = same && ( m_Size == region.m_Size );
same = same && ( m_ImageDimension == region.m_ImageDimension );
return same;
} | false | false | false | false | false | 0 |
Vect_get_column_types(struct Map_info *Map, int field)
{
int num_dblinks, ncols, col;
struct field_info *fi;
dbDriver *driver = NULL;
dbHandle handle;
dbString table_name;
dbTable *table;
char buf[2000], temp_buf[2000];
num_dblinks = Vect_get_num_dblinks(Map);
if (num_dblinks <= 0)... | false | false | false | false | false | 0 |
propagate() {
if (unitPropagate() && post_.propagate(*this, 0)) {
assert(queueSize() == 0);
return true;
}
assign_.qReset();
post_.reset();
return false;
} | false | false | false | false | false | 0 |
free_hdr_field_lst(struct hdr_field* hf)
{
struct hdr_field* foo;
while(hf) {
foo=hf;
hf=hf->next;
clean_hdr_field(foo);
pkg_free(foo);
}
} | false | false | false | false | false | 0 |
turn_ruler_off()
{
if (ruler.on) {
struct udvt_entry *u;
ruler.on = FALSE;
if (term && term->set_ruler) {
(*term->set_ruler) (-1, -1);
}
if ((u = add_udv_by_name("MOUSE_RULER_X")))
u->udv_undef = TRUE;
if ((u = add_udv_by_name("MOUSE_RULER_Y")))
u->udv_undef = TRUE;
if (display_ipc_commands())... | false | false | false | false | false | 0 |
bus_connection_mark_stamp (DBusConnection *connection)
{
BusConnectionData *d;
d = BUS_CONNECTION_DATA (connection);
_dbus_assert (d != NULL);
if (d->stamp == d->connections->stamp)
return FALSE;
else
{
d->stamp = d->connections->stamp;
return TRUE;
}
} | false | false | false | false | false | 0 |
ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override
{
if (eventType == AI_EVENT_START_ESCORT && pInvoker->GetTypeId() == TYPEID_PLAYER)
{
DoScriptText(SAY_CORPORAL_KEESHAN_1, m_creature);
Start(false, (Player*)pInvoker, Ge... | false | false | false | false | false | 0 |
getScalarFieldFunction(const string& name)
{
CRotThermElasticInteraction::ScalarFieldFunction sf = NULL;
if (name=="potential_energy")
{
sf=&CRotThermElasticInteraction::getPotentialEnergy;
} else if (name=="count") {
sf=&CRotThermElasticInteraction::Count;
} else {
sf=NULL;
cerr << "ERROR ... | false | false | false | false | false | 0 |
gnc_import_TransInfo_set_selected_match (GNCImportTransInfo *info,
GNCImportMatchInfo *match,
gboolean selected_manually)
{
g_assert (info);
info->selected_match_info = match;
info->match_selected_manually = selected_manually;
} | false | false | false | false | false | 0 |
evhttp_make_header_response(struct evhttp_connection *evcon,
struct evhttp_request *req)
{
int is_keepalive = evhttp_is_connection_keepalive(req->input_headers);
evbuffer_add_printf(evcon->output_buffer, "HTTP/%d.%d %d %s\r\n",
req->major, req->minor, req->response_code,
req->response_code_line);
if (... | false | false | false | false | false | 0 |
men_z135_handle_lsr(struct men_z135_port *uart)
{
struct uart_port *port = &uart->port;
u8 lsr;
lsr = (uart->stat_reg >> 16) & 0xff;
if (lsr & MEN_Z135_LSR_OE)
port->icount.overrun++;
if (lsr & MEN_Z135_LSR_PE)
port->icount.parity++;
if (lsr & MEN_Z135_LSR_FE)
port->icount.frame++;
if (lsr & MEN_Z135_LSR... | false | false | false | false | false | 0 |
refresh_internal(struct ladish_app_supervisor_proxy * proxy_ptr, bool force)
{
DBusMessage* reply_ptr;
DBusMessageIter iter;
dbus_uint64_t version;
const char * reply_signature;
DBusMessageIter array_iter;
DBusMessageIter struct_iter;
uint64_t id;
const char * name;
dbus_bool_t running;
dbus_bool_t ... | false | false | false | false | false | 0 |
lpfc_sli4_init_rpi_hdrs(struct lpfc_hba *phba)
{
int rc = 0;
struct lpfc_rpi_hdr *rpi_hdr;
INIT_LIST_HEAD(&phba->sli4_hba.lpfc_rpi_hdr_list);
if (!phba->sli4_hba.rpi_hdrs_in_use)
return rc;
if (phba->sli4_hba.extents_in_use)
return -EIO;
rpi_hdr = lpfc_sli4_create_rpi_hdr(phba);
if (!rpi_hdr) {
lpfc_prin... | false | false | false | false | false | 0 |
timebbt (jack_transport_state_t state, jack_nframes_t nframes,
jack_position_t *pos, int new_pos, void *arg)
{
double min; /* minutes since frame 0 */
long abs_tick; /* ticks since frame 0 */
long abs_beat; /* beats since frame 0 */
if (new_pos) {
pos->valid = JackPositionBBT;
pos->beats_per_bar = ti... | false | false | false | false | false | 0 |
dump_finish (int phase)
{
struct dump_file_info *dfi;
if (phase < 0)
return;
dfi = get_dump_file_info (phase);
if (dfi->pstream)
fclose (dfi->pstream);
if (dfi->alt_stream && strcmp("stderr", dfi->alt_filename) != 0
&& strcmp("stdout", dfi->alt_filename) != 0)
fclose (dfi->alt_stream);
... | false | false | false | false | false | 0 |
_cupsRasterAddError(const char *f, /* I - Printf-style error message */
...) /* I - Additional arguments as needed */
{
_cups_raster_error_t *buf = get_error_buffer();
/* Error buffer */
va_list ap; /* Pointer to additional arguments */
char s[2048]; /* Message string */
size_t byt... | false | false | false | false | false | 0 |
pointer_diff (location_t loc, tree op0, tree op1)
{
tree restype = ptrdiff_type_node;
tree result, inttype;
addr_space_t as0 = TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (op0)));
addr_space_t as1 = TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (op1)));
tree target_type = TREE_TYPE (TREE_TYPE (op0));
tree con0, con1, li... | false | false | false | false | true | 1 |
update_wear(unsigned int erase_block_no)
{
if (!erase_block_wear)
return;
total_wear += 1;
/*
* TODO: Notify this through a debugfs entry,
* instead of showing an error message.
*/
if (total_wear == 0)
NS_ERR("Erase counter total overflow\n");
erase_block_wear[erase_block_no] += 1;
if (erase_block_wear[... | false | false | false | false | false | 0 |
Trace(int X, int Y)
{
if ( !this->PropPicker->PickProp(X,Y,this->CurrentRenderer) ){ return; }
if ( this->ViewProp != this->PropPicker->GetViewProp() ){ return; }
double pos[3];
this->PropPicker->GetPickPosition(pos);
if ( this->SnapToImage )
{
this->Snap(pos);
}
if ( this->ProjectToPlane )
... | false | false | false | false | false | 0 |
babl_init (void)
{
babl_cpu_accel_set_use (1);
if (ref_count++ == 0)
{
babl_internal_init ();
babl_sampling_class_init ();
babl_type_db ();
babl_component_db ();
babl_model_db ();
babl_format_db ();
babl_conversion_db ();
babl_extension_db ();
babl_fish_db ... | false | false | false | false | false | 0 |
ext2fs_crc16(crc16_t crc, const void *buffer, unsigned int len)
{
const unsigned char *cp = buffer;
while (len--)
/*
* for an unknown reason, PPC treats __u16 as signed
* and keeps doing sign extension on the value.
* Instead, use only the low 16 bits of an unsigned
* int for holding the CRC value to a... | false | false | false | false | false | 0 |
serial_callback(STATBUF *sb, char *filename, const char *path, enum cli_ftw_reason reason, struct cli_ftw_cbdata *data) {
struct client_serial_data *c = (struct client_serial_data *)data->data;
int sockd, ret;
const char *f = filename;
UNUSEDPARAM(sb);
if(chkpath(path))
return CL_SUCCESS;
c->... | false | false | false | false | false | 0 |
tor_disable_debugger_attach(void)
{
int r, attempted;
r = -1;
attempted = 0;
log_debug(LD_CONFIG,
"Attemping to disable debugger attachment to Tor for "
"unprivileged users.");
#if defined(__linux__) && defined(HAVE_SYS_PRCTL_H) && defined(HAVE_PRCTL)
#ifdef PR_SET_DUMPABLE
attempted =... | false | false | false | false | false | 0 |
addFile(const std::string& file) {
if (file.empty())
return;
std::string expanded_file = StringUtil::expandFilename(file);
m_timestamps[expanded_file] = FileUtil::getLastStatusChangeTimestamp(expanded_file.c_str());
} | false | false | false | false | false | 0 |
RegisterLazyDeoptimization(LInstruction* instr,
SafepointMode safepoint_mode,
int argc) {
// Create the environment to bailout to. If the call has side effects
// execution has to continue after the call otherwise execution can cont... | false | false | false | false | false | 0 |
DrawStatusBar( const CClientRef& client, wxDC* dc, const wxRect& rect1 ) const
{
wxRect rect = rect1;
rect.y += 1;
rect.height -= 2;
wxPen old_pen = dc->GetPen();
wxBrush old_brush = dc->GetBrush();
bool bFlat = thePrefs::UseFlatBar();
wxRect barRect = rect;
if (!bFlat) { // round bar has a black border,... | false | false | false | false | false | 0 |
find_image_rectangle(const int x, const int y) {
struct imgrect *ir;
for (ir = imgrects; ir < imgrects + nimgrects; ++ir)
if (ir->filename && x >= ir->x && x < ir->x + ir->w && y >= ir->y && y < ir->y + ir->h)
return ir;
return NULL;
} | false | false | false | false | false | 0 |
getNodeWithMinDist(Node** nodes)
{
Node** ptrMinNode = NULL;
double minDistance = numeric_limits<double>::max();
//Start at node 1, check see if it points to something, then move on the next one.
Node** nodeIter;
for(nodeIter = &((*nodes)->next); *nodeIter;
nodeIter = &(*nodeIter)->next)
... | false | false | false | false | false | 0 |
map_skb(struct device *dev, const struct sk_buff *skb,
dma_addr_t *addr)
{
const skb_frag_t *fp, *end;
const struct skb_shared_info *si;
*addr = dma_map_single(dev, skb->data, skb_headlen(skb), DMA_TO_DEVICE);
if (dma_mapping_error(dev, *addr))
goto out_err;
si = skb_shinfo(skb);
end = &si->frags[si->nr_... | false | false | false | false | false | 0 |
xmlSecGnuTLSX509CertRead(const xmlSecByte* buf, xmlSecSize size, xmlSecKeyDataFormat format) {
gnutls_x509_crt_t cert = NULL;
gnutls_x509_crt_fmt_t fmt;
gnutls_datum_t data;
int err;
xmlSecAssert2(buf != NULL, NULL);
xmlSecAssert2(size > 0, NULL);
/* figure out format */
switch(format)... | false | false | false | false | false | 0 |
Cmd_AddPingURL(const char* args, bool &)
{
if (*args && strstarts(args, "http://")) {
printf("Adding ping url %s\n", args);
cal.AddPingUrl(args, Clock::get()->GetAppTime());
}
else {
printf("Usage: addpingurl http://...");
}
} | false | false | false | false | false | 0 |
shm_sem_unlock (int sem)
{
struct sembuf ops;
int ret;
DEBUGLOG ("%s: unlocking sem %d", __func__, sem);
ops.sem_num = sem;
ops.sem_op = 1;
ops.sem_flg = SEM_UNDO;
retry:
do {
ret = semop (_wapi_sem_id, &ops, 1);
} while (ret == -1 && errno == EINTR);
if (ret == -1) {
/* EINVAL covers the case whe... | false | false | false | false | false | 0 |
MATRIX_map_rect(MATRIX *matrix, int *x, int *y, int *w, int *h)
{
int rx, ry, rw, rh;
if (matrix->m12 == 0.0F && matrix->m21 == 0.0F)
{
rx = DROUND(matrix->m11 * *x + matrix->dx);
ry = DROUND(matrix->m22 * *y + matrix->dy);
rw = DROUND(matrix->m11 * *w);
rh = DROUND(matrix->m22 * *h);
if (rw < 0)
... | false | false | false | false | false | 0 |
free_html_text(htmltxt_t * t)
{
htextspan_t *tl;
textspan_t *ti;
int i, j;
if (!t)
return;
tl = t->spans;
for (i = 0; i < t->nspans; i++) {
ti = tl->items;
for (j = 0; j < tl->nitems; j++) {
if (ti->str)
free(ti->str);
if (ti->layout && ti->free_layout)
ti->free_layout(ti->lay... | false | false | false | false | false | 0 |
m_vaul_compute_static_level (pIIR_ArrayAggregate e)
{
// Array aggregates are eithe globally static or non-static. They
// are never locally static.
for (pIIR_IndexedAssociationList ial = e->indexed_association_list;
ial; ial = ial->rest)
{
pIIR_IndexedAssociation ia = ial->first;
if (ia-... | false | false | false | false | false | 0 |
Rd_Proper_List_Check(WamWord start_word, WamWord *arg)
{
WamWord word, tag_mask;
WamWord save_start_word;
WamWord *lst_adr;
int n = 0;
save_start_word = start_word;
for (;;)
{
DEREF(start_word, word, tag_mask);
if (tag_mask == TAG_REF_MASK)
Pl_Err_Instantiation();
if (word == NIL_... | false | false | false | false | false | 0 |
decode_handle (Wire * w, const char *op)
{
SANE_Word h;
sanei_w_word (w, &h);
if (w->status || (unsigned) h >= (unsigned) num_handles || !handle[h].inuse)
{
DBG (DBG_ERR,
"decode_handle: %s: error while decoding handle argument "
"(h=%d, %s)\n", op, h, strerror (w->status));
return -1;
... | false | false | false | false | false | 0 |
rsvg_new_filter_primitive_displacement_map (void)
{
RsvgFilterPrimitiveDisplacementMap *filter;
filter = g_new (RsvgFilterPrimitiveDisplacementMap, 1);
_rsvg_node_init (&filter->super.super, RSVG_NODE_TYPE_FILTER_PRIMITIVE_DISPLACEMENT_MAP);
filter->super.in = g_string_new ("none");
filter->in2 = g_... | false | false | false | false | false | 0 |
tear_down_insert_comment (InsertCommentData *data, gconstpointer service)
{
gdata_test_mock_server_start_trace (mock_server, "teardown-insert-comment");
/* Delete the inserted comment. */
if (data->new_comment != NULL) {
g_assert (gdata_commentable_delete_comment (GDATA_COMMENTABLE (data->parent.file1), GDATA_SER... | false | false | false | false | false | 0 |
KBufferedSocket(const QString& host, const QString& service,
QObject *parent)
: KStreamSocket(host, service, parent),
d(new KBufferedSocketPrivate)
{
setInputBuffering(true);
setOutputBuffering(true);
} | false | false | false | false | false | 0 |
setConfigPos(eConfigFloatValues index, char const* fieldname, float defvalue)
{
setConfig(index, fieldname, defvalue);
if (getConfig(index) < 0.0f)
{
sLog.outError("%s (%f) can't be negative. Using %f instead.", fieldname, getConfig(index), defvalue);
setConfig(index, defvalue);
}
} | false | false | false | false | false | 0 |
prev_history_cb(GtkAction *action, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;
MsgInfo *info = messageview_nav_get_prev(mainwin->messageview);
if (info) {
if (info->folder != mainwin->summaryview->folder_item)
folderview_select(mainwin->folderview, info->folder);
summary_display_by_msgnum(mainw... | false | false | false | false | false | 0 |
Mnew (long size, int type) {
freeobj_t *fp;
size = (
size < FREEOBJSIZE
) ? M_BYTE2SIZE (FREEOBJSIZE) : M_BYTE2SIZE (size);
if (size >= freen || !freearray[size]) {
allocbuffer (size), numofallocs++;
if (numofallocs == NUMOFALLOCS)
Mdogc (M_GCFULL), gcsteps <<= 1, nu... | false | false | false | false | false | 0 |
countseq(char *s, struct ReadSeqVars *V)
/* this must count all valid seq chars, for some formats (paup-sequential) even
if we are skipping seq... */
{
while (*s != 0) {
if ((V->isseqchar)(*s)) {
(V->seqlencount)++;
}
s++;
}
} | false | false | false | false | false | 0 |
encodeCheckBuffer (OOCTXT* pctxt, ASN1UINT nbytes)
{
int stat = ASN_OK;
/* Add one to required bytes because increment logic will always */
/* init the byte at the incremented index to zero.. */
if ( ( pctxt->buffer.byteIndex + nbytes + 1 ) >= pctxt->buffer.size ) {
if ((stat = ... | false | false | false | false | false | 0 |
sftkdb_ClearPassword(SFTKDBHandle *keydb)
{
SECItem oldKey;
oldKey.data = NULL;
oldKey.len = 0;
sftkdb_switchKeys(keydb, &oldKey);
if (oldKey.data) {
PORT_ZFree(oldKey.data, oldKey.len);
}
return SECSuccess;
} | false | false | false | false | false | 0 |
compute_us()
{
double v,p;
double eps,us;
temperature->compute_vector();
if (uniaxial == 1) {
pressure->compute_vector();
p = pressure->vector[idir];
} else
p = pressure->compute_scalar();
v = compute_vol();
// Us^2 = (p-p0)/(rho0*eps)
eps = 1.0 - v/v0;
if (eps < 1.0e-10) us = 0.0;
... | false | false | false | false | false | 0 |
alm_blacklist_get_all_templates (AlmBlacklist* self) {
GHashTable* result;
GHashTable* _tmp0_ = NULL;
GHashTable* _tmp3_ = NULL;
g_return_val_if_fail (self != NULL, NULL);
_tmp0_ = self->priv->blacklists;
if (_tmp0_ == NULL) {
GHashTable* _tmp1_ = NULL;
GHashTable* _tmp2_ = NULL;
_tmp1_ = alm_blacklist_get_... | false | false | false | false | false | 0 |
get_group_list(Dsvec **gf)
{
int n;
Dsvec *dsv;
Vfs_handle *h;
if (dacs_group_files == NULL) {
if ((h = vfs_open_item_type(ITEM_TYPE_GROUPS)) == NULL) {
fail:
log_msg((LOG_ERROR_LEVEL, "get_group_list: failed"));
if (h != NULL)
vfs_close(h);
return(-1);
}
/* XXX Remove when st_mtime/st_mode avai... | false | false | false | false | false | 0 |
D_sign (double a, double b)
{
double x;
x = (a >= 0 ? a : -a);
return (b >= 0 ? x : -x);
} | false | false | false | false | false | 0 |
canvas_redrawallfortemplatecanvas(t_canvas *x, int action)
{
t_gobj *g;
t_template *tmpl;
t_symbol *s1 = gensym("struct");
for (g = x->gl_list; g; g = g->g_next)
{
t_object *ob = pd_checkobject(&g->g_pd);
t_atom *argv;
if (!ob || ob->te_type != T_OBJECT ||
binbuf_... | false | false | false | false | false | 0 |
process_md_create_mdl_rsp(struct mcap_mcl *mcl,
mcap_rsp *rsp, uint32_t len)
{
mcap_md_create_mdl_req *cmdlast = (mcap_md_create_mdl_req *) mcl->lcmd;
struct mcap_mdl_op_cb *conn = mcl->priv_data;
mcap_mdl_operation_conf_cb connect_cb = conn->cb.op_conf;
gpointer user_data = conn->user_data;
struct mcap_mdl ... | false | false | false | false | false | 0 |
scrub_chunk(struct scrub_ctx *sctx,
struct btrfs_device *scrub_dev,
u64 chunk_offset, u64 length,
u64 dev_offset,
struct btrfs_block_group_cache *cache,
int is_dev_replace)
{
struct btrfs_mapping_tree *map_tree =
&sctx->dev_root->fs_info->mapping_tree;
struct map_lookup *map;
str... | false | false | false | false | false | 0 |
gnumeric_days360 (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
go_basis_t basis;
GDate date1, date2;
GODateConventions const *date_conv = DATE_CONV (ei->pos);
gnm_float serial1 = datetime_value_to_serial (argv[0], date_conv);
gnm_float serial2 = datetime_value_to_serial (argv[1], date_conv);
gnm_float met... | false | false | false | false | false | 0 |
debug_unregister_domain(const std::string& domain)
{
using namespace debug_internal;
DebugState::domain_map_t& dm = get_debug_state().get_domain_map();
DebugState::domain_map_t::iterator found = dm.find(domain);
if (found == dm.end()) // doesn't exists
return false;
dm.erase(found); // this should clear ever... | false | false | false | false | false | 0 |
accept()
{
m_theme.setName(m_name->text());
m_theme.setBackgroundType(m_background_type->currentIndex());
m_theme.setBackgroundColor(m_background_color->color());
m_theme.setBackgroundImage(m_background_image->toString());
m_theme.setForegroundColor(m_foreground_color->color());
m_theme.setForegroundOpacity(m_f... | false | false | false | false | false | 0 |
checkFrameAccess(KHTMLPart *callingHtmlPart)
{
if (callingHtmlPart == this)
return true; // trivial
if (!xmlDocImpl()) {
#ifdef DEBUG_FINDFRAME
kDebug(6050) << "Empty part" << this << "URL = " << url();
#endif
return false; // we are empty?
}
// now compare the domains
if (callingHtmlPart && c... | false | false | false | false | false | 0 |
AcpiDbWalkForReferences (
ACPI_HANDLE ObjHandle,
UINT32 NestingLevel,
void *Context,
void **ReturnValue)
{
ACPI_OPERAND_OBJECT *ObjDesc = (ACPI_OPERAND_OBJECT *) Context;
ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE ... | false | false | false | false | false | 0 |
trace_conf_input (trace_type_t *ttype, unsigned len, char *data)
{
char *fbuf;
unsigned flen;
unsigned tflen;
struct parse *cfile = (struct parse *)0;
static int postconf_initialized;
static int leaseconf_initialized;
isc_result_t status;
/* Do what's done above, except that we don't have to read in the
d... | false | false | false | false | false | 0 |
rbd_obj_notify_ack_sync(struct rbd_device *rbd_dev, u64 notify_id)
{
struct rbd_obj_request *obj_request;
struct ceph_osd_client *osdc = &rbd_dev->rbd_client->client->osdc;
int ret;
obj_request = rbd_obj_request_create(rbd_dev->header_name, 0, 0,
OBJ_REQUEST_NODATA);
if (!obj_request)
return -ENOMEM;
r... | false | false | false | false | false | 0 |
stats_hubleaf(struct Client *source_p)
{
struct remote_conf *hub_p;
rb_dlink_node *ptr;
if((ConfigFileEntry.stats_h_oper_only ||
(ConfigServerHide.flatten_links && !IsExemptShide(source_p))) &&
!IsOper(source_p))
{
sendto_one_numeric(source_p, ERR_NOPRIVILEGES,
form_str (ERR_NOPRIVILEGES));
r... | false | false | false | false | false | 0 |
bubbleEvent(Event* evt)
{
DispatchGuard guard(_inDispatch);
EventListenerList::iterator it = _listeners.begin();
while (it != _listeners.end())
{
if (it->pListener && !it->useCapture && it->type == evt->type())
{
it->pListener->handleEvent(evt);
}
if (!it->pListener)
{
EventListenerList::iterator de... | false | false | false | false | false | 0 |
xmlSecTransformCtxAppend(xmlSecTransformCtxPtr ctx, xmlSecTransformPtr transform) {
int ret;
xmlSecAssert2(ctx != NULL, -1);
xmlSecAssert2(ctx->status == xmlSecTransformStatusNone, -1);
xmlSecAssert2(xmlSecTransformIsValid(transform), -1);
if(ctx->last != NULL) {
ret = xmlSecTransformConne... | false | false | false | false | false | 0 |
Java_ncsa_hdf_hdflib_HDFLibrary_Hclose
( JNIEnv *env,
jclass clss,
jint fid)
{
int status = 0;
if (fid < 0) {
/* maybe not an exception -- the file is already closed? */
return JNI_FALSE;
} else {
/* close the HDF file */
status = Hclose(fid);
if (status == FAIL) {
... | false | false | false | false | false | 0 |
TwoPhaseShmemInit(void)
{
bool found;
TwoPhaseState = ShmemInitStruct("Prepared Transaction Table",
TwoPhaseShmemSize(),
&found);
if (!IsUnderPostmaster)
{
GlobalTransaction gxacts;
int i;
Assert(!found);
TwoPhaseState->freeGXacts = INVALID_OFFSET;
TwoPhaseState->numPrepXacts = 0;
... | false | false | false | false | false | 0 |
length_Salt(const Salt *data)
{
size_t ret = 0;
{
size_t Top_tag_oldret = ret;
ret = 0;
ret += der_length_unsigned(&(data)->type);
ret += 1 + der_length_len (ret);
ret += 1 + der_length_len (ret);
ret += Top_tag_oldret;
}
{
size_t Top_tag_oldret = ret;
ret = 0;
ret += der_length_octet_string(&(data)->salt);
ret += 1 + ... | false | false | false | false | false | 0 |
rtc_uie_timer(unsigned long data)
{
struct rtc_device *rtc = (struct rtc_device *)data;
unsigned long flags;
spin_lock_irqsave(&rtc->irq_lock, flags);
rtc->uie_timer_active = 0;
rtc->uie_task_active = 1;
if ((schedule_work(&rtc->uie_task) == 0))
rtc->uie_task_active = 0;
spin_unlock_irqrestore(&rtc->irq_lock,... | false | false | false | false | false | 0 |
getPluginDetails (xmlNodePtr node, GGobiPluginDetails * plugin, xmlDocPtr doc)
{
gboolean load = false;
const xmlChar *tmp;
GGobiPluginDetails *symInfo = plugin;
xmlChar *val;
xmlNodePtr el;
tmp = xmlGetProp (node, (xmlChar *) "name");
if (tmp) {
plugin->name = g_strdup ((char *) tmp);
}
tmp = x... | false | false | false | false | false | 0 |
lkdtm_debugfs_read(struct file *f, char __user *user_buf,
size_t count, loff_t *off)
{
char *buf;
int i, n, out;
buf = (char *)__get_free_page(GFP_KERNEL);
if (buf == NULL)
return -ENOMEM;
n = snprintf(buf, PAGE_SIZE, "Available crash types:\n");
for (i = 0; i < ARRAY_SIZE(cp_type); i++)
n += snprintf(buf... | false | false | false | false | false | 0 |
find_language_template(const char *languageName)
{
PLTemplate *result;
Relation rel;
SysScanDesc scan;
ScanKeyData key;
HeapTuple tup;
rel = heap_open(PLTemplateRelationId, AccessShareLock);
ScanKeyInit(&key,
Anum_pg_pltemplate_tmplname,
BTEqualStrategyNumber, F_NAMEEQ,
NameGetDatum(languageName));... | false | false | false | false | false | 0 |
find_file(dist_t *dist, /* I - Distribution to search */
const char *dst) /* I - Destination filename */
{
int i; /* Looping var */
file_t *file; /* Current file */
for (i = dist->num_files, file = dist->files; i > 0; i --, file ++)
if (strcmp(file->dst, dst) == 0)
return (file);
r... | false | false | false | false | false | 0 |
tetra_vol ARGS4((a,b,c,d),
REAL *a, REAL *b, REAL *c, REAL *d)
{ REAL bb[3],cc[3],dd[3];
REAL vol;
int i;
for ( i = 0 ; i < 3 ; i++ )
{ bb[i] = b[i] - a[i];
cc[i] = c[i] - a[i];
dd[i] = d[i] - a[i];
}
vol = (bb[0]*(cc[1]*dd[2] - cc[2]*dd[1]) + bb[1]*(cc[2]*dd[0] - cc[0]*dd[2])
+ bb[2]*(cc[0]*d... | false | false | false | false | false | 0 |
BusyWait(double period) {
double start_time = TimerNow();
while (TimerNow() - start_time < period) {
}
return TimerNow() - start_time;
} | false | false | false | false | false | 0 |
waitWithUpdate( int millisecs )
{
int frameDelay;
if ( CGameOptions::Instance()->video.ascframeratelimit > 0 )
frameDelay = 100 / CGameOptions::Instance()->video.ascframeratelimit ;
else
frameDelay = 10;
int t = ticker;
do {
int t2 = ticker;
do {
releasetimeslice();... | false | false | false | false | false | 0 |
tool_load_selection (GenericToolState *state, gboolean allow_multiple)
{
GnmRange const *first = selection_first_range (state->sv, NULL, NULL);
if (first != NULL) {
if (allow_multiple) {
char *text = selection_to_string (state->sv, TRUE);
gnm_expr_entry_load_from_text (state->input_entry,
text);
g... | 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.