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 |
|---|---|---|---|---|---|---|
seek_nsv(bgav_demuxer_context_t * ctx, int64_t time, int scale)
{
int64_t frame_position;
uint32_t index_position;
int64_t file_position;
nsv_priv_t * priv;
gavl_time_t sync_time = GAVL_TIME_UNDEFINED;
bgav_stream_t * vs, *as;
nsv_sync_header_t sh;
uint32_t fourcc;
priv = ctx->priv;
if(!priv->f... | false | false | false | false | false | 0 |
jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
long total_bytes_needed)
{
if ((info->temp_file = tmpfile()) == NULL)
ERREXITS(cinfo, JERR_TFILE_CREATE, "");
info->read_backing_store = read_backing_store;
info->write_backing_store = write_backing_store;
info->close_backing_store = c... | false | false | false | false | true | 1 |
handleDropEvent(PlexyDesk::AbstractDesktopWidget *widget, QDropEvent *event)
{
const QString droppedFile = event->mimeData()->urls().value(0).toLocalFile();
QFileInfo fileInfo (droppedFile);
if (fileInfo.isDir()) {
QVariant path = droppedFile;
QVariantMap args;
args["path"] = path;
... | false | false | false | false | false | 0 |
send_to_helper (const gchar *str1,
const gchar *str2)
{
#ifdef PAH_DEBUG
fprintf (stderr, "polkit-agent-helper-1: writing `%s' to stdout\n", str1);
#endif /* PAH_DEBUG */
fprintf (stdout, "%s", str1);
#ifdef PAH_DEBUG
fprintf (stderr, "polkit-agent-helper-1: writing `%s' to stdout\n", str2);
#endi... | false | false | false | false | false | 0 |
irecv_finish_transfer(irecv_client_t client) {
int i = 0;
unsigned int status = 0;
if (check_context(client) != IRECV_E_SUCCESS) return IRECV_E_NO_DEVICE;
irecv_control_transfer(client, 0x21, 1, 0, 0, 0, 0, 1000);
for(i = 0; i < 3; i++){
irecv_get_status(client, &status);
}
irecv_reset(client);
return IREC... | false | false | false | false | false | 0 |
do_bin2hex (const void *buffer, size_t length, char *stringbuf, int with_colon)
{
const unsigned char *s;
char *p;
if (!stringbuf)
{
/* Not really correct for with_colon but we don't care about the
one wasted byte. */
size_t n = with_colon? 3:2;
size_t nbytes = n * length + 1;
... | false | false | false | false | false | 0 |
intersect_line_line(p_vertex v1, p_vertex v2, p_vertex w1, p_vertex w2)
{
double numerator = (w2->x - w1->x)*(v1->y - w1->y) - (w2->y - w1->y)*(v1->x - w1->x);
if (numerator == 0)
return 0;
else {
double denominator = (w2->y - w1->y)*(v2->x - v1->x) - (w2->x - w1->x)*(v2->y - v1->y);
return numerator/den... | false | false | false | false | false | 0 |
parse_version_num (ACEXML_Char*& str)
{
ACEXML_Char quote = this->get ();
if (quote != '\'' && quote != '"') // Not a quoted string.
return -1;
int numchars = 0;
while (1)
{
ACEXML_Char ch = this->get ();
if (ch == quote && !numchars)
return -1;
else if (ch == quote)
{... | false | false | false | false | false | 0 |
sendout(const char *s,int l,int proc) /* only process the quotechar, that's all */
{
int i;
if (!commented[iflevel])
for (i=0;i<l;i++) {
if (proc&&(s[i]!=0)&&(s[i]==S->User.quotechar))
{ i++; if (i==l) return; }
if (s[i]!=0) outchar(s[i]);
}
else
replace_definition_with_blank_l... | false | false | false | false | false | 0 |
system_wald_test (const equation_system *sys,
const gretl_matrix *R,
const gretl_matrix *q,
gretlopt opt,
PRN *prn)
{
const gretl_matrix *b = sys->b;
const gretl_matrix *V = sys->vcv;
if (b == NULL || V == NULL) {
gretl_errmsg_set("restrict: no estimates are available");
... | false | false | false | false | false | 0 |
luaG_concaterror (lua_State *L, StkId p1, StkId p2) {
if (ttisstring(p1)) p1 = p2;
lua_assert(!ttisstring(p1));
luaG_typeerror(L, p1, "concatenate");
} | false | false | false | false | false | 0 |
cosm_send_time(struct cosm_device *cdev)
{
struct cosm_msg msg = { .id = COSM_MSG_SYNC_TIME };
int rc;
getnstimeofday64(&msg.timespec);
rc = scif_send(cdev->epd, &msg, sizeof(msg), SCIF_SEND_BLOCK);
if (rc < 0)
dev_err(&cdev->dev, "%s %d scif_send failed rc %d\n",
__func__, __LINE__, rc);
} | false | false | false | false | false | 0 |
toString()
{
gint64 i64;
get(i64);
int i = i64 &0xfff;
char buff[256];
snprintf(buff,sizeof(buff),
"$%3x\n"
" FOSC=%d - Clk source = %s\n"
" WDTEN=%d - WDT is %s\n"
" CP=%d - Code protect is %s\n"
" MCLRE=%d - /MCLR is %s",
... | false | false | false | false | false | 0 |
ar5008_hw_rf_free_ext_banks(struct ath_hw *ah)
{
#define ATH_FREE_BANK(bank) do { \
free(bank); \
bank = NULL; \
} while (0);
ATH_FREE_BANK(ah->analogBank0Data);
ATH_FREE_BANK(ah->analogBank1Data);
ATH_FREE_BANK(ah->analogBank2Data);
ATH_FREE_BANK(ah->analogBank3Data);
ATH_FREE_BANK(ah->analogBank6Data);
AT... | false | false | false | false | false | 0 |
APar_ShowMPEG4AACProfileInfo(TrackInfo* track_info) {
if (track_info->descriptor_object_typeID == 1) {
fprintf(stdout, " MPEG-4 AAC Main Profile");
}
else if (track_info->descriptor_object_typeID == 2) {
fprintf(stdout, " MPEG-4 AAC Low Complexity Profile"); //most files will land here
... | false | false | false | false | false | 0 |
targetchain( TARGETS * chain, TARGETS * targets )
{
if ( !targets ) return chain;
if ( !chain ) return targets;
chain->tail->next = targets;
chain->tail = targets->tail;
return chain;
} | false | false | false | false | false | 0 |
do_mouse_over_list_weapon(int index)
{
Hot_weapon_icon = index;
int region_index = ICON_PRIMARY_0+index;
if ( index > 3 ) {
region_index = ICON_SECONDARY_0 + (index - 4);
}
if ( Wl_mouse_down_on_region != region_index ){
return;
}
if ( mouse_down(MOUSE_LEFT_BUTTON) )
wl_pick_icon_from_list(index);
} | false | false | false | false | false | 0 |
winopen(void)
{
GdkGeometry geom;
int defw;
int defh;
geom.min_width = gli_wmarginx * 2 + gli_cellw * 0;
geom.min_height = gli_wmarginy * 2 + gli_cellh * 0;
geom.max_width = gli_wmarginx * 2 + gli_cellw * 255;
geom.max_height = gli_wmarginy * 2 + gli_cellh * 250;
geom.width_... | false | false | false | false | false | 0 |
generateWithManualObject(SceneManager *sceneManager, const String &name, const String &material)
{
ManualObject* manual = sceneManager->createManualObject();
manual->begin(material, RenderOperation::OT_TRIANGLE_LIST);
for (VecVertex::const_iterator iter = mVertices.begin... | false | false | false | false | false | 0 |
jack_stop_freewheel (jack_client_t* client)
{
jack_client_control_t *control = client->control;
if (client->engine->real_time) {
#if JACK_USE_MACH_THREADS
jack_acquire_real_time_scheduling (client->process_thread,
client->engine->client_priority);
#else
jack_acquire_real_time_scheduling (client->thread,
... | false | false | false | false | false | 0 |
picasa_web_service_get_authorization_url (PicasaWebService *self)
{
GHashTable *data_set;
GString *link;
GList *keys;
GList *scan;
data_set = g_hash_table_new (g_str_hash, g_str_equal);
g_hash_table_insert (data_set, "response_type", "code");
g_hash_table_insert (data_set, "client_id", GTHUMB_PICAS... | false | false | false | false | false | 0 |
fl_show_choice( const char * m1,
const char * m2,
const char * m3,
int numb,
const char * c1,
const char * c2,
const char * c3,
int def )
{
char *buf;
size_t len;
int ret;
l... | false | true | false | false | false | 1 |
LoadDefault()
{
unsigned int i = 0;
DICT_ENTRY n = DICOMV3DataDict[i];
while( n.name != 0 )
{
Tag t(n.group, n.element);
DictEntry e( n.name, n.keyword, n.vr, n.vm, n.ret );
//assert( DictEntry::CheckKeywordAgainstName(n.name, n.keyword) );
AddDictEntry( t, e );
n = DICOMV3Data... | false | false | false | false | false | 0 |
range_iter(PyObject *seq)
{
rangeobject *r = (rangeobject *)seq;
longrangeiterobject *it;
long lstart, lstop, lstep;
PyObject *int_it;
assert(PyRange_Check(seq));
/* If all three fields and the length convert to long, use the int
* version */
lstart = PyLong_AsLong(r->start);
if (... | false | false | false | false | false | 0 |
clone_ident(const char *ident)
{
char *cident;
unsigned v;
v = *(unsigned *)(ident);
if ((v & 1U) != 0) {
cident = getmem(PTR_SHIFT + sizeof(hash_item_header *));
} else {
size_t n = strlen(ident + sizeof(unsigned)) + 1;
cident = getmem(n + sizeof(unsigned));
memcpy(cident + sizeof(unsigned), ident + size... | false | false | false | false | false | 0 |
xgbe_wrapper_rx_descriptor_init(struct xgbe_prv_data *pdata)
{
struct xgbe_hw_if *hw_if = &pdata->hw_if;
struct xgbe_channel *channel;
struct xgbe_ring *ring;
struct xgbe_ring_desc *rdesc;
struct xgbe_ring_data *rdata;
dma_addr_t rdesc_dma;
unsigned int i, j;
DBGPR("-->xgbe_wrapper_rx_descriptor_init\n");
ch... | false | false | false | false | false | 0 |
ne_hash_lookup(NE_HASH *hash, void *key)
{
NE_HASHNODE *node;
node = *_hash_lookup_node(hash, key, NULL);
return (node) ? node->value : NULL;
} | false | false | false | false | false | 0 |
ShouldReadDataSet(unsigned int dataSetIndex)
{
bool shouldRead =
(dataSetIndex >= this->Internal->MinDataset &&
dataSetIndex < this->Internal->MaxDataset);
if (shouldRead && this->Internal->HasUpdateRestriction)
{
if (this->Internal->UpdateIndices.find(dataSetIndex) ==
this->Internal->Upda... | false | false | false | false | false | 0 |
chooseString ( const ASCString& title, const vector<ASCString>& entries, int defaultEntry )
{
vector<ASCString> b;
b.push_back ( "~O~K");
return chooseString ( title, entries, b, defaultEntry).second;
} | false | false | false | false | false | 0 |
clu_solve (double *a, int n, double *rs, int m, double *res)
/**** solvesim
solve simultanuously a linear system.
****/
{ complex **x,**b,*h;
complex sum,t;
int i,k,l,j;
ram=newram;
/* initialize x and b */
x=(complex **)ram;
increase(ram,(long)n*sizeof(complex *));
h=(complex *)res; for (i=0; i<n; i++) { x[i... | false | false | false | false | false | 0 |
dict_setdefault(PyDictObject *mp, PyObject *args)
{
PyObject *key, *val;
PyObject *defaultobj = Py_None;
if (!PyArg_UnpackTuple(args, "setdefault", 1, 2, &key, &defaultobj))
return NULL;
val = PyDict_SetDefault((PyObject *)mp, key, defaultobj);
Py_XINCREF(val);
return val;
} | false | false | false | false | false | 0 |
stmmac_refill_desc3(void *priv_ptr, struct dma_desc *p)
{
struct stmmac_priv *priv = (struct stmmac_priv *)priv_ptr;
if (priv->hwts_rx_en && !priv->extend_desc)
/* NOTE: Device will overwrite des3 with timestamp value if
* 1588-2002 time stamping is enabled, hence reinitialize it
* to keep explicit chaining ... | false | false | false | false | false | 0 |
update_spdif_bits(struct snd_ice1712 *ice, unsigned int val)
{
unsigned char cbit, disabled;
cbit = inb(ICEREG1724(ice, SPDIF_CFG));
disabled = cbit & ~VT1724_CFG_SPDIF_OUT_EN;
if (cbit != disabled)
outb(disabled, ICEREG1724(ice, SPDIF_CFG));
outw(val, ICEMT1724(ice, SPDIF_CTRL));
if (cbit != disabled)
outb(... | false | false | false | false | false | 0 |
change_local_nick(struct Client *client_p, struct Client *source_p, char *nick, int dosend)
{
struct Client *target_p;
rb_dlink_node *ptr, *next_ptr;
char note[NICKLEN + 10];
int samenick;
if(dosend)
{
if((source_p->localClient->last_nick_change + ConfigFileEntry.max_nick_time) <
rb_current_time())
sou... | true | true | false | false | false | 1 |
caml_page_table_lookup(void * addr)
{
uintnat h, e;
h = Hash(Page(addr));
/* The first hit is almost always successful, so optimize for this case */
e = caml_page_table.entries[h];
if (Page_entry_matches(e, (uintnat)addr)) return e & 0xFF;
while(1) {
if (e == 0) return 0;
h = (h + 1) & caml_page_ta... | false | false | false | false | false | 0 |
valgrind_make_blocks_defined ( void ) {
struct memory_block *block;
if ( RUNNING_ON_VALGRIND > 0 ) {
VALGRIND_MAKE_MEM_DEFINED ( &free_blocks,
sizeof ( free_blocks ) );
list_for_each_entry ( block, &free_blocks, list )
VALGRIND_MAKE_MEM_DEFINED ( block, sizeof ( *block ) );
}
} | false | false | false | false | false | 0 |
TagName(map<CDXTag, string>& enummap, CDXTag tag)
{
string tagname;
if(!enummap.empty())
{
map<CDXTag, std::string>::iterator iter = enummap.find(tag);
if(iter!=enummap.end())
{
tagname=iter->second;
//Remove prefix, e.g. kCDXProp_
string::size_type pos = tagname.find('_');
if(... | false | false | false | false | false | 0 |
prime_hash_func(struct sip_msg * msg,
enum hash_source source, int denominator) {
str source_string;
if(source != shs_from_user && source != shs_to_user) {
LM_ERR("chosen hash source not usable (may contain letters)\n");
return -1;
}
if (determine_source (msg, source, &source_strin... | false | false | false | false | false | 0 |
H5S_all_get_seq_list(const H5S_t H5_ATTR_UNUSED *space, unsigned H5_ATTR_UNUSED flags, H5S_sel_iter_t *iter,
size_t H5_ATTR_UNUSED maxseq, size_t maxelem, size_t *nseq, size_t *nelem,
hsize_t *off, size_t *len)
{
size_t elem_used; /* The number of elements used */
FUNC_ENTER_NOAPI_NOINIT_NOER... | false | false | false | false | false | 0 |
onLeftBtnPress(FXObject*,FXSelector,void* ptr){
FXEvent* event=(FXEvent*)ptr;
flags&=~FLAG_TIP;
if(isEnabled()){
grab();
if(target && target->tryHandle(this,FXSEL(SEL_LEFTBUTTONPRESS,message),ptr)) return 1;
setCurrentSegment(getSegment(event->win_x,event->win_y),TRUE);
if(0<=current){
grip=... | false | false | false | false | false | 0 |
assert_cell_parented (GObject *parent,
GObject *child)
{
GList *cells;
cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (parent));
g_assert (g_list_find (cells, child) != NULL);
g_list_free (cells);
} | false | false | false | false | false | 0 |
makeColorPreview(VisuData *data)
{
const int *valCols;
int i, j, id;
int rowstride, x, y;
guchar *pixels, *p;
float rgbValues[COLOR_PREVIEW_WIDTH][4];
float fromVal[3];
ToolShade *shade;
VisuColorization *dt;
if (!data)
{
gtk_image_set_from_pixbuf(GTK_IMAGE(colorPreview), NULL);
gtk_w... | false | false | false | false | false | 0 |
safe_dcl(graph_t * g, int obj_kind, char *name, char *def)
{
attrsym_t *a = agattr(g,obj_kind,name, NULL);
if (!a) /* attribute does not exist */
a = agattr(g,obj_kind,name,def);
return a;
} | false | false | false | false | false | 0 |
load( unsigned char* buffer, unsigned size )
{
entries.clear();
for( unsigned i = 0; i < size/128; i++ )
{
unsigned p = i * 128;
// would be < 32 if first char in the name isn't printable
unsigned prefix = 32;
// parse name of this entry, which stored as Unicode 16-bit
std::string... | false | false | false | false | false | 0 |
iobase_iternext(PyObject *self)
{
PyObject *line = PyObject_CallMethodObjArgs(self, _PyIO_str_readline, NULL);
if (line == NULL)
return NULL;
if (PyObject_Size(line) == 0) {
Py_DECREF(line);
return NULL;
}
return line;
} | false | false | false | false | false | 0 |
c_can_configure_msg_objects(struct net_device *dev)
{
int i;
/* first invalidate all message objects */
for (i = C_CAN_MSG_OBJ_RX_FIRST; i <= C_CAN_NO_OF_OBJECTS; i++)
c_can_inval_msg_object(dev, IF_RX, i);
/* setup receive message objects */
for (i = C_CAN_MSG_OBJ_RX_FIRST; i < C_CAN_MSG_OBJ_RX_LAST; i++)
c... | false | false | false | false | false | 0 |
dump_gimple_debug (pretty_printer *buffer, gimple gs, int spc, int flags)
{
switch (gs->gsbase.subcode)
{
case GIMPLE_DEBUG_BIND:
if (flags & TDF_RAW)
dump_gimple_fmt (buffer, spc, flags, "%G BIND <%T, %T>", gs,
gimple_debug_bind_get_var (gs),
gimple_debug_bind_get_value (gs));
else
dump... | false | false | false | false | false | 0 |
should_enable_udc(struct pxa_udc *udc)
{
int put_on;
put_on = ((udc->pullup_on) && (udc->driver));
put_on &= ((udc->vbus_sensed) || (IS_ERR_OR_NULL(udc->transceiver)));
return put_on;
} | false | false | false | false | false | 0 |
cf_format_strtimestamp(struct tm *tm, char *buf)
{
/* Security checks */
if (tm->tm_year < -2899 || tm->tm_year > 8099)
{
CfOut(cf_error, "", "Unable to format timestamp: passed year is out of range: %d",
tm->tm_year + 1900);
return NULL;
}
/* There is no easy way to replicate ctime output by usi... | false | false | false | false | false | 0 |
endString(Sfio_t * ins, Sfio_t * outs, char ec)
{
int sline = lineno;
int c;
while ((c = sfgetc(ins)) != ec) {
if (c == '\\') {
sfputc(outs, c);
c = sfgetc(ins);
}
if (c < 0) {
error(ERROR_ERROR, "unclosed string, start line %d", sline);
return c;
}
if (c == '\n')
lineno++;
s... | false | false | false | false | false | 0 |
APar_ShowMPEG4AACProfileInfo(TrackInfo* track_info) {
if (track_info->descriptor_object_typeID == 1) {
fprintf(stdout, " MPEG-4 AAC Main Profile");
} else if (track_info->descriptor_object_typeID == 2) {
fprintf(stdout, " MPEG-4 AAC Low Complexity/LC Profile"); //most files will land here
} else if (track_... | false | false | false | false | false | 0 |
get_key_image(uchar *buff,uint length, imagetype type_arg)
{
uint32 blob_length= get_length(ptr);
uchar *blob;
#ifdef HAVE_SPATIAL
if (type_arg == itMBR)
{
const char *dummy;
MBR mbr;
Geometry_buffer buffer;
Geometry *gobj;
const uint image_length= SIZEOF_STORED_DOUBLE*4;
if (blob_leng... | false | false | false | false | false | 0 |
filename_extension(char *ext, const char *path)
{
int i;
int len = my_strlen(path);
for (i = len - 1; i >= 0; --i)
if (path[i] == '.')
break;
if (i < 0 || i == len - 1)
{
ext[0] = '\0';
return 0;
}
len -= ++i;
if (ext)
strcpy(ext, path + i);
return len;
} | false | false | false | false | false | 0 |
dav_xml_escape_uri(apr_pool_t *p, const char *uri)
{
const char *e_uri = ap_escape_uri(p, uri);
/* check the easy case... */
if (ap_strchr_c(e_uri, '&') == NULL)
return e_uri;
/* there was a '&', so more work is needed... sigh. */
/*
* Note: this is a teeny bit of overkill since we k... | false | false | false | false | false | 0 |
hpsa_volume_offline(struct ctlr_info *h,
unsigned char scsi3addr[])
{
struct CommandList *c;
unsigned char *sense;
u8 sense_key, asc, ascq;
int sense_len;
int rc, ldstat = 0;
u16 cmd_status;
u8 scsi_status;
#define ASC_LUN_NOT_READY 0x04
#define ASCQ_LUN_NOT_READY_FORMAT_IN_PROGRESS 0x04
#define ASCQ_LUN_NO... | false | false | false | false | false | 0 |
i2c_w1(struct gspca_dev *gspca_dev, u8 reg, u8 val)
{
struct sd *sd = (struct sd *) gspca_dev;
int ret;
if (gspca_dev->usb_err < 0)
return;
PDEBUG(D_USBO, "i2c_w1 [%02x] = %02x", reg, val);
switch (sd->sensor) {
case SENSOR_ADCM1700:
case SENSOR_OM6802:
case SENSOR_GC0307: /* i2c command = a0 (100 kHz) */
... | false | false | false | false | false | 0 |
save_game_gtk(void)
{
if (game_in_progress && character_generated)
{
if (!inkey_flag)
{
glog( "You may not do that right now.");
return(FALSE);
}
/* Hack -- Forget messages */
msg_flag = FALSE;
/* Save the game */
save_game();
}
return(TRUE);
} | false | false | false | false | false | 0 |
garbage()
{
int i;
BLK oldhdr;
/* start by assuming every block is free */
for (i = 0; i < sizeof bitmap; i++)
{
bitmap[i] = 255;
}
/* header block isn't free */
#ifndef lint
CLR(0);
#endif
/* blocks needed for current hdr aren't free */
for (i = 1; i < MAXBLKS; i++)
{
CLR(hdr.n[i]);
}
/* blocks ne... | false | true | false | false | true | 1 |
FCEU_DispMessageOnMovie(char *format, ...)
{
va_list ap;
va_start(ap,format);
vsnprintf(guiMessage.errmsg,sizeof(guiMessage.errmsg),format,ap);
va_end(ap);
guiMessage.howlong = 180;
guiMessage.isMovieMessage = true;
guiMessage.linesFromBottom = 0;
if (FCEUI_AviIsRecording() && FCEUI_AviDisableMov... | false | false | false | false | false | 0 |
InitShipsAvailablePerTurnAndPlanet() {
vector<Planet> planets = pw->Planets();
for(vector<Planet>::iterator it = planets.begin(); it < planets.end(); ++it) {
if(it->Owner() != 0) {
PlanetState* ps = new PlanetState();
planets_state[it->PlanetID()] = ps;
ps->SetAvailableShipsPerTurn(ShipsAvaila... | false | false | false | false | false | 0 |
cr_tknzr_unref (CRTknzr * a_this)
{
g_return_val_if_fail (a_this && PRIVATE (a_this), FALSE);
if (PRIVATE (a_this)->ref_count > 0) {
PRIVATE (a_this)->ref_count--;
}
if (PRIVATE (a_this)->ref_count == 0) {
cr_tknzr_destroy (a_this);
retur... | false | false | false | false | false | 0 |
testb(Register reg, Immediate mask) {
ASSERT(is_int8(mask.value_) || is_uint8(mask.value_));
EnsureSpace ensure_space(this);
if (reg.is(rax)) {
emit(0xA8);
emit(mask.value_); // Low byte emitted.
} else {
if (reg.code() > 3) {
// Register is not one of al, bl, cl, dl. Its encoding needs REX.... | false | false | false | false | false | 0 |
btr_cur_update_alloc_zip(
/*=====================*/
page_zip_des_t* page_zip,/*!< in/out: compressed page */
buf_block_t* block, /*!< in/out: buffer page */
dict_index_t* index, /*!< in: the index corresponding to the block */
ulint length, /*!< in: size needed */
ibool create, /*!< in: TRUE=delete-and-insert,
... | false | false | false | false | false | 0 |
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
MarkerClicker *_t = static_cast<MarkerClicker *>(_o);
switch (_id) {
case 0: _t->markerClicked((*reinterpret_cast< int(*)>(_a[1]... | false | false | false | false | false | 0 |
IPrcWrite(pfPrcHelper* prc) {
plNetMessage::IPrcWrite(prc);
prc->writeSimpleTag("Groups");
for (size_t i=0; i<fGroups.getSize(); i++) {
prc->startTag("Group");
prc->writeParam("OwnIt", fGroups[i].fOwnIt);
prc->endTag();
fGroups[i].fGroupID.prcWrite(prc);
prc->closeTa... | false | false | false | false | false | 0 |
commify(Bytebuffer* buf)
{
char* list,*p;
if(bbLength(buf) == 0) return;
list = bbDup(buf);
p = list;
bbClear(buf);
commifyr(p,buf);
bbNull(buf);
efree(list);
} | false | false | false | false | false | 0 |
process_sorted_aggregate(AggState *aggstate,
AggStatePerAgg peraggstate,
AggStatePerGroup pergroupstate)
{
Datum oldVal = (Datum) 0;
bool haveOldVal = false;
MemoryContext workcontext = aggstate->tmpcontext->ecxt_per_tuple_memory;
MemoryContext oldContext;
Datum *newVal;
bool *isNull;
Funct... | false | false | false | false | false | 0 |
stroke_counters(private_stroke_socket_t *this,
stroke_msg_t *msg, FILE *out)
{
pop_string(msg, &msg->counters.name);
if (msg->counters.reset)
{
this->counter->reset(this->counter, msg->counters.name);
}
else
{
this->counter->print(this->counter, out, msg->counters.name);
}
} | false | false | false | false | false | 0 |
afr_self_heal_type_str_get (afr_self_heal_t *self_heal_p, char *str,
size_t size)
{
GF_ASSERT (str && (size > strlen (" missing-entry gfid "
"meta-data data entry")));
if (self_heal_p->do_metadata_self_heal) {
snprint... | false | false | false | false | false | 0 |
ivtv_s_fmt_vbi_cap(struct file *file, void *fh, struct v4l2_format *fmt)
{
struct ivtv *itv = fh2id(fh)->itv;
if (!ivtv_raw_vbi(itv) && atomic_read(&itv->capturing) > 0)
return -EBUSY;
itv->vbi.sliced_in->service_set = 0;
itv->vbi.in.type = V4L2_BUF_TYPE_VBI_CAPTURE;
v4l2_subdev_call(itv->sd_video, vbi, s_raw_f... | false | false | false | false | false | 0 |
gdi2_tsm(
sge_gdi_ctx_class_t *thiz,
const char *schedd_name,
const char *cell
) {
lList *alp = NULL;
DENTER(GDI_LAYER, "gdi2_tsm");
alp = thiz->gdi(thiz, SGE_SC_LIST, SGE_GDI_TRIGGER, NULL, NULL, NULL);
DRETURN(alp);
} | false | false | false | false | false | 0 |
print()
{
cout << name() << " macro ";
list <string> :: iterator si;
if(arguments.size()) {
for(si = arguments.begin();
si != arguments.end();
++si)
cout << *si << " ";
}
cout << endl;
if(body.size()) {
for(si = body.begin();
si != body.end();
++si)
cout << " " << *si;
}
... | false | false | false | false | false | 0 |
ft_add_wwn(
struct target_fabric_configfs *tf,
struct config_group *group,
const char *name)
{
struct ft_lport_wwn *ft_wwn;
struct ft_lport_wwn *old_ft_wwn;
u64 wwpn;
pr_debug("add wwn %s\n", name);
if (ft_parse_wwn(name, &wwpn, 1) < 0)
return NULL;
ft_wwn = kzalloc(sizeof(*ft_wwn), GFP_KERNEL);
if (!ft_ww... | false | false | false | false | false | 0 |
notifyItemsRemoved( const QSet<quint64> &removedItems )
{
DEBUG_BLOCK
foreach( quint64 removedItem, removedItems )
{
AlbumId album = albumForItem( removedItem );
// Try not to lose our position in the playlist: if we're losing 'currentItem()', substitute the next "planned item".
if... | false | false | false | false | false | 0 |
pubsubUnsubscribeAllChannels(redisClient *c, int notify) {
dictIterator *di = dictGetSafeIterator(c->pubsub_channels);
dictEntry *de;
int count = 0;
while((de = dictNext(di)) != NULL) {
robj *channel = dictGetEntryKey(de);
count += pubsubUnsubscribeChannel(c,channel,notify);
}
... | false | false | false | false | false | 0 |
evaluate(AttributeValue* arg0, AttributeValue* arg1, bool check_id){
//TODO
//arg0 is the attributevalue in policy
//arg1 is the attributevalue in request
if(check_id) { if(arg0->getId() != arg1->getId()) return new BooleanAttribute(false); }
if(fnName == NAME_TIME_IN_RANGE){
PeriodAttribute* v0;
Date... | false | false | false | true | false | 1 |
ipmi_cancel_tx_msg(struct acpi_ipmi_device *ipmi,
struct acpi_ipmi_msg *msg)
{
struct acpi_ipmi_msg *tx_msg, *temp;
bool msg_found = false;
unsigned long flags;
spin_lock_irqsave(&ipmi->tx_msg_lock, flags);
list_for_each_entry_safe(tx_msg, temp, &ipmi->tx_msg_list, head) {
if (msg == tx_msg) {
msg_... | false | false | false | false | false | 0 |
rnd_misc_item(struct monst *mtmp)
{
struct permonst *pm = mtmp->data;
int difficulty = monstr[(monsndx(pm))];
if(is_animal(pm) || attacktype(pm, AT_EXPL) || mindless(mtmp->data)
|| pm->mlet == S_GHOST
# ifdef KOPS
|| pm->mlet == S_KOP
# endif
) return 0;
/* Unlike other rnd_item fun... | false | false | false | false | false | 0 |
playlists_view_popup_menu(GtkWidget *treeview,
GdkEventButton *event,
gpointer userdata)
{
GtkWidget *menu, *menuitem;
GtkTreeSelection *selection;
GMedialib *gml = (GMedialib *)userdata;
gboolean multiple =... | false | false | false | false | false | 0 |
cpsw_ale_write(struct cpsw_ale *ale, int idx, u32 *ale_entry)
{
int i;
WARN_ON(idx > ale->params.ale_entries);
for (i = 0; i < ALE_ENTRY_WORDS; i++)
__raw_writel(ale_entry[i], ale->params.ale_regs +
ALE_TABLE + 4 * i);
__raw_writel(idx | ALE_TABLE_WRITE, ale->params.ale_regs +
ALE_TABLE_CONTROL)... | false | false | false | false | false | 0 |
save_msg_att_work(long int msgno, ATTACH_S *a, MAILSTREAM *save_stream,
char *save_folder, CONTEXT_S *cntxt, char *date)
{
STORE_S *so;
int rv = 0;
if(a && a->body && MIME_MSG(a->body->type, a->body->subtype)){
if((so = so_get(CharStar, NULL, WRITE_ACCESS)) != NULL){
*date = '\0';
... | false | false | false | false | false | 0 |
find_copy_in_blob(struct scoreboard *sb,
struct blame_entry *ent,
struct origin *parent,
struct blame_entry *split,
mmfile_t *file_p)
{
const char *cp;
int cnt;
mmfile_t file_o;
struct handle_split_cb_data d;
xpparam_t xpp;
xdemitconf_t xecfg;
memset(&d, 0, sizeof(d));
d.sb =... | false | false | false | false | false | 0 |
lock(const void *p)
{
if (tc_lock && p) {
struct talloc_chunk *tc = talloc_chunk_from_ptr(p);
if (tc->flags & TALLOC_FLAG_EXT_ALLOC) {
if (locked)
TALLOC_ABORT("nested locking");
tc_lock(tc);
locked = 1;
}
}
} | false | false | false | false | false | 0 |
gfx_find_driver(char *path, char *name)
{
int retval = 0;
if (!name) { /* Find default driver */
#ifndef X_DISPLAY_MISSING
if (getenv("DISPLAY"))
return &gfx_driver_xlib;
#endif
#if defined (MACOSX) && defined(HAVE_SDL)
return &gfx_driver_sdl;
#endif
return gfx_drivers[0];
}
while (gfx_drivers[retval] &&... | false | false | false | false | true | 1 |
pdb_file_read_record_by_id(char *DB_name,
pi_uid_t uid,
void **bufp, size_t *sizep, int *idxp,
int *attrp, int *catp)
{
char local_pdb_file[FILENAME_MAX];
char full_local_pdb_file[FILENAME_MAX];
struct pi_file *pf1;
... | true | true | false | false | false | 1 |
cin_isdo(p)
char_u *p;
{
return (STRNCMP(p, "do", 2) == 0 && !vim_isIDc(p[2]));
} | false | false | false | false | false | 0 |
pinMode(uint32_t pin, uint32_t mode)
{
if (pin > 13) {
return;
}
RCC_AHB1PeriphClockCmd(deckGPIOMapping[pin-1].periph, ENABLE);
GPIO_InitTypeDef GPIO_InitStructure = {0};
GPIO_InitStructure.GPIO_Pin = deckGPIOMapping[pin-1].pin;
GPIO_InitStructure.GPIO_Mode = (mode == OUTPUT) ? GPIO_Mode_OUT:GPIO_Mod... | false | false | false | false | false | 0 |
do_export(http_t *http) /* I - HTTP connection */
{
int i, j; /* Looping vars */
ipp_t *request, /* IPP request */
*response; /* IPP response */
const char *username, /* Samba username */
*password, /* Samba password */
*export_all; /* Export all printers? */
int export_count, /* Number of pr... | false | false | false | false | false | 0 |
manager_get_properties_cb (DBusGProxy *proxy,
GHashTable *props,
GError *error,
GeoclueGsmlocOfono *ofono)
{
GeoclueGsmlocOfonoPrivate *priv = GET_PRIVATE (ofono);
GValue *val;
GPtrArray *modems = NULL;
if (error) {
if(error->code !... | false | false | false | false | false | 0 |
mkint(sign,arr,len)
int sign;
word2 *arr;
int len;
{
struct bigcell *big;
variant v;
truc obj;
if(len <= 1) {
v.pp.b0 = fFIXNUM;
if(!len) {
v.pp.b1 = 0;
v.pp.ww = 0;
}
else {
v.pp.b1 = sign;
v.pp.ww = *arr;
}
... | false | false | false | false | false | 0 |
htab_map_lookup_elem(struct bpf_map *map, void *key)
{
struct bpf_htab *htab = container_of(map, struct bpf_htab, map);
struct hlist_head *head;
struct htab_elem *l;
u32 hash, key_size;
/* Must be called with rcu_read_lock. */
WARN_ON_ONCE(!rcu_read_lock_held());
key_size = map->key_size;
hash = htab_map_has... | false | false | false | false | false | 0 |
object_present_in_ob(uint8 type, const object *op) {
object *tmp;
for (tmp = op->inv; tmp != NULL; tmp = tmp->below)
if (tmp->type == type)
return tmp;
return NULL;
} | false | false | false | false | false | 0 |
check0 (mpfr_ptr ip, mpfr_ptr fp, mpfr_prec_t prec, mpfr_rnd_t rnd)
{
mpfr_t sum, tmp, dst, fp2;
int inex1, inex2;
mpfr_init2 (sum, PMAX);
mpfr_init2 (tmp, PMAX);
mpfr_init2 (dst, prec);
mpfr_init2 (fp2, prec);
if (MPFR_SIGN (ip) != MPFR_SIGN (fp))
{
printf ("Internal error (1)\n");
exit... | false | false | false | false | false | 0 |
main( int argc, char *argv[] )
{
if (argc < 3) {
cout<<"Usage : volumeOOCSlice file slice"<<endl;
exit(1);
}
vtkOOCMetaImageReader *Reader = vtkOOCMetaImageReader::New();
Reader->SetFileName(argv[1]);
int z = atoi(argv[2]);
Reader->SetZMin(z);
Reader->SetZMax(z);
Reader->Update();
vtkImageFlip *flip =... | false | false | false | false | false | 0 |
jack_resize_shm (jack_shm_info_t* si, jack_shmsize_t size)
{
jack_release_shm (si);
jack_destroy_shm (si);
if (jack_shmalloc (size, si)) {
return -1;
}
return jack_attach_shm (si);
} | false | false | false | false | false | 0 |
graphics_compare_score(void *data0, void *data1,void *user_data) {
Graphics_player_info *pinfo0 = (Graphics_player_info *) data0;
Graphics_player_info *pinfo1 = (Graphics_player_info *) data1;
if (pinfo0->life == 0 && pinfo1->life > 0) {
return 1;
} else if (pinfo0->life > 0 && pinfo1->life == 0) {
retu... | false | false | false | false | false | 0 |
lowerFP_TO_SINT_STORE(StoreSDNode *SD, SelectionDAG &DAG) {
SDValue Val = SD->getValue();
if (Val.getOpcode() != ISD::FP_TO_SINT)
return SDValue();
EVT FPTy = EVT::getFloatingPointVT(Val.getValueSizeInBits());
SDValue Tr = DAG.getNode(MipsISD::TruncIntFP, SDLoc(Val), FPTy,
Val.g... | false | false | false | false | false | 0 |
isns_scope_get(isns_scope_t *scope)
{
if (scope) {
isns_assert(scope->ic_users);
scope->ic_users++;
}
return scope;
} | false | false | false | false | false | 0 |
free_fiber(fiberlampstruct *fl)
{
if (fl->fiber) {
int f;
for (f = 0; f < fl->nfibers; f++) {
fiberstruct *fs = fl->fiber + f;
if (fs->node)
free(fs->node);
if (fs->draw)
free(fs->draw);
}
free(fl->fiber);
fl->fiber = NULL;
}
} | false | false | false | false | false | 0 |
tp_connection_manager_check_valid_name (const gchar *name,
GError **error)
{
const gchar *name_char;
if (tp_str_empty (name))
{
g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The empty string is not a valid connection manager name");
retu... | 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.