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 |
|---|---|---|---|---|---|---|
plot_option_array(void)
{
int number_of_records = 0;
if (!equals(c_token, "="))
int_error(c_token, equal_symbol_msg);
clear_binary_records(DF_CURRENT_RECORDS);
do {
c_token++;
/* Partial backward compatibility with syntax up to 4.2.4 */
if (isanumber(c_token)) {
if (++number_of_records > df... | false | false | false | false | false | 0 |
display_scroll_line_starts (WINDOW *window, int old_pagetop,
char **old_starts, int old_count)
{
register int i, old, new; /* Indices into the line starts arrays. */
int last_new, last_old; /* Index of the last visible line. */
int old_first, new_first; /* Index of the first changed line. */
i... | false | false | false | false | false | 0 |
SubdivideInPlace(vtkIntArray *Parent1, vtkIntArray *Parent2)
{
vtkIntArray *EdgesChildren=vtkIntArray::New();
vtkIdType NumEdges=this->GetNumberOfEdges();
vtkIdType NumPoints=this->GetNumberOfPoints();
vtkIdType NumFaces=this->GetNumberOfCells();
vtkIdType i;
// Set the cleaning flags
int BackupCleanVertices=th... | false | false | false | false | false | 0 |
check_pseudoelement(int which, bool isoutput, const char *name, ErrorHandler *errh) const
{
Bitvector used(_element_nports[1-isoutput][which]);
for (const Connection *it = _conn.begin(); it != _conn.end(); ++it)
if ((*it)[1-isoutput].idx == which)
used[(*it)[1-isoutput].port] = true;
if (_element_npor... | false | false | false | false | false | 0 |
add_int_col_info_to_list( const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,
GList** pList )
{
GncSqlColumnInfo* info;
g_return_if_fail( be != NULL );
g_return_if_fail( table_row != NULL );
g_return_if_fail( pList != NULL );
info = create_column_info( table... | false | false | false | false | false | 0 |
os_join_ts_minus_1(struct Channel *cptr)
{
char sendstr[MAXLINE + 1];
char **av;
int ac;
if (!cptr)
return;
ircsprintf(sendstr, ":%s SJOIN %ld %s + :@%s\r\n",
Me.name, (cptr->since != 0) ? (long) cptr->since - 1 : 0, cptr->name,
n_OperServ);
toserv("%s", sendstr);
ac = SplitBuf(send... | true | true | false | false | false | 1 |
encode_layoutreturn(struct xdr_stream *xdr,
const struct nfs4_layoutreturn_args *args,
struct compound_hdr *hdr)
{
__be32 *p;
encode_op_hdr(xdr, OP_LAYOUTRETURN, decode_layoutreturn_maxsz, hdr);
p = reserve_space(xdr, 16);
*p++ = cpu_to_be32(0); /* reclaim. always 0 for now */
*p++ = cpu_to_be32(args... | false | false | false | false | false | 0 |
register_division_in (basic_block bb)
{
struct occurrence *occ;
occ = (struct occurrence *) bb->aux;
if (!occ)
{
occ = occ_new (bb, NULL);
insert_bb (occ, ENTRY_BLOCK_PTR, &occ_head);
}
occ->bb_has_division = true;
occ->num_divisions++;
} | false | false | false | false | false | 0 |
GetUnmappedBytes() {
size_t bytes;
CHECK(MallocExtension::instance()->GetNumericProperty(
"tcmalloc.pageheap_unmapped_bytes", &bytes));
return bytes;
} | false | false | false | false | false | 0 |
constructed (GObject *object)
{
NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
if (G_OBJECT_CLASS (nm_object_parent_class)->constructed)
G_OBJECT_CLASS (nm_object_parent_class)->constructed (object);
priv->properties_proxy = dbus_g_proxy_new_for_name (priv->connection,
... | false | false | false | false | false | 0 |
OnMouseMoveCallback(vtkAbstractWidget *w)
{
vtkParallelopipedWidget *self = reinterpret_cast<vtkParallelopipedWidget*>(w);
vtkParallelopipedRepresentation *rep =
reinterpret_cast<vtkParallelopipedRepresentation*>(self->WidgetRep);
int interactionState = rep->GetInteractionState();
int newInteractionState ... | false | false | false | false | false | 0 |
ParseDebuggerStatement(bool* ok) {
// In ECMA-262 'debugger' is defined as a reserved keyword. In some browser
// contexts this is used as a statement which invokes the debugger as i a
// break point is present.
// DebuggerStatement ::
// 'debugger' ';'
Expect(Token::DEBUGGER, CHECK_OK);
ExpectSemicolo... | false | false | false | false | false | 0 |
igb_pci_enable_sriov(struct pci_dev *dev, int num_vfs)
{
int err = igb_enable_sriov(dev, num_vfs);
if (err)
goto out;
err = igb_sriov_reinit(dev);
if (!err)
return num_vfs;
out:
return err;
} | false | false | false | false | false | 0 |
stream_read(stream_t *stream, size_t size, void *buf)
{
size_t ret;
ret = fread(buf, 4, size >> 2, stream->f) * 4;
ret += fread((char*)buf + ret, 1, size - ret, stream->f);
if (ret == 0 && size != 0) stream->eof = 1;
} | false | false | false | false | false | 0 |
gnc_plugin_ab_account_selected(GncPluginPage *plugin_page, Account *account,
gpointer user_data)
{
GncMainWindow *window;
GtkActionGroup *action_group;
const gchar *bankcode = NULL;
const gchar *accountid = NULL;
g_return_if_fail(GNC_IS_PLUGIN_PAGE(plugin_page));
... | false | false | false | false | false | 0 |
zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...)
{
va_list ptr;
void *elem;
ZEND_PTR_STACK_RESIZE_IF_NEEDED(stack, count)
va_start(ptr, count);
while (count>0) {
elem = va_arg(ptr, void *);
stack->top++;
*(stack->top_element++) = elem;
count--;
}
va_end(ptr);
} | false | false | false | false | false | 0 |
discard_slot_preload_i(int pgno, Stasche_lm_dt *sld,
Slot *slot, Adep *adep, Block *dst)
{
int dlastmt;
int disidx, didx, idx;
Pp dlastpp;
real loadtime;
didx = get_timing_index(sld, dst->no, PRE);
get_last_check(slot, &dlastmt, &dlastpp);
disidx = get_timing_index(sl... | false | false | false | false | false | 0 |
updateCurrent(void)
{
current = start;
if (playing == SDL_AUDIO_PLAYING) {
current += (end_replay-start_replay)>>1;
}
} | false | false | false | false | false | 0 |
hb_monitor(hb_ctx_t *ctx, apr_pool_t *p)
{
apr_size_t len;
apr_socket_t *sock = NULL;
char buf[256];
int i, j;
apr_uint32_t ready = 0;
apr_uint32_t busy = 0;
ap_generation_t mpm_generation;
ap_mpm_query(AP_MPMQ_GENERATION, &mpm_generation);
for (i = 0; i < ctx->server_limit; i++) {... | true | true | false | false | false | 1 |
putconf(f, cp)
register FILE *f;
register struct dbzconfig *cp;
{
register int i;
register int ret = 0;
if (fseek(f, (of_t)0, SEEK_SET) != 0) {
DEBUG(("fseek failure in putconf\n"));
ret = -1;
}
(void) fprintf(f, "dbz %d %ld %d %c %ld %ld %d %d", dbzversion, cp->tsize,
cp->fieldsep, cp->casemap, cp->tagen... | false | false | false | false | false | 0 |
sd_s_ctrl(struct v4l2_ctrl *ctrl)
{
struct gspca_dev *gspca_dev =
container_of(ctrl->handler, struct gspca_dev, ctrl_handler);
gspca_dev->usb_err = 0;
if (!gspca_dev->streaming)
return 0;
switch (ctrl->id) {
case V4L2_CID_BRIGHTNESS:
setbrightness(gspca_dev, ctrl->val);
break;
case V4L2_CID_CONTRAST:
... | false | false | false | false | false | 0 |
cdc_ncm_tx_timeout_start(struct cdc_ncm_ctx *ctx)
{
/* start timer, if not already started */
if (!(hrtimer_active(&ctx->tx_timer) || atomic_read(&ctx->stop)))
hrtimer_start(&ctx->tx_timer,
ktime_set(0, ctx->timer_interval),
HRTIMER_MODE_REL);
} | false | false | false | false | false | 0 |
pcnet32_purge_tx_ring(struct net_device *dev)
{
struct pcnet32_private *lp = netdev_priv(dev);
int i;
for (i = 0; i < lp->tx_ring_size; i++) {
lp->tx_ring[i].status = 0; /* CPU owns buffer */
wmb(); /* Make sure adapter sees owner change */
if (lp->tx_skbuff[i]) {
if (!pci_dma_mapping_error(lp->pci_dev,
... | false | false | false | false | false | 0 |
getinp(char fname[])
{
FILE *input;
long int siz;
int i;
input=fopen(fname,"r");
if(input==NULL) return 0;
fseek(input,0L,SEEK_END); siz=ftell(input);
if(siz<=0 || siz>=MAX_FLEN) {
fclose(input);
if(siz==0) return 0; else return -1;
}
fseek(input,0L,SEEK_SET);
inpbuf=xmall... | false | false | false | false | false | 0 |
PrepareUpdate()
{
// files list
delete m_pUpdatingFileBaseArray;
delete m_pUpdatingPathBaseArray;
delete m_pUpdatingBaseArray;
m_pUpdatingFileBaseArray = new CByteArray(0);
m_pUpdatingPathBaseArray = new CByteArray(0);
m_pUpdatingBaseArray = new CByteArray(0);
// search lists of case folded path+filenam... | false | false | false | false | false | 0 |
open_port(Driver * drvthis, const char *device)
{
PrivateData *p = drvthis->private_data;
struct termios portset;
unsigned char cmd[3] = {'\xFE', '\x56', 0};
unsigned char init_seq[7] = {'\x54', '\x58', '\x4B', '\x52', '\x44', '\x41', '\x60'};
int i;
/* Set up io port correctly, and open it... */
p->fd = open(... | false | false | false | false | false | 0 |
avahi_dns_packet_cleanup_name_table(AvahiDnsPacket *p) {
if (p->name_table)
avahi_hashmap_foreach(p->name_table, name_table_cleanup, p);
} | false | false | false | false | false | 0 |
mpt3sas_base_free_smid(struct MPT3SAS_ADAPTER *ioc, u16 smid)
{
unsigned long flags;
int i;
struct chain_tracker *chain_req, *next;
spin_lock_irqsave(&ioc->scsi_lookup_lock, flags);
if (smid < ioc->hi_priority_smid) {
/* scsiio queue */
i = smid - 1;
if (!list_empty(&ioc->scsi_lookup[i].chain_list)) {
li... | false | false | false | false | false | 0 |
run()
{
control_mutex.lock();
loop = new QEventLoop;
begin();
control_wait.wakeOne();
control_mutex.unlock();
loop->exec();
QMutexLocker locker(&control_mutex);
end();
delete loop;
loop = 0;
} | false | false | false | false | false | 0 |
e_source_registry_authenticate_sync (ESourceRegistry *registry,
ESource *source,
ESourceAuthenticator *auth,
GCancellable *cancellable,
GError **error)
{
AuthContext *auth... | false | false | false | false | false | 0 |
execute()
{
cpu16->pc->new_address(cpu16->stack->pop());
if(fast)
cpu16->fast_stack.pop();
} | false | false | false | false | false | 0 |
verify (error)
int error;
{
char *verbuf;
char *buf;
reg time_t began;
int got, len;
uint readamt;
auto char msg[200];
auto char answer[20];
if (*arname == '!')
{
VOID warn ("Can't verify a piped command", "");
return;
}
if (!error)
{
if ((verbuf = malloc (arbsize))... | false | false | false | false | false | 0 |
filedecref(File *f)
{
if (!f) return;
f->refs--;
if (f->refs < 1) {
walgc(f->w);
}
} | false | false | false | false | false | 0 |
tech_researched(struct player *plr)
{
struct player_research *research = player_research_get(plr);
/* plr will be notified when new tech is chosen */
if (!is_future_tech(research->researching)) {
notify_embassies(plr, NULL, NULL, E_TECH_GAIN, ftc_server,
_("The %s have researched %s."), ... | false | false | false | false | false | 0 |
get_timeout ( int32 timeout ) {
return timeout < 0 ? m_timeout : timeout ;
} | false | false | false | false | false | 0 |
systemdsn_list_select (GtkWidget *widget, gint row, gint column,
GdkEvent *event, TDSNCHOOSER *choose_t)
{
char *szDSN = NULL;
if (choose_t)
{
if (GTK_CLIST (choose_t->sdsnlist)->selection != NULL)
gtk_clist_get_text (GTK_CLIST (choose_t->sdsnlist),
GPOINTER_TO_INT (GTK_CLIST (choose_t->sdsnlis... | false | false | false | false | false | 0 |
print_entry (const STRUCT_UTMP *utmp_ent)
{
struct stat stats;
time_t last_change;
char mesg;
#define DEV_DIR_WITH_TRAILING_SLASH "/dev/"
#define DEV_DIR_LEN (sizeof (DEV_DIR_WITH_TRAILING_SLASH) - 1)
char line[sizeof (utmp_ent->ut_line) + DEV_DIR_LEN + 1];
char *p = line;
/* Copy ut_line into LINE, prep... | true | true | false | false | false | 1 |
ldaptool_free_defaults( void *defaults ) {
ldaptoolSASLdefaults *sasl_defaults = defaults;
if (sasl_defaults) {
if (sasl_defaults->mech)
free (sasl_defaults->mech);
if (sasl_defaults->authid)
free (sasl_defaults->authid);
if (sasl_defaults->username)
free (sasl_defaults->username);
if (sasl_defau... | false | false | false | false | false | 0 |
mark_reachable_objects(struct rev_info *revs, int mark_reflog)
{
/*
* Set up revision parsing, and mark us as being interested
* in all object types, not just commits.
*/
revs->tag_objects = 1;
revs->blob_objects = 1;
revs->tree_objects = 1;
/* Add all refs from the index file */
add_cache_refs(revs);
/*... | false | false | false | false | false | 0 |
ext2_xattr_handler(int name_index)
{
const struct xattr_handler *handler = NULL;
if (name_index > 0 && name_index < ARRAY_SIZE(ext2_xattr_handler_map))
handler = ext2_xattr_handler_map[name_index];
return handler;
} | false | false | false | false | false | 0 |
WriteObj(TABMAPObjectBlock *poObjBlock)
{
// Write object type and id
TABMAPObjHdr::WriteObjTypeAndId(poObjBlock);
poObjBlock->WriteInt32(m_nCoordBlockPtr);
// Combine smooth flag in the coord data size.
if (m_bSmooth)
poObjBlock->WriteInt32( m_nCoordDataSize | 0x80000000 );
else
... | false | false | false | false | false | 0 |
changeName(const SbName &newName)
//
//////////////////////////////////////////////////////////////////////////////
{
// Remove old entry from dictionary
unsigned long key = (unsigned long)(getName().getString());
nameDict->remove(key);
// Create a new fieldData with the correct name for the field:
... | false | false | false | false | false | 0 |
bnxt_alloc_rx_data(struct bnxt *bp, struct bnxt_rx_ring_info *rxr,
u16 prod, gfp_t gfp)
{
struct rx_bd *rxbd = &rxr->rx_desc_ring[RX_RING(prod)][RX_IDX(prod)];
struct bnxt_sw_rx_bd *rx_buf = &rxr->rx_buf_ring[prod];
dma_addr_t mapping;
if (BNXT_RX_PAGE_MODE(bp)) {
struct page *page = __bnxt_alloc_rx_pag... | false | false | false | false | false | 0 |
mpi_fill_random( mpi *X, size_t size, int (*f_rng)(void *), void *p_rng )
{
int ret;
size_t k;
unsigned char *p;
MPI_CHK( mpi_grow( X, size ) );
MPI_CHK( mpi_lset( X, 0 ) );
p = (unsigned char *) X->p;
for( k = 0; k < X->n * ciL; k++ )
*p++ = (unsigned char) f_rng( p_rng );
cleanu... | false | false | false | false | false | 0 |
floatx80_round_to_int(floatx80 a, float_status_t &status)
{
int aSign;
Bit64u lastBitMask, roundBitsMask;
Bit8u roundingMode;
floatx80 z;
// handle unsupported extended double-precision floating encodings
if (floatx80_is_unsupported(a))
{
float_raise(status, float_flag_invalid);
... | false | false | false | false | false | 0 |
load_png(char * file_name, int * w, int * h, int * depth, char ** data)
{
#if COMPILE_PNG_CODE
FILE *fp;
png_structp png_ptr;
png_infop info_ptr;
png_uint_32 width, height;
int bit_depth, color_type, interlace_type,
compression_type, filter_type;
int rowbytes, channels;
uns... | false | true | false | false | true | 1 |
wm_init_stack( CoreWindowStack *stack,
void *wm_data,
void *stack_data )
{
int i;
StackData *data = stack_data;
D_ASSERT( stack != NULL );
D_ASSERT( wm_data != NULL );
D_ASSERT( stack_data != NULL );
data->stack = stack;
/*... | false | false | false | false | false | 0 |
run(bool stopRunIfNotConnected, bool runNonThreaded)
{
if (mySyncLoop.getRunning())
{
ArLog::log(ArLog::Terse,
"The robot is already running, cannot run it again.");
return;
}
mySyncLoop.setRunning(true);
mySyncLoop.stopRunIfNotConnected(stopRunIfNotConnected);
mySyncLoop.runInThisThread();... | false | false | false | false | false | 0 |
gda_sqlite_handler_boolean_get_value_from_sql (G_GNUC_UNUSED GdaDataHandler *iface, const gchar *sql, G_GNUC_UNUSED GType type)
{
g_assert (sql);
GValue *value;
value = g_value_init (g_new0 (GValue, 1), G_TYPE_BOOLEAN);
if (*sql == '0')
g_value_set_boolean (value, FALSE);
else
g_value_set_boolean (value, TRUE... | false | false | false | false | false | 0 |
search_peak(FidFilter *ff, double f0, double f3) {
double f1, f2;
double r1, r2;
int a;
// Binary search, modified, taking two intermediate points. Do 20
// subdivisions, which should give 1/2^20 == 1e-6 accuracy compared
// to original range.
for (a= 0; a<20; a++) {
f1= 0.51 * f0 + 0.49 * ... | false | false | false | false | false | 0 |
iec_scale(float db)
{
float def = 0.0f; /* MeterScale deflection %age */
if (db < -70.0f) {
def = 0.0f;
} else if (db < -60.0f) {
def = (db + 70.0f) * 0.25f;
} else if (db < -50.0f) {
def = (db + 60.0f) * 0.5f + 2.5f;
} else if (db < -40.0f) {
def = (db + 50.0f) * 0.75f + 7.5f;
} else if (... | false | false | false | false | false | 0 |
rum_buffer_substrncmp(rum_buffer_t *buffer, const char *str, size_t n)
{
size_t len;
rum_set_error(NULL);
if (buffer == NULL) {
return (str == NULL)? 0 : -1;
}
if (str == NULL) {
return 1;
}
len = buffer->substr_end - buffer->substr_start + 1;
return strncmp(str, buffer-... | false | false | false | false | false | 0 |
pick_windowid(unsigned long *num) {
char line[512];
int ok = 0, n = 0, msec = 10, secmax = 15;
FILE *p;
RAWFB_RET(0)
if (use_dpy) {
set_env("DISPLAY", use_dpy);
}
/* id */
if (no_external_cmds || !cmd_ok("id")) {
rfbLogEnable(1);
rfbLog("cannot run external commands in -nocmds mode:\n");
rfbLog(" \"... | true | true | false | false | true | 1 |
do_cmd_store_knowledge(void)
{
bool leave = FALSE;
static region items_region = { 1, 4, -1, -1 };
static const menu_iter store_menu = { NULL, NULL, store_display_entry, store_menu_handle };
const menu_iter *cur_menu = &store_menu;
menu_type menu;
ui_event_data evt = EVENT_EMPTY;
store_type *st_ptr = &store[cu... | false | false | false | false | false | 0 |
IncludeFile(const std::string& fname)
{
std::string path =
m_CFDG->system()->relativeFilePath(*m_currentPath, fname.c_str());
std::istream* input = m_CFDG->system()->openFileForRead(path);
if (!input || !input->good()) {
delete input;
input = 0;
m_CFDG->system()->error();
... | false | false | false | false | false | 0 |
parseDateUnicode(const QString &inputString,
const QString &formatString,
const KCalendarSystem *calendar,
const KLocale *locale,
... | false | false | false | false | false | 0 |
chunkspec_size(int dimid) {
int idim;
for(idim = 0; idim < chunkspecs.ndims; idim++) {
if(dimid == chunkspecs.dimids[idim]) {
return chunkspecs.chunksizes[idim];
}
}
return 0;
} | false | false | false | false | false | 0 |
allocate_explosions (void)
{
XSALLOC_ARRAY (square_explo_state, lvl.square_count, EXPLOSION_UNTRIGGERED);
XMALLOC_ARRAY (square_explo_type, lvl.square_count);
explo_list_max = 64;
explo_list_first_unused = 0;
XMALLOC_ARRAY (explo_list, explo_list_max);
explo_timer = new_htimer (T_GLOBAL, HZ (70));
explo_t... | false | false | false | false | false | 0 |
scaleDimensions(const char * szLeftIn, const char * szWidthIn,
UT_uint32 iWidthAvail,
UT_sint32 * piLeft, UT_uint32 * piWidth) const
{
/* Scale the given left-offset and width using the width available.
** Compute the actual left-offset and actual width used.
** We allow the given left-offset to ... | false | false | false | false | false | 0 |
parse_rock_ridge_inode(struct iso_directory_record *de, struct inode *inode,
int relocated)
{
int flags = relocated ? RR_RELOC_DE : 0;
int result = parse_rock_ridge_inode_internal(de, inode, flags);
/*
* if rockridge flag was reset and we didn't look for attributes
* behind eventual XA attributes, have a ... | false | false | false | false | false | 0 |
get_default_keyring_start (GnomeKeyringOperationGetStringCallback callback,
gpointer data, GDestroyNotify destroy_data)
{
DBusMessage *req;
const char *string;
GkrOperation *op;
g_return_val_if_fail (callback, NULL);
req = dbus_message_new_method_call (gkr_service_name, SERVICE_PATH,
... | false | false | false | false | false | 0 |
IsLut1DNoOp(const Lut1D & lut,
float maxerror,
ErrorType errortype)
{
// If tolerance not positive, skip the check.
if(!(maxerror > 0.0)) return false;
for(int channel = 0; channel<3; ++channel)
{
... | false | false | false | false | false | 0 |
P_ArchiveThinkers(void)
{
thinker_t *th;
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function == P_MobjThinker)
{
SV_WriteByte(tc_mobj);
saveg_write_mobj_t((mobj_t *) th);
}
//I_Error("P_ArchiveThinkers: Unknown thinker func... | false | false | false | false | false | 0 |
P_Length (Object list) {
Object tail;
register int i;
for (i = 0, tail = list; !Nullp (tail); tail = Cdr (tail), i++)
Check_List (tail);
return Make_Integer (i);
} | false | false | false | false | false | 0 |
addOne()
{
const VehicleType* v = allTypesFactory->getSelectedVehicleType();
if ( !v )
return false;
if ( find( production.begin(), production.end(), v ) == production.end() ) {
production.push_back( v );
productionWidget->reLoad( true );
... | false | false | false | false | false | 0 |
Find(int id){
uAction *run = s_playerActions;
while (run){
if (run->ID() == id)
return static_cast<uActionPlayer*>(run);
run = run->Next();
}
return NULL;
} | false | false | false | false | false | 0 |
cfwrite(const void *buf, int elsize, int nelem, CFILE *cfile)
{
if(!cf_is_valid(cfile))
return 0;
if(buf == NULL || elsize == 0 || nelem == 0)
return 0;
Cfile_block *cb = &Cfile_block_list[cfile->id];
if(cb->lib_offset != 0)
{
Error(LOCATION, "Attempt to write to a VP file (unsupported)");
return 0;
}... | false | false | false | false | true | 1 |
serialize_stream_profiles (GKeyFile * out, GstEncodingProfile * sprof,
const gchar * profilename, guint id)
{
gchar *sprofgroupname;
gchar *tmpc;
GstCaps *format, *restriction;
const gchar *preset, *name, *description;
sprofgroupname = g_strdup_printf ("streamprofile-%s-%d", profilename, id);
/* Write... | false | false | false | false | false | 0 |
ll_get_by_name(const char *name)
{
struct hlist_node *n;
unsigned h = namehash(name) & (IDXMAP_SIZE - 1);
hlist_for_each(n, &name_head[h]) {
struct ll_cache *im
= container_of(n, struct ll_cache, name_hash);
if (strncmp(im->name, name, IFNAMSIZ) == 0)
return im;
}
return NULL;
} | false | false | false | false | false | 0 |
ch_ccmx_gen_window_move (ChCcmxPrivate *priv)
{
const gchar *xrandr_name;
gchar *plug_name;
GdkRectangle rect;
GdkScreen *screen;
gint i;
gint monitor_num = -1;
gint num_monitors;
gint win_height;
gint win_width;
GtkWindow *window;
/* find the monitor num of the device output */
screen = gdk_screen_get_def... | false | false | false | false | false | 0 |
fun_sscanf (const char *input, const char *fmt, void *a1, void *a2)
{
char *input_writable;
size_t size;
int ret;
size = strlen (input) + 1;
input_writable = (*__gmp_allocate_func) (size);
memcpy (input_writable, input, size);
if (a2 == NULL)
ret = sscanf (input_writable, fmt, a1);
else
... | false | false | false | false | false | 0 |
dissect_ldap_ProtocolOp(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 108 "../../asn1/ldap/ldap.cnf"
ldap_call_response_t *lcrp;
ldap_conv_info_t *ldap_info = (ldap_conv_info_t *)actx->private_data;
do_protocolop = TRUE;
of... | false | false | false | false | false | 0 |
FcConfigSaveAttr (const XML_Char **attr, FcChar8 **buf, int size_bytes)
{
int slen;
int i;
FcChar8 **new;
FcChar8 *s;
if (!attr)
return 0;
slen = 0;
for (i = 0; attr[i]; i++)
slen += strlen ((char *) attr[i]) + 1;
if (i == 0)
return 0;
slen += (i + 1) * sizeof (FcChar8 *);
... | false | false | false | false | false | 0 |
draw() {
if(isFinished()) return;
//label.draw();
glDisable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glColor4f(0.0f, 0.0f, 0.0f, alpha * 0.333f);
glPushMatrix();
glTranslatef(shadow.x, shadow.y, 0.0f);
glBegin(GL_QUADS);
... | false | false | false | false | false | 0 |
compare_e_int()
{
longlong val1= (*a)->val_int();
longlong val2= (*b)->val_int();
if ((*a)->null_value || (*b)->null_value)
return test((*a)->null_value && (*b)->null_value);
return test(val1 == val2);
} | false | false | false | false | false | 0 |
gst_mpeg_audio_parse_pre_push_frame (GstBaseParse * parse,
GstBaseParseFrame * frame)
{
GstMpegAudioParse *mp3parse = GST_MPEG_AUDIO_PARSE (parse);
GstTagList *taglist;
/* tag sending done late enough in hook to ensure pending events
* have already been sent */
if (!mp3parse->sent_codec_tag) {
gcha... | false | false | false | false | false | 0 |
genTempFilename(const char *dir,
const char *extension)
{
char buf[256];
char *tempname;
l_int32 pid, nchars;
PROCNAME("genTempFilename");
if (!dir)
return (char *)ERROR_PTR("dir not defined", procName, NULL);
#if COMPILER_MSVC
pid=GetCurrentProcessId();
#else
pid... | true | true | false | false | false | 1 |
namedNode(GroveString str, NodePtr &node) const {
StringC tem(str.data(), str.size());
normalize(&tem[0], tem.size());
return namedNodeU(tem, node);
} | false | false | false | false | false | 0 |
e_table_subset_model_to_view_row (ETableSubset *table_subset,
gint model_row)
{
gint i;
g_return_val_if_fail (E_IS_TABLE_SUBSET (table_subset), -1);
for (i = 0; i < table_subset->n_map; i++) {
if (table_subset->map_table[i] == model_row)
return i;
}
return -1;
} | false | false | false | false | false | 0 |
get_row_size()
{
if( ! get_model() ) return 0;
return get_model()->children().size();
} | false | false | false | false | false | 0 |
operator Vector(){
Vector v1(x, y, z);
return v1;
} | false | false | false | false | false | 0 |
special (void)
{
int inex;
mpfr_t x;
mpz_t z;
int i;
mpfr_exp_t e;
mpfr_init2 (x, 2);
mpz_init (z);
for (i = -1; i <= 1; i++)
{
if (i != 0)
mpfr_set_nan (x);
else
mpfr_set_inf (x, i);
mpfr_clear_flags ();
inex = mpfr_get_z (z, x, MPFR_RNDN);
if (!mpfr_... | false | false | false | false | false | 0 |
cmsWriteRawTag(cmsHPROFILE hProfile, cmsTagSignature sig, const void* data, cmsUInt32Number Size)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
int i;
if (!_cmsLockMutex(Icc->ContextID, Icc ->UsrMutex)) return 0;
if (!_cmsNewTag(Icc, sig, &i)) {
_cmsUnlockMutex(Icc->ContextID, Icc ->UsrM... | false | false | false | false | false | 0 |
spgistBuildCallback(Relation index, HeapTuple htup, Datum *values,
bool *isnull, bool tupleIsAlive, void *state)
{
SpGistBuildState *buildstate = (SpGistBuildState *) state;
MemoryContext oldCtx;
/* Work in temp context, and reset it after each tuple */
oldCtx = MemoryContextSwitchTo(buildstate->tmpCtx);
/*... | false | false | false | false | false | 0 |
retranslateMenusAndActions()
{
foreach(CommandPrivate *c, m_idCmdMap.values())
c->retranslate();
foreach(ActionContainerPrivate *c, m_idContainerMap.values())
c->retranslate();
} | false | false | false | false | false | 0 |
oncrpc_init_cred_sys ( struct oncrpc_cred_sys *auth_sys ) {
if ( ! auth_sys )
return -EINVAL;
fetch_string_setting_copy ( NULL, &hostname_setting,
&auth_sys->hostname );
if ( ! auth_sys->hostname )
if ( ! ( auth_sys->hostname = strdup ( PRODUCT_SHORT_NAME ) ) )
return -ENOMEM;
... | false | false | false | false | false | 0 |
fputa(ch, file)
FILE *file;
{
static int t[64]={
'`', '!', '"', '#', '$', '%', '&', '\'',
'(', ')', '*', '+', ',', '-', '.', '/',
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', ':', ';', '<', '=', '>', '?',
'@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
... | false | false | false | false | false | 0 |
mark_virtual_phi_result_for_renaming (gimple phi)
{
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, "Marking result for renaming : ");
print_gimple_stmt (dump_file, phi, 0, TDF_SLIM);
fprintf (dump_file, "\n");
}
mark_virtual_operand_for_renaming (gimple_phi_result (phi... | false | false | false | false | false | 0 |
_item_content_set_hook(Elm_Object_Item *it,
const char *part,
Evas_Object *content)
{
if (part && strcmp(part, "icon")) return;
_item_icon_set((Elm_Diskselector_Item *)it, content);
_identical_item_check((Elm_Diskselector_Item *)it, content);
} | false | false | false | false | false | 0 |
_get_sensor_units (ipmi_monitoring_ctx_t c,
uint8_t sensor_units_percentage,
uint8_t sensor_units_modifier,
uint8_t sensor_units_rate,
uint8_t sensor_base_unit_type,
uint8_t sensor_modifier_unit_type)
{
assert (c);
assert... | false | false | false | false | false | 0 |
ifoRead_PGCIT(ifo_handle_t *ifofile) {
if(!ifofile)
return 0;
if(!ifofile->vtsi_mat)
return 0;
if(ifofile->vtsi_mat->vts_pgcit == 0) /* mandatory */
return 0;
ifofile->vts_pgcit = (pgcit_t *)calloc(1, sizeof(pgcit_t));
if(!ifofile->vts_pgcit)
return 0;
ifofile->vts_pgcit->ref_count = 1;... | false | false | false | false | false | 0 |
qp_has_rq(struct ib_qp_init_attr *attr)
{
if (attr->qp_type == IB_QPT_XRC_INI || attr->qp_type == IB_QPT_XRC_TGT)
return 0;
return !attr->srq;
} | false | false | false | false | false | 0 |
gtk_hotkey_registry_hotkey_stored_real (GtkHotkeyRegistry *self,
GtkHotkeyInfo *info)
{
g_return_if_fail (GTK_HOTKEY_IS_INFO(info));
g_return_if_fail (GTK_HOTKEY_IS_REGISTRY(self));
g_signal_emit (self, storage_signals[HOTKEY_STORED], 0, info);
} | false | false | false | false | false | 0 |
ikrt_fxbnmult(ikptr x, ikptr y, ikpcb* pcb){
long int n2 = unfix(x);
if(n2 == 0) { return 0; }
mp_limb_t s2 = (n2>0) ? n2 : (- n2);
ikptr fst = ref(y, -vector_tag);
long int limb_count = bnfst_limb_count(fst);
pcb->root0 = &y;
ikptr r = ik_safe_alloc(pcb, align(disp_bignum_data + (limb_count+1)*wordsize))... | false | false | false | false | false | 0 |
q_facet_setup(S,f_info,needs)
struct linsys *S;
struct qinfo *f_info;
int needs; /* particular setup needs for current mode */
{ facetedge_id fe_id;
int i,j;
f_info->S = S;
if ( web.modeltype == QUADRATIC )
{ q_facet_setup_q (f_info,needs); return; }
if ( web.modeltype == LAGRANGE )
{ q_facet_setup_lag... | false | false | false | false | false | 0 |
String2Property(const QString &str)
{
KimpanelProperty result;
QStringList list = str.split(':');
if (list.size() < 4)
return result;
result.key = list.at(0);
result.label = list.at(1);
result.icon = list.at(2);
result.tip = list.at(3);
//X {
//X result.state = Kimpane... | false | false | false | false | false | 0 |
ScrollTo( int x, int y) {
if ( x < 0 )
x = 0;
if ( y < 0 )
y = 0;
if (my_area.x == x && my_area.y == y)
return;
if(y > my_area.h - my_height ) {
if ( my_area.h > my_height ) {
y = my_area.h - my_height;
if ( y < 0 )
y = 0;
} else
y = 0;
}
if(... | false | false | false | false | false | 0 |
mac80211_hwsim_addr_iter(void *data, u8 *mac,
struct ieee80211_vif *vif)
{
struct mac80211_hwsim_addr_match_data *md = data;
if (memcmp(mac, md->addr, ETH_ALEN) == 0)
md->ret = true;
} | false | false | false | false | false | 0 |
templates_get_template_licence(GeanyDocument *doc, gint licence_type)
{
GString *template;
g_return_val_if_fail(doc != NULL, NULL);
g_return_val_if_fail(licence_type == GEANY_TEMPLATE_GPL || licence_type == GEANY_TEMPLATE_BSD, NULL);
template = g_string_new(templates[licence_type]);
replace_static_values(templat... | false | false | false | false | false | 0 |
allocDirCache(Stream_t *Stream, int slot)
{
dirCache_t **dcp;
if(slot < 0) {
fprintf(stderr, "Bad slot %d\n", slot);
exit(1);
}
dcp = getDirCacheP(Stream);
if(!*dcp) {
*dcp = New(dirCache_t);
if(!*dcp)
return 0;
(*dcp)->entries = NewArray((slot+1)*2+5, dirCacheEntry_t *);
if(!(*dcp)->entries) {
... | 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.