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 |
|---|---|---|---|---|---|---|
PyMemoTable_Get(PyMemoTable *self, PyObject *key)
{
PyMemoEntry *entry = _PyMemoTable_Lookup(self, key);
if (entry->me_key == NULL)
return NULL;
return &entry->me_value;
} | false | false | false | false | false | 0 |
pgstat_recv_vacuum(PgStat_MsgVacuum *msg, int len)
{
PgStat_StatDBEntry *dbentry;
PgStat_StatTabEntry *tabentry;
/*
* Store the data in the table's hashtable entry.
*/
dbentry = pgstat_get_db_entry(msg->m_databaseid, true);
tabentry = pgstat_get_tab_entry(dbentry, msg->m_tableoid, true);
tabentry->n_live_t... | false | false | false | false | false | 0 |
history_set_history_state (state)
HISTORY_STATE *state;
{
the_history = state->entries;
history_offset = state->offset;
history_length = state->length;
history_size = state->size;
if (state->flags & HS_STIFLED)
history_stifled = 1;
} | false | false | false | false | false | 0 |
libpdrecanything(t_libpdrec *x, t_symbol *s,
int argc, t_atom *argv) {
if (libpd_messagehook)
(*libpd_messagehook)(x->x_sym->s_name, s->s_name, argc, argv);
} | false | false | false | false | false | 0 |
rhash_final(rhash ctx, unsigned char* first_result)
{
unsigned i = 0;
unsigned char buffer[130];
unsigned char* out = (first_result ? first_result : buffer);
assert(ctx->hash_vector_size <= RHASH_HASH_COUNT);
/* call final method for every algorithm */
for(i = 0; i < ctx->hash_vector_size; i++) {
struct rhash_... | false | false | false | false | false | 0 |
GetOffsetFromIndex(const GEPOperator *GEP, unsigned Idx,
bool &VariableIdxFound,
const DataLayout &DL) {
// Skip over the first indices.
gep_type_iterator GTI = gep_type_begin(GEP);
for (unsigned i = 1; i != Idx; ++i, ++GTI)
/*skip along*/;
... | false | false | false | false | false | 0 |
print_range(const struct nf_nat_ipv4_range *r)
{
if (r->flags & NF_NAT_RANGE_MAP_IPS) {
struct in_addr a;
a.s_addr = r->min_ip;
printf("%s", xtables_ipaddr_to_numeric(&a));
if (r->max_ip != r->min_ip) {
a.s_addr = r->max_ip;
printf("-%s", xtables_ipaddr_to_numeric(&a));
}
}
if (r->flags & NF_NAT_RAN... | false | false | false | false | false | 0 |
cliMatch_destroyChain(CliMatch *match, const char *oppName,
int *hcap, float *komi, bool *free) {
bool result = FALSE;
/*
* This code wouldn't work if things were done right in the but library
* and the windows were destroyed as soon as I asked for it. But since
* the library is too broken f... | false | false | false | false | false | 0 |
removeMap(const QString & name)
{
for (int i = 0; i < _maps.size(); i++)
{
if(_maps.at(i).name() == name)
{
_maps.removeAt(i);
return TRUE;
}
}
return FALSE;
} | false | false | false | false | false | 0 |
pio2_set_led(struct pio2_card *card, int state)
{
u8 reg;
int retval;
reg = card->irq_level;
/* Register state inverse of led state */
if (!state)
reg |= PIO2_LED;
if (loopback)
reg |= PIO2_LOOP;
retval = vme_master_write(card->window, ®, 1, PIO2_REGS_CTRL);
if (retval < 0)
return retval;
card->l... | false | false | false | false | false | 0 |
register_one_unit(xlnk_script *s, xlnk_script_command *c, void *arg)
{
const char *file;
int *i;
xunit *xu;
require_arg(s, c, "file", file);
/* arg is pointer to unit index */
i = (int *)arg;
/* Get pointer to xunit to fill in */
xu = &units[*i];
/* Read basic unit from file */
i... | false | false | false | false | false | 0 |
squashfs_cache_delete(struct squashfs_cache *cache)
{
int i, j;
if (cache == NULL)
return;
for (i = 0; i < cache->entries; i++) {
if (cache->entry[i].data) {
for (j = 0; j < cache->pages; j++)
kfree(cache->entry[i].data[j]);
kfree(cache->entry[i].data);
}
kfree(cache->entry[i].actor);
}
kfree(... | false | false | false | false | false | 0 |
torch_Timer_time(lua_State *L)
{
Timer *timer = luaT_checkudata(L, 1, torch_Timer_id);
double returnTime = (timer->isRunning ? (timer->totalTime + torch_Timer_runTime() - timer->startTime) : timer->totalTime);
lua_pushnumber(L, returnTime);
return 1;
} | false | false | false | false | false | 0 |
shiftAttribute(QDomElement & element, const char * attributeName, double d)
{
double n = element.attribute(attributeName).toDouble() + d;
element.setAttribute(attributeName, QString::number(n));
return true;
} | false | false | false | false | false | 0 |
gamgi_gtk_plane_measure_press (gamgi_window *window_mouse,
GdkEventButton *event, int x, int y, gamgi_window *window_dialog)
{
/******************************
* local mouse selection only *
******************************/
if (window_dialog != window_mouse) return;
gamgi_mesa_select_object (window_mouse, x, y,
stat... | false | false | false | false | false | 0 |
SelectDouble(ListTreeWidget w)
#else
static void SelectDouble(w)
ListTreeWidget w;
#endif
{
ListTreeActivateStruct ret;
TreeCheck(w, "in SelectDouble");
if (w->list.timer_item) {
w->list.timer_type = TIMER_DOUBLE;
w->list.timer_item->open = !w->list.timer_item->open;
w->list.highlighted = w-... | false | false | false | false | false | 0 |
squaredResidual(VectorArray<double> const& e)
{
int const N = e.count();
int const M = e.size();
double res = 0.0;
for (int n = 0; n < N; ++n)
for (int m = 0; m < M; ++m)
res += e[n][m] * e[n][m];
return res;
} | false | false | false | false | false | 0 |
paint_setup_UYVP (paintinfo * p, unsigned char *dest)
{
p->ap = dest;
p->yp = dest + 0;
p->up = dest + 0;
p->vp = dest + 0;
p->ystride = GST_ROUND_UP_4 ((p->width * 2 * 5 + 3) / 4);
GST_ERROR ("stride %d", p->ystride);
p->endptr = dest + p->ystride * p->height;
} | false | false | false | false | false | 0 |
Buffer_copy(Buffer *buffer, unsigned char *data, size_t size) {
if (!buffer || !data) {
return 0;
}
if (size > buffer->size) {
return 0;
}
size_t i, to_copy, copied = 0;
BufferCell *buffer_cell;
unsigned char *offset = data;
unsigned char *result = data;
for (i = 0; i < buffer->cell_count; ... | false | false | false | false | false | 0 |
marker_inode_loc_fill (inode_t *inode, loc_t *loc)
{
char *resolvedpath = NULL;
inode_t *parent = NULL;
int ret = -1;
if ((!inode) || (!loc))
return ret;
if ((inode) && __is_root_gfid (inode->gfid)) {
... | false | false | false | false | false | 0 |
appendChart(GcWinID id)
{
// GcWindowDialog is delete on close, so no need to delete
GcWindowDialog *f = new GcWindowDialog(id, mainWindow);
GcWindow *newone = f->exec();
// returns null if cancelled or closed
if (newone) {
addChart(newone);
newone->show();
}
// now wipe it... | false | false | false | false | false | 0 |
clock_map_render_shadow_pixbuf (GdkPixbuf *pixbuf)
{
int x, y;
int height, width;
int n_channels, rowstride;
guchar *pixels, *p;
gdouble sun_lat, sun_lon;
time_t now = time (NULL);
n_channels = gdk_pixbuf_get_n_channels (pixbuf);
rowstride = gdk_pixbuf_ge... | false | false | false | false | false | 0 |
authenticateTryToAuthenticateAndSetAuthUser(auth_user_request_t ** auth_user_request, http_hdr_type headertype, request_t * request, ConnStateData * conn, struct in_addr src_addr)
{
/* If we have already been called, return the cached value */
auth_user_request_t *t = authTryGetUser(auth_user_request, conn, req... | false | false | false | false | false | 0 |
load_config_from_file(const gchar *utf8_path, gboolean startup)
{
gsize size;
gchar *buf;
gboolean ret = TRUE;
if (g_file_get_contents(utf8_path, &buf, &size, NULL) == FALSE)
{
return FALSE;
}
ret = load_config_from_buf(buf, size, startup);
g_free(buf);
return ret;
} | false | false | false | false | false | 0 |
insert_extra_modulo_guards(
CloogConstraintSet *constraints, int level,
struct clast_stmt ***next, CloogInfos *infos)
{
int i;
int nb_iter;
int total_dim;
CloogConstraint *upper, *lower;
total_dim = cloog_constraint_set_total_dimension(constraints);
nb_iter = cloog_constraint_set_n_iterators(... | false | false | false | false | false | 0 |
Cns_get_usrinfo_by_uid(dbfd, uid, user_entry, lock, rec_addr)
struct Cns_dbfd *dbfd;
uid_t uid;
struct Cns_userinfo *user_entry;
int lock;
Cns_dbrec_addr *rec_addr;
{
char func[23];
int i = 0;
static char query[] =
"SELECT USERID, USERNAME, USER_CA, BANNED FROM Cns_userinfo \
WHERE userid = %d";
static char que... | false | false | false | false | false | 0 |
get_all_column_privs(dbTable * table, int (*get_column_priv) ())
{
int priv, col, ncols;
dbColumn *column;
ncols = db_get_table_number_of_columns(table);
for (col = 0; col < ncols; col++) {
column = db_get_table_column(table, col);
priv = get_column_priv(column);
if (priv != DB_GRANTED)
return ... | false | false | false | false | false | 0 |
Validate(FreeImageIO *io, fi_handle handle) {
char buf[6];
if( io->read_proc(buf, 6, 1, handle) < 1 ) {
return FALSE;
}
BOOL bResult = FALSE;
if( !strncmp(buf, "GIF", 3) ) {
if( buf[3] >= '0' && buf[3] <= '9' && buf[4] >= '0' && buf[4] <= '9' && buf[5] >= 'a' && buf[5] <= 'z' ) {
bResult = TRUE;
}
}
i... | false | false | false | false | false | 0 |
getMatch(int n, int flags)
{
// This method used to be implemented in terms of
// pcre_get_substring, but that function gives you an empty string
// for an unmatched backreference that is in range.
int offset;
int length;
try
{
getOffsetLength(n, offset, length);
}
catch (NoBackref... | false | false | false | false | false | 0 |
driver_set_config_work(struct work_struct *work)
{
struct set_config_request *req =
container_of(work, struct set_config_request, work);
struct usb_device *udev = req->udev;
usb_lock_device(udev);
spin_lock(&set_config_lock);
list_del(&req->node);
spin_unlock(&set_config_lock);
if (req->config >= -1) /* Is ... | false | false | false | false | false | 0 |
verify_region (const CoglGLES2Vtable *gles2,
int x,
int y,
int width,
int height,
uint32_t expected_pixel)
{
uint8_t *buf, *p;
buf = g_malloc (width * height * 4);
gles2->glReadPixels (x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buf)... | false | false | false | false | false | 0 |
render_cursor (GstVMncDec * dec, guint8 * data)
{
/* First, figure out the portion of the cursor that's on-screen */
/* X,Y of top-left of cursor */
int x = dec->cursor.x - dec->cursor.hot_x;
int y = dec->cursor.y - dec->cursor.hot_y;
/* Width, height of rendered portion of cursor */
int width = dec->curso... | false | false | false | false | false | 0 |
SuiteSparseQR_C // returns rank(A) estimate, (-1) if failure
(
// inputs:
int ordering, // all, except 3:given treated as 0:fixed
double tol, // columns with 2-norm <= tol are treated as 0
Long econ, // e = max(min(m,econ),rank(A))
int getCTX, ... | false | false | false | false | false | 0 |
visu_box_convertFullToCell(VisuBox *box, float cell[3], float full[3])
{
g_return_if_fail(VISU_IS_BOX(box));
if (box->priv->fromFullToCell[0][0] != G_MAXFLOAT)
tool_matrix_productVector(cell, box->priv->fromFullToCell, full);
else
{
cell[0] = full[0];
cell[1] = full[1];
cell[2] = full[2... | false | false | false | false | false | 0 |
end_result_backtrace_entry (CutStreamParser *parser,
CutStreamParserPrivate *priv,
GMarkupParseContext *context,
const gchar *element_name, GError **error)
{
if (!priv->backtrace_entry)
return; /* should check file name, lin... | false | false | false | false | false | 0 |
clk_core_prepare(struct clk_core *core)
{
int ret = 0;
lockdep_assert_held(&prepare_lock);
if (!core)
return 0;
if (core->prepare_count == 0) {
ret = clk_core_prepare(core->parent);
if (ret)
return ret;
trace_clk_prepare(core);
if (core->ops->prepare)
ret = core->ops->prepare(core->hw);
trac... | false | false | false | false | false | 0 |
PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid)
{
if (PKCS7_get_signed_attribute(si, NID_pkcs9_contentType))
return 0;
if (!coid)
coid = OBJ_nid2obj(NID_pkcs7_data);
return PKCS7_add_signed_attribute(si, NID_pkcs9_contentType,
V_ASN1_OBJECT, coid);
} | false | false | false | false | false | 0 |
createListContent(void)
{
using namespace CEGUI;
WindowManager& winMgr = WindowManager::getSingleton();
//
// Combobox setup
//
Combobox* cbobox = static_cast<Combobox*>(winMgr.getWindow("Demo7/Window2/Combobox"));
// add items to the combobox list
cbobox->addItem(new MyListItem("Combo... | false | false | false | false | false | 0 |
finish_pass_gather (j_compress_ptr cinfo)
{
j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec;
shuff_entropy_ptr entropy = (shuff_entropy_ptr) lossyc->entropy_private;
int ci, dctbl, actbl;
jpeg_component_info * compptr;
JHUFF_TBL **htblptr;
boolean did_dc[NUM_HUFF_TBLS];
boolean did_ac[NUM_HUFF_TBLS];
... | false | false | false | false | false | 0 |
onenand_lock_user_prot_reg(struct mtd_info *mtd, loff_t from,
size_t len)
{
struct onenand_chip *this = mtd->priv;
u_char *buf = FLEXONENAND(this) ? this->page_buf : this->oob_buf;
size_t retlen;
int ret;
unsigned int otp_lock_offset = ONENAND_OTP_LOCK_OFFSET;
memset(buf, 0xff, FLEXONENAND(this) ? this->write... | false | false | false | false | false | 0 |
on_project_element_added (IAnjutaProjectManager *pm, GFile *gfile,
SymbolDBPlugin *sdb_plugin)
{
gchar *filename;
gint real_added;
GPtrArray *files_array;
g_return_if_fail (sdb_plugin->project_root_uri != NULL);
g_return_if_fail (sdb_plugin->project_root_dir != NULL);
filename = g_file_get_path (gf... | false | false | false | false | false | 0 |
compute_all_net_distances(struct Map_info *In, struct Map_info *Net,
double netmax, double **dists, double dmax)
{
int nn, kk, nalines, aline;
double dist;
struct line_pnts *Points;
BOUND_BOX box;
struct ilist *List;
Points = Vect_new_line_struct();
List = Vect_new_list();
nn = Ve... | false | false | false | false | false | 0 |
dht_layout_new (xlator_t *this, int cnt)
{
dht_layout_t *layout = NULL;
dht_conf_t *conf = NULL;
conf = this->private;
layout = GF_CALLOC (1, layout_size (cnt),
gf_dht_mt_dht_layout_t);
if (!layout) {
goto out;
}
l... | false | false | false | false | false | 0 |
operator<< (char c) {
char temp[2];
temp[0] = c;
temp[1] = 0;
stringtemp += std::string(temp);
return (*this);
} | false | false | false | false | false | 0 |
gsb_data_payee_set_description ( gint no_payee,
const gchar *description )
{
struct_payee *payee;
payee = gsb_data_payee_get_structure ( no_payee );
if (!payee)
return FALSE;
/* we free the last name */
if ( payee -> payee_description )
g_free (payee -> payee_description);
/* an... | false | false | false | false | false | 0 |
addpatchvalues(struct patchinfo *p)
{
int p2p = p->p2p;
addpatchstring("WATCHDOG", "1");
addpatchbyte("AutoFrame", 1);
switch (p->protocol) {
case DP_CT1:
addpatchbyte("PROTOCOL", 1);
break;
case DP_VN3:
addpatchbyte("PROTOCOL", 2);
break;
case DP_NI1:
... | false | false | false | false | false | 0 |
pmcraid_worker_function(struct work_struct *workp)
{
struct pmcraid_instance *pinstance;
struct pmcraid_resource_entry *res;
struct pmcraid_resource_entry *temp;
struct scsi_device *sdev;
unsigned long lock_flags;
unsigned long host_lock_flags;
u16 fw_version;
u8 bus, target, lun;
pinstance = container_of(wor... | false | false | false | false | false | 0 |
fop_lookup_cbk_stub (call_frame_t *frame, fop_lookup_cbk_t fn,
int32_t op_ret, int32_t op_errno,
inode_t *inode, struct iatt *buf,
dict_t *xdata, struct iatt *postparent)
{
call_stub_t *stub = NULL;
GF_VALIDATE_OR_GOTO ("call-stub", frame, ... | false | false | false | false | false | 0 |
CGUtil_print_header(Codegen *codegen, C4_Model *model){
register gint i;
Codegen_printf(codegen,
"/* Code automatically generated by C4 DP library\n"
" * Do not attempt to edit this code: it is spagetti.\n"
" *\n"
" * Model: %s\n"
" */\n\n"
" /* ---< START >--- */... | false | false | false | false | false | 0 |
GListFSelectOne(GGadget *g, int32 pos) {
GListField *gl = (GListField *) g;
int i;
for ( i=0; i<gl->ltot; ++i )
gl->ti[i]->selected = false;
if ( pos>=gl->ltot ) pos = gl->ltot-1;
if ( pos<0 ) pos = 0;
if ( gl->ltot>0 ) {
gl->ti[pos]->selected = true;
GTextFieldSetTitle(g,gl->ti[pos]->text);... | false | false | false | false | false | 0 |
yesCB (gftp_transfer * transfer, gftp_dialog_data * ddata)
{
gftpui_callback_data * cdata;
gftp_window_data * wdata;
g_return_if_fail (transfer != NULL);
g_return_if_fail (transfer->files != NULL);
wdata = transfer->fromwdata;
cdata = g_malloc0 (sizeof (*cdata));
cdata->request = wdata->request;
cdat... | false | false | false | false | false | 0 |
ImportTMG(FILE * pf, const char *UNUSED(szFilename))
{
int fCrawfordRule = TRUE;
int fJacobyRule = TRUE;
int fAutoDoubles = 0;
int nLength = 0;
int fCrawford = FALSE;
int fCubeUse = TRUE;
int n0 = 0, n1 = 0;
int i = 0, j;
int post_crawford = FALSE;
char sz[80];
bgvariation bg... | false | false | false | false | false | 0 |
play_soundtrack (void)
{
if (nosound)
return;
if (sound_track_loaded) {
dmsg (D_SOUND_TRACK, "start playing sound track");
Mix_PlayMusic (module, -1);
sound_track_playing = 1;
}
} | false | false | false | false | false | 0 |
update()
{
Config *config = Config::instance();
PowerUp *pwrUp;
PowerUp *delUp;
pwrUp = pwrUpRoot->next;
while( pwrUp )
{
pwrUp->age++;
pwrUp->pos[1] += (speed*game->speedAdj);
if(pwrUp->vel[0] || pwrUp->vel[1])
{
float s = (1.0-game->speedAdj)+(game->speedAdj*0.982);
pwrUp->vel[0] *= s;
pwrUp-... | false | false | false | false | false | 0 |
__create_base_blobdir(const gchar *path)
{
if (path == NULL)
return FALSE;
if (g_str_equal(path, ""))
return FALSE;
if (g_file_test(path, G_FILE_TEST_EXISTS))
return TRUE;
gchar *dir_path = g_path_get_dirname(path);
gint rv = g_mkdir_with_parents((const gchar *)dir_path, 0711);
if (dir_path)
g_f... | false | false | false | false | false | 0 |
grab_one(const nstring &project_name)
{
//
// get details of the project
// to put in the structure
//
project_ty *pp = project_alloc(project_name.get_ref());
pp->bind_existing();
rpt_value_struct *rsp = new rpt_value_struct();
rpt_value::pointer result(rsp);
nstring pn(project_name... | false | false | false | false | false | 0 |
close_stdio(void)
{
int fd;
if ((fd = open("/dev/null", O_RDWR, 0)) < 0)
{
return;
}
else
{
if (dup2(fd, STDIN_FILENO) < 0)
{
return;
}
if (dup2(fd, STDOUT_FILENO) < 0)
{
return;
}
if (dup2(fd, STDERR_FILENO) < 0)
{
return;
}
if (fd > STDERR_F... | false | false | false | false | false | 0 |
Append_Entry(entry** Entry, char *Variable, char* Value, section *SubSection, int Flag)
{
if (Entry == NULL)
return NULL;
if ((Value != NULL && SubSection != NULL) || (Value == NULL && SubSection == NULL))
return NULL;
while ((*Entry) != NULL)
{
if (!strcmp((*Entry)->name,Variable))
{
if (Flag & C_OVER... | false | false | false | false | false | 0 |
set_boot_order()
{
efi_variable_t boot_order;
uint16_t *n = (uint16_t *)boot_order.Data;
if (!opts.bootorder) return EFI_SUCCESS;
memset(&boot_order, 0, sizeof(boot_order));
fill_var(&boot_order, "BootOrder");
boot_order.DataSize = parse_boot_order(opts.bootorder, n, 1024/sizeof(uint16_t)) * sizeof(uint16_t);
... | false | false | false | false | false | 0 |
set_inout_sides (double x, double y, double wesn[], GMT_LONG sideXY[2]) {
/* Given the rectangular region in wesn, return -1, 0, +1 for
* x and y if the point is left/below (-1) in (0), or right/above (+1).
*
*/
if (y < wesn[2])
sideXY[1] = -1;
else if (y > wesn[3])
sideXY[1] = +1;
else
sideXY[1] = ... | false | false | false | false | false | 0 |
_vala_main (gchar** args, int args_length1) {
gint result = 0;
gint res = 0;
gint _tmp3_ = 0;
GError * _inner_error_ = NULL;
g_test_init (&args_length1, &args, NULL);
{
mock_service_start ("mock-service-normal.py", &_inner_error_);
if (_inner_error_ != NULL) {
goto __catch7_g_error;
}
}
goto __finally7... | false | false | false | false | false | 0 |
report_timeout_period(remote_fencing_op_t * op, int op_timeout)
{
GListPtr iter = NULL;
xmlNode *update = NULL;
const char *client_node = NULL;
const char *client_id = NULL;
const char *call_id = NULL;
if (op->call_options & st_opt_sync_call) {
/* There is no reason to report the timeou... | false | false | false | false | false | 0 |
bfa_flash_status_read(void __iomem *pci_bar)
{
union bfa_flash_dev_status_reg_u dev_status;
int status;
u32 ret_status;
int i;
status = bfa_flash_fifo_flush(pci_bar);
if (status < 0)
return status;
bfa_flash_set_cmd(pci_bar, 0, 4, 0, BFA_FLASH_READ_STATUS);
for (i = 0; i < BFA_FLASH_CHECK_MAX; i++)... | false | false | false | false | false | 0 |
tracker_sparql_builder_delete_open (TrackerSparqlBuilder* self, const gchar* graph) {
TrackerSparqlBuilderState _tmp0_ = 0;
TrackerSparqlBuilderState _tmp1_ = 0;
TrackerSparqlBuilderState* _tmp2_ = NULL;
gint _tmp2__length1 = 0;
const gchar* _tmp3_ = NULL;
#line 263 "/home/martyn/Source/checkout/gnome/tracker/src/... | false | false | false | false | false | 0 |
rb_class_path(klass)
VALUE klass;
{
VALUE path = classname(klass);
if (!NIL_P(path)) return path;
if (RCLASS(klass)->iv_tbl && st_lookup(RCLASS(klass)->iv_tbl,
tmp_classpath, &path)) {
return path;
}
else {
char *s = "Class";
size_t len;
if (TYPE(klass) == T_MODULE) {
if (rb_o... | false | false | false | false | false | 0 |
binlog_commit_flush_trx_cache(THD *thd, binlog_cache_mngr *cache_mngr,
my_xid xid)
{
Xid_log_event end_evt(thd, xid);
return (binlog_flush_cache(thd, &cache_mngr->trx_cache, &end_evt,
TRUE));
} | false | false | false | false | false | 0 |
mono_seq_point_iterator_next (SeqPointIterator* it)
{
if (it->ptr >= it->end)
return FALSE;
it->ptr += seq_point_read (&it->seq_point, it->ptr, it->begin, it->has_debug_data);
return TRUE;
} | false | false | false | false | false | 0 |
keycode_to_string(KeyCode keycode, GtkWidget* widget)
{
gchar *keyname;
KeySym sym;
Display *display;
keyname = NULL;
display = widget ? GDK_DISPLAY_XDISPLAY(gtk_widget_get_display(widget)) : GDK_DISPLAY();
sym = XKeycodeToKeysym(display, keycode, 0);
if (sym != NoSymbol)
keyname = ... | false | false | false | false | false | 0 |
get_table(const string &name)
{
if (d_container) {
return d_container->get_attr_table(name);
}
return d_attrs.get_attr_table(name);
} | false | false | false | false | false | 0 |
cph_iface_mechanism_call_devices_get_sync (
CphIfaceMechanism *proxy,
gint arg_timeout,
gint arg_limit,
const gchar *const *arg_include_schemes,
const gchar *const *arg_exclude_schemes,
gchar **out_error,
GVariant **out_devices,
GCancellable *cancellable,
GError **error)
{
GVariant... | false | false | false | false | false | 0 |
intel_commit_scheduling(struct cpu_hw_events *cpuc, int idx, int cntr)
{
struct intel_excl_cntrs *excl_cntrs = cpuc->excl_cntrs;
struct event_constraint *c = cpuc->event_constraint[idx];
struct intel_excl_states *xl;
int tid = cpuc->excl_thread_id;
if (cpuc->is_fake || !is_ht_workaround_enabled())
return;
if ... | false | false | false | false | false | 0 |
setVariable(const char * const variableName,
const int * const groupcodes,
const dimeParam * const params,
const int numparams,
dimeMemHandler * const memhandler)
{
int i = findVariable(variableName);
if (i < 0) {
i = this->records.count();
dimeStringRecord *sr = (dimeStr... | false | false | false | false | false | 0 |
elementprint(Arc::XMLNode element,const std::string& ns,const std::string& ntype,std::ostream& h_file,std::ostream& cpp_file,std::string& complex_file_constructor_cpp) {
std::string etype = element.Attribute("type");
elementprintnamed(etype,element,ns,ntype,h_file,cpp_file,complex_file_constructor_cpp);
} | false | false | false | false | false | 0 |
test_engine_unavailable_plugin (PeasEngine *engine)
{
PeasPluginInfo *info;
testing_util_push_log_hook ("Could not find plugin 'does-not-exist'*");
info = peas_engine_get_plugin_info (engine, "unavailable");
g_assert (!peas_engine_load_plugin (engine, info));
g_assert (!peas_plugin_info_is_loaded (info));
... | false | false | false | false | false | 0 |
setTemplateFile(QString filename)
{
if(filename.isEmpty())
{
switch(m_outputType)
{
case Html:
filename = DEFAULT_HTML_TEMPLATE;
break;
case Latex:
filename = DEFAULT_LATEX_TEMPLATE;
break;
case NotationWidget:
f... | false | false | false | false | false | 0 |
AcpiNsSortList (
ACPI_OPERAND_OBJECT **Elements,
UINT32 Count,
UINT32 Index,
UINT8 SortDirection)
{
ACPI_OPERAND_OBJECT *ObjDesc1;
ACPI_OPERAND_OBJECT *ObjDesc2;
ACPI_OPERAND_OBJECT *TempObj;
UINT32 i;
... | false | false | false | false | false | 0 |
GNUNET_DISK_directory_scan (const char *dirName,
GNUNET_FileNameCallback callback,
void *callback_cls)
{
DIR *dinfo;
struct dirent *finfo;
struct stat istat;
int count = 0;
char *name;
char *dname;
unsigned int name_len;
unsigned int n_size;
GNU... | false | false | false | false | false | 0 |
initialize()
{
const qreal dist_x = 1.11;
const qreal smallNeg = -1e-6;
setDeckContents();
talon = new PatPile( this, 0, "talon" );
talon->setPileRole(PatPile::Stock);
talon->setLayoutPos(0, smallNeg);
talon->setSpread(0, 0);
talon->setKeyboardSelectHint( KCardPile::NeverFocus );
t... | false | false | false | false | false | 0 |
stv0288_init(struct dvb_frontend *fe)
{
struct stv0288_state *state = fe->demodulator_priv;
int i;
u8 reg;
u8 val;
dprintk("stv0288: init chip\n");
stv0288_writeregI(state, 0x41, 0x04);
msleep(50);
/* we have default inittab */
if (state->config->inittab == NULL) {
for (i = 0; !(stv0288_inittab[i] == 0xff ... | false | false | false | false | false | 0 |
mgt_SHM_Create(void)
{
size_t size;
void *p;
char fnbuf[64];
int vsm_fd;
AZ(heritage.vsm);
size = mgt_shm_size();
bprintf(fnbuf, "%s.%jd", VSM_FILENAME, (intmax_t)getpid());
vsm_fd = vsm_zerofile(fnbuf, size);
if (vsm_fd < 0)
exit(1);
p = (void *)mmap(NULL, size,
PROT_READ|PROT_WRITE,
MAP_HASS... | false | false | false | false | false | 0 |
CPLDefaultErrorHandler( CPLErr eErrClass, int nError,
const char * pszErrorMsg )
{
static int bLogInit = FALSE;
static FILE * fpLog = stderr;
static int nCount = 0;
static int nMaxErrors = -1;
if (eErrClass != CE_Debug)
{
if( nMaxError... | false | false | false | false | false | 0 |
create_contact(const char *con, int type)
{
struct contact *c = calloc(1, sizeof(struct contact));
if (con != NULL)
strncpy(c->nick, con, sizeof(c->nick));
c->default_chatb = c->default_filetransb = type;
return (c);
} | false | false | false | false | false | 0 |
bnx2x_alloc_fp_mem(struct bnx2x *bp)
{
int i;
/* 1. Allocate FP for leading - fatal if error
* 2. Allocate RSS - fix number of queues if error
*/
/* leading */
if (bnx2x_alloc_fp_mem_at(bp, 0))
return -ENOMEM;
/* RSS */
for_each_nondefault_eth_queue(bp, i)
if (bnx2x_alloc_fp_mem_at(bp, i))
break;
... | false | false | false | false | false | 0 |
gs_copy_glyph_options(gs_font *font, gs_glyph glyph, gs_font *copied,
int options)
{
int code;
#define MAX_GLYPH_PIECES 64 /* arbitrary, but 32 is too small - bug 687698. */
gs_glyph glyphs[MAX_GLYPH_PIECES];
uint count = 1, i;
if (copied->procs.font_info != copied_font_info)
... | false | false | false | false | false | 0 |
translate_page_flags(char *buffer, ulong flags)
{
char buf[BUFSIZE];
int i, others;
sprintf(buf, "%lx", flags);
if (flags) {
for (i = others = 0; i < vt->nr_pageflags; i++) {
if (flags & vt->pageflags_data[i].mask)
sprintf(&buf[strlen(buf)], "%s%s",
others++ ? "," : " ",
vt->pageflags_data[i].n... | true | true | false | false | false | 1 |
SHA512_Final(SHA512_State *s, unsigned char *digest) {
int i;
int pad;
unsigned char c[BLKSIZE];
uint32 len[4];
if (s->blkused >= BLKSIZE-16)
pad = (BLKSIZE-16) + BLKSIZE - s->blkused;
else
pad = (BLKSIZE-16) - s->blkused;
for (i = 4; i-- ;) {
uint32 lenhi = s->len[i];
ui... | false | false | false | false | false | 0 |
gotincl()
{
token822_reverse(&tokaddr);
if (token822_unquote(&address,&tokaddr) != 1) nomem();
tokaddr.len = 0;
if (!address.len)
strerr_die2x(111,FATAL,"empty :include: filenames not permitted");
if (byte_chr(address.s,address.len,'\0') < address.len)
strerr_die2x(111,FATAL,"NUL not permitted in :in... | false | false | false | false | false | 0 |
getResource ( const Resources& res ) const
{
Resources result;
for ( int i = 0; i < resourceNum; i++ )
result.resource(i) = getAvailableResource ( res.resource(i), i );
return result;
} | false | false | false | false | false | 0 |
add_group(struct group *grp, gid_t **groups_res, char*** group_names_res, int* ngroups_res, int* maxgroups_res) {
int ngroups = *ngroups_res;
int maxgroups = *maxgroups_res;
gid_t *groups = *groups_res;
char** group_names = *group_names_res;
if (ngroups >= maxgroups) {
gid_t *new_groups;
... | false | false | false | false | false | 0 |
csio_get_fcoe_resinfo(struct csio_hw *hw)
{
struct csio_fcoe_res_info *res_info = &hw->fres_info;
struct fw_fcoe_res_info_cmd *rsp;
struct csio_mb *mbp;
enum fw_retval retval;
mbp = mempool_alloc(hw->mb_mempool, GFP_ATOMIC);
if (!mbp) {
CSIO_INC_STATS(hw, n_err_nomem);
return -ENOMEM;
}
/* Get FCoE FW re... | false | false | false | false | false | 0 |
tlg_has_seq_loop(LoopDat *lpdat_head, IntSet mt_set)
{
LoopDat *lpdat;
IntSet seq_loop_set;
copy_construct_IntSet(seq_loop_set, mt_set);
clear_IntSet(seq_loop_set);
for(lpdat = lpdat_head; lpdat != NULL; lpdat = lpdat->next){
if(lpdat->bpt->kind == LOOP)
add1_IntSet(seq_loop_se... | false | false | false | false | true | 1 |
bnx2x_warpcore_reset_lane(struct bnx2x *bp,
struct bnx2x_phy *phy,
u8 reset)
{
u16 val;
/* Take lane out of reset after configuration is finished */
bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD,
MDIO_WC_REG_DIGITAL5_MISC6, &val);
if (reset)
val |= 0xC000;
else
val &= 0x3FFF;
bnx2x_cl45_write(... | false | false | false | false | false | 0 |
gst_bayer2rgb_set_caps (GstBaseTransform * base, GstCaps * incaps,
GstCaps * outcaps)
{
GstBayer2RGB *bayer2rgb = GST_BAYER2RGB (base);
GstStructure *structure;
int val, bpp;
const char *format;
GST_DEBUG ("in caps %" GST_PTR_FORMAT " out caps %" GST_PTR_FORMAT, incaps,
outcaps);
structure = gst... | false | false | false | false | false | 0 |
IsMember(OBBond *b)
{
return((_pathset.BitIsOn(b->GetBeginAtomIdx()))&&(_pathset.BitIsOn(b->GetEndAtomIdx())));
} | false | false | false | false | false | 0 |
valid_varname(varname)
char_u *varname;
{
char_u *p;
for (p = varname; *p != NUL; ++p)
if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p))
&& *p != AUTOLOAD_CHAR)
{
EMSG2(_(e_illvar), varname);
return FALSE;
}
return TRUE;
} | false | false | false | false | false | 0 |
qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 9)
qt_static_metacall(this, _c, _id, _a);
_id -= 9;
}
#ifndef QT_NO_PROPERTIES
else if ... | false | false | false | false | false | 0 |
configure_rx_dma(uint32_t usart_index,
enum buffer_operations operation_performed)
{
freertos_pdc_rx_control_t *rx_buffer_definition;
rx_buffer_definition = &(rx_buffer_definitions[usart_index]);
/* How much space is there between the start of the DMA buffer and the
current read pointer? */
if (((uint32_t)rx... | false | false | false | false | false | 0 |
nameGetter(ExecState *exec, JSObject*, const Identifier& propertyName, const PropertySlot& slot)
{
Plugin *thisObj = static_cast<Plugin *>(slot.slotBase());
return thisObj->mimeByName(exec, propertyName.qstring());
} | false | false | false | false | false | 0 |
ptaGetPt(PTA *pta,
l_int32 index,
l_float32 *px,
l_float32 *py)
{
PROCNAME("ptaGetPt");
if (!pta)
return ERROR_INT("pta not defined", procName, 1);
*px = pta->x[index];
*py = pta->y[index];
return 0;
} | false | false | false | false | false | 0 |
log_scale(int cent, double set) {
if (cent == 0) {
return set;
} else if (cent < 2 && cent > -2) { // 1 cent
if (set<0.0) return set - 0.0155;
else return set + 0.0155;
} else if (cent < 3 && cent > -3) { // 2 cent
if (set<0.0) return set - 0.0265;
else return set + 0... | 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.