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 |
|---|---|---|---|---|---|---|
tpf_persona_get_type (void) {
static volatile gsize tpf_persona_type_id__volatile = 0;
if (g_once_init_enter (&tpf_persona_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (TpfPersonaClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tpf_persona_class_init, (GClassFin... | false | false | false | false | false | 0 |
acpi_battery_print_alarm(struct seq_file *seq, int result)
{
struct acpi_battery *battery = seq->private;
if (result)
goto end;
if (!acpi_battery_present(battery)) {
seq_printf(seq, "present: no\n");
goto end;
}
seq_printf(seq, "alarm: ");
if (!battery->alarm)
seq_print... | false | false | false | false | false | 0 |
CL_ParseServerMessage (void)
{
int cmd;
char *s;
int i;
//
// if recording demos, copy the message out
//
if (cl_shownet->value == 1)
Com_Printf ("%i ",net_message.cursize);
else if (cl_shownet->value >= 2)
Com_Printf ("------------------\n");
//
// parse the message
//
while (1)
{
... | false | true | false | false | false | 1 |
inf_text_session_constructor(GType type,
guint n_construct_properties,
GObjectConstructParam* construct_properties)
{
GObject* object;
InfTextSession* session;
InfTextSessionPrivate* priv;
InfTextBuffer* buffer;
InfSessionStatus status;
object = G_O... | false | false | false | false | false | 0 |
ipath_copy(char *dst, const char *src)
{
for(; *src; dst++, src++) {
*dst = *src;
}
*dst = '\0';
} | false | false | false | false | false | 0 |
rcSortValidRates(const RATE_TABLE_11N *pRateTable, TX_RATE_CTRL *pRc)
{
A_UINT8 i,j;
for (i=pRc->maxValidRate-1; i > 0; i--) {
for (j=0; j <= i-1; j++) {
#ifdef MAGPIE_MERLIN
if (pRateTable->info[pRc->validRateIndex[j]].rateKbps >
pRateTable->info[pRc->validRateIndex[j+1]].rateKbps)
#else
// K2... | false | false | false | false | false | 0 |
queryCharFormat(const gchar * szProperty, UT_UTF8String & szValue, bool & bExplicitlyDefined, bool & bMixedSelection) const
{
UT_return_val_if_fail(szProperty,false);
bMixedSelection = false;
if (isSelectionEmpty())
return queryCharFormat(szProperty, szValue, bExplicitlyDefined, getPoint());
PT_DocPosition pos... | false | false | false | false | false | 0 |
mwifiex_ret_enh_power_mode(struct mwifiex_private *priv,
struct host_cmd_ds_command *resp,
struct mwifiex_ds_pm_cfg *pm_cfg)
{
struct mwifiex_adapter *adapter = priv->adapter;
struct host_cmd_ds_802_11_ps_mode_enh *ps_mode =
&resp->params.psmode_enh;
uint16_t action = le16_to_cpu(ps_mode->actio... | false | false | false | false | false | 0 |
CreateAnother(void) const
{
::itk::LightObject::Pointer smartPtr;
Pointer copyPtr = Self::New();
copyPtr->SetNode(0, this->GetNode(0) );
copyPtr->SetNode(1, this->GetNode(1) );
copyPtr->SetNode(2, this->GetNode(2) );
copyPtr->SetNode(3, this->GetNode(3) );
copyPtr->SetNode(4, this->GetNode(4) );
copyPt... | false | false | false | false | false | 0 |
cmd_commit_tree(int argc, const char **argv, const char *prefix)
{
int i;
int parents = 0;
unsigned char tree_sha1[20];
unsigned char commit_sha1[20];
char comment[1000];
char *buffer;
unsigned int size;
int encoding_is_utf8;
git_config(git_default_config);
if (argc < 2)
usage(commit_tree_usage);
if (get... | true | true | true | false | true | 1 |
find_entity(xmlNode * parent, const char *node_name, const char *id)
{
xmlNode *a_child = NULL;
for (a_child = __xml_first_child(parent); a_child != NULL; a_child = __xml_next(a_child)) {
/* Uncertain if node_name == NULL check is strictly necessary here */
if (node_name == NULL || strcmp((cons... | false | false | false | false | false | 0 |
STATIC_TLS_TID_OFFSET()
{
static int offset = -1;
if (offset != -1)
return offset;
char *ptr;
long major = strtol(gnu_get_libc_version(), &ptr, 10);
long minor = strtol(ptr+1, NULL, 10);
if (major != 2) {
MTCP_PRINTF("**** Error:: Incompatible glibc version: %s\n",
gnu_get_libc_vers... | false | false | false | false | false | 0 |
reformatDoubleValue(
char *result,
char *format,
const char *oldmem
) {
char c;
double dval;
int ret = 1;
DENTER(TOP_LAYER, "reformatDoubleValue");
if (parse_ulong_val(&dval, NULL, TYPE_MEM, oldmem, NULL, 0)) {
if (dval==DBL_MAX) {
strcpy(result, "infinity");
} el... | false | false | false | false | false | 0 |
upClicked()
{
if (fields->currentItem()) {
int index = fields->invisibleRootItem()->indexOfChild(fields->currentItem());
if (index == 0) return; // its at the top already
// movin on up!
QWidget *button = fields->itemWidget(fields->currentItem(),2);
QComboBox *comboButton = ... | false | false | false | false | false | 0 |
open_obj_file(struct prog_info *pi, char *filename)
{
int i;
FILE *fp;
struct include_file *include_file;
fp = fopen(filename, "wb");
if(fp) {
i = pi->cseg_count * 9 + 26;
fputc((i >> 24) & 0xff, fp);
fputc((i >> 16) & 0xff, fp);
fputc((i >> 8) & 0xff, fp);
fputc(i & 0xff, fp);
i = 26;
fputc((i >> 2... | false | false | false | false | false | 0 |
keyPressEvent(QKeyEvent *e)
{
// Normally, widgets are not sent Tab keys this way in the first
// place as they are handled by QWidget::event() for focus handling
// already. But we get our events via EventPropagator::sendEvent()
// directly. Ignore them so that HTMLGenericFormElementImpl::
// defau... | false | false | false | false | false | 0 |
isValid() const
{
// logic from Botan
if(d->infoMap.value(CommonName).isEmpty() || d->infoMap.value(Country).isEmpty())
return false;
if(d->infoMap.value(Country).length() != 2)
return false;
if(d->start >= d->end)
return false;
return true;
} | false | false | false | false | false | 0 |
AddUsedArea(float size, float angle, float dist)
{
float sr_dist = size + m_searcherSize;
// by Law of cosines, angle of searcher/used centers
float sr_angle = acos((m_searcherDist * m_searcherDist + dist * dist - sr_dist * sr_dist) / (2 * m_searcherDist * dist));
// skip some unexpected results.
... | false | false | false | false | false | 0 |
write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len)
{
u16 *vmem16;
u16 *txbuf16 = (u16 *)par->txbuf.buf;
size_t remain;
size_t to_copy;
size_t tx_array_size;
int i;
int ret = 0;
size_t startbyte_size = 0;
fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s(offset=%zu, len=%zu)\n",
__func__, offset, len... | false | false | false | false | false | 0 |
gdm_session_handle_client_begin_verification_for_user (GdmDBusUserVerifier *user_verifier_interface,
GDBusMethodInvocation *invocation,
const char *service_name,
... | false | false | false | false | false | 0 |
twofeat_get_overlap_type(const AjPStr overlap)
{
if(ajStrMatchC(overlap, "A"))
return OV_ANY;
if(ajStrMatchC(overlap, "O"))
return OV_OVERLAP;
if(ajStrMatchC(overlap, "NO"))
return OV_NOTOVER;
if(ajStrMatchC(overlap, "NW"))
return OV_NOTIN;
if(ajStrMatchC(overlap, "AW"))
return OV_AIN;
... | false | false | false | false | false | 0 |
uct_find_node(struct uct_tree *tree, struct uct_node *parent, int move)
{
struct uct_node *node = NULL;
Hash_data *boardhash = &tree->game.mc.hash;
unsigned int hash_index = hashdata_remainder(*boardhash,
tree->hashtable_size);
unsigned int *hashtable = tree->hashtable_even;
if (tree->game.depth &... | false | false | false | false | false | 0 |
es_func_fd_read (void *cookie, void *buffer, size_t size)
{
estream_cookie_fd_t file_cookie = cookie;
ssize_t bytes_read;
if (IS_INVALID_FD (file_cookie->fd))
{
ESTREAM_SYS_YIELD ();
bytes_read = 0;
}
else
{
do
bytes_read = ESTREAM_SYS_READ (file_cookie->fd, buffer, size)... | false | false | false | false | false | 0 |
update_refs_for_switch(struct checkout_opts *opts,
struct branch_info *old,
struct branch_info *new)
{
struct strbuf msg = STRBUF_INIT;
const char *old_desc;
if (opts->new_branch) {
if (opts->new_orphan_branch) {
if (opts->new_branch_log && !log_all_ref_updates) {
int temp;
char log_file[P... | false | false | false | false | false | 0 |
unpack_anon_auth_info (gnutls_session_t session, gnutls_buffer_st * ps)
{
int ret;
size_t pack_size;
anon_auth_info_t info = NULL;
BUFFER_POP_NUM (ps, pack_size);
if (pack_size == 0)
return 0; /* nothing to be done */
/* client and server have the same auth_info here
*/
ret =
... | false | false | false | false | false | 0 |
uca_ring_buffer_available (UcaRingBuffer *buffer)
{
g_return_val_if_fail (UCA_IS_RING_BUFFER (buffer), FALSE);
return buffer->priv->read_index < buffer->priv->write_index;
} | false | false | false | false | false | 0 |
emit_other(struct scoreboard *sb, struct blame_entry *ent, int opt)
{
int cnt;
const char *cp;
struct origin *suspect = ent->suspect;
struct commit_info ci;
char hex[41];
int show_raw_time = !!(opt & OUTPUT_RAW_TIMESTAMP);
get_commit_info(suspect->commit, &ci, 1);
strcpy(hex, sha1_to_hex(suspect->commit->objec... | false | false | false | false | false | 0 |
cfgfile_separate_linea (const TCHAR *filename, char *line, TCHAR *line1b, TCHAR *line2b)
{
char *line1, *line2;
int i;
line1 = line;
line1 += strspn (line1, "\t \r\n");
if (*line1 == ';')
return 0;
line2 = strchr (line, '=');
if (! line2) {
TCHAR *s = au (line1);
write_log (_T("CFGFILE: '%s', linea was in... | false | false | false | false | false | 0 |
cmd_set(struct userrec *u, int idx, char *msg)
{
int code;
char s[512], *result;
#ifdef USE_TCL_ENCODING
Tcl_DString dstr;
#endif
if (!(isowner(dcc[idx].nick)) && (must_be_owner)) {
dprintf(idx, MISC_NOSUCHCMD);
return;
}
putlog(LOG_CMDS, "*", "#%s# set %s", dcc[idx].nick, msg);
strcpy(s, "set ")... | true | true | false | false | false | 1 |
config_start(GcomprisBoard *agcomprisBoard,
GcomprisProfile *aProfile)
{
board_conf = agcomprisBoard;
profile_conf = aProfile;
if (gcomprisBoard)
pause_board(TRUE);
gchar * label = g_strdup_printf(_("<b>%s</b> configuration\n for profile <b>%s</b>"),
agcomprisBoard->name,
aProfile? aProf... | false | false | false | false | false | 0 |
previousCodePoint(UErrorCode & /*errorCode*/) {
if(pos == 0) {
return U_SENTINEL;
}
UChar32 c;
U8_PREV_OR_FFFD(u8, 0, pos, c);
return c;
} | false | false | false | false | false | 0 |
get_string_property(DBusGProxy *proxy, const char * property, std::string & value)
{
char* c_value = NULL;
GError *error = NULL;
dbus_g_proxy_call (proxy, "GetPropertyString", &error, G_TYPE_STRING, property, G_TYPE_INVALID, G_TYPE_STRING, &c_value, G_TYPE_INVALID);
if (error != NULL)
g_error_free(error);... | false | false | false | false | false | 0 |
skip_artificial_parms_for (const_tree fn, tree list)
{
if (DECL_NONSTATIC_MEMBER_FUNCTION_P (fn))
list = TREE_CHAIN (list);
else
return list;
if (DECL_HAS_IN_CHARGE_PARM_P (fn))
list = TREE_CHAIN (list);
if (DECL_HAS_VTT_PARM_P (fn))
list = TREE_CHAIN (list);
return list;
} | false | false | false | false | false | 0 |
createElement(QDomDocument & doc)
{
QDomElement elem = doc.createElement("CSVMapField");
QDomElement elemThis;
elemThis = doc.createElement("Name");
elemThis.appendChild(doc.createTextNode(_name));
elem.appendChild(elemThis);
if(_isKey)
elem.appendChild(doc.createElement("isKey"));
if(_type != QVar... | false | false | false | false | false | 0 |
pcmcia_read16_remap(struct map_info *map, unsigned long ofs)
{
caddr_t addr;
map_word d = {{0}};
addr = remap_window(map, ofs);
if(!addr)
return d;
d.x[0] = readw(addr);
pr_debug("ofs = 0x%08lx (%p) data = 0x%04lx\n", ofs, addr, d.x[0]);
return d;
} | false | false | false | false | false | 0 |
make_constant( void ) /* expects the constant value on the stack */
{
cell *ent;
for( ent = constlast; ent ; ent = (cell *)(intptr_t) ent[ D_PREV ] ) { /* look for previous definition */
if( ent[D_PRIM] == (cell) constant && ent[D_DATA] == *sp ) { /* got a match */
*sp = (intptr_t) ent; /* return it... | false | false | false | false | false | 0 |
tx_ut_sendto(txdrv_t *tx, pmsg_t *mb, const gnet_host_t *to)
{
struct attr *attr = tx->opaque;
struct ut_msg *um;
unsigned i;
ut_attr_check(attr);
gnet_stats_inc_general(GNR_UDP_SR_TX_MESSAGES_GIVEN);
/*
* If the host is still listed in the temporary ban, because we could not
* successfully send messages t... | false | false | false | false | false | 0 |
GEOSRelatePatternMatch_r(GEOSContextHandle_t extHandle, const char *mat,
const char *pat)
{
if ( 0 == extHandle )
{
return 2;
}
GEOSContextHandleInternal_t *handle = 0;
handle = reinterpret_cast<GEOSContextHandleInternal_t*>(extHandle);
if ( 0 == handle->initi... | false | false | false | false | false | 0 |
action_list_cards (GSList *contacts,
ActionContext *p_actctx)
{
FILE *outputfile;
long length;
CARD_FORMAT format;
length = g_slist_length (contacts);
if (length <= 0) {
g_warning ("Couldn't load addressbook correctly!!!! %s####", p_actctx->addressbook_source_uid ?
p_actctx->addressbook_... | false | false | false | false | false | 0 |
HASH_GetHashTypeByOidTag(SECOidTag hashOid)
{
HASH_HashType ht = HASH_AlgNULL;
switch(hashOid) {
case SEC_OID_MD2: ht = HASH_AlgMD2; break;
case SEC_OID_MD5: ht = HASH_AlgMD5; break;
case SEC_OID_SHA1: ht = HASH_AlgSHA1; break;
case SEC_OID_SHA224: ht = HASH_AlgSHA224; break;
cas... | false | false | false | false | false | 0 |
lfsr_next(struct fio_lfsr *fl, uint64_t *off, uint64_t last)
{
if (fl->num_vals++ > fl->max_val)
return 1;
do {
if (fl->cycle_length && !--fl->cycle_length) {
__lfsr_next(fl, fl->spin + 1);
fl->cycle_length = fl->cached_cycle_length;
goto check;
}
__lfsr_next(fl, fl->spin);
check: ;
} while (fl->la... | false | false | false | false | false | 0 |
cpunum_set_clockscale(int cpunum, double clockscale)
{
VERIFY_CPUNUM_VOID(cpunum_set_clockscale);
cpu[cpunum].clockscale = clockscale;
sec_to_cycles[cpunum] = cpu[cpunum].clockscale * Machine->drv->cpu[cpunum].cpu_clock;
cycles_to_sec[cpunum] = 1.0 / sec_to_cycles[cpunum];
/* re-compute the perfect inter... | false | false | false | false | false | 0 |
match_modeid(int type, aClient *cptr, aChannel *chptr)
{
Reg Link *tmp;
if (!IsPerson(cptr))
return NULL;
for (tmp = chptr->mlist; tmp; tmp = tmp->next)
{
if (tmp->flags == type)
{
if (match(tmp->value.alist->nick, cptr->name) != 0)
{
/* seems like no match on nick, but... */
if (isdigit(tmp->... | false | false | false | false | false | 0 |
CheckFocus()
{
wxWindow *win = FindFocus();
if ((win==m_area)||(win==m_xAxis)||(win==m_yAxis)||(win==this))
{
if (!m_focused)
{
m_focused = true;
wxClientDC dc(this);
wxSize size = GetClientSize();
dc.DrawBitmap(*m_activeBitmap, size.GetWidth()... | false | false | false | false | false | 0 |
gnibbles_worm_queue_keypress (GnibblesWorm * worm, guint dir)
{
key_queue_entry *entry;
int n = worm->number;
if (key_queue[n] == NULL)
key_queue[n] = g_queue_new ();
/* Ignore duplicates in normal movement mode. This resolves the
* key repeat issue. We ignore this in relative mode because then
* yo... | false | false | false | false | false | 0 |
duplicate (const char *str)
{
char *result = NULL;
if (str != NULL)
{
result = strdup (str);
if (result == NULL)
perror (NULL);
}
return result;
} | false | false | false | false | false | 0 |
checkForUnusedReturnValue(const Scope *scope)
{
for (const Token *tok = scope->classStart; tok != scope->classEnd; tok = tok->next()) {
if (Token::Match(tok, "{|}|; %var% (") && tok->strAt(-1) != "=") {
tok = tok->next();
const int allocationId = _settings->library.alloc(tok);
... | false | false | false | false | false | 0 |
archive_compressor_compress_open(struct archive_write_filter *f)
{
int ret;
struct private_data *state;
f->code = ARCHIVE_COMPRESSION_COMPRESS;
f->name = "compress";
ret = __archive_write_open_filter(f->next_filter);
if (ret != ARCHIVE_OK)
return (ret);
state = (struct private_data *)calloc(1, sizeof(*state... | false | false | false | false | false | 0 |
o_logout(struct Luser *lptr, int ac, char **av, int sockfd)
{
if (lptr && (lptr->flags & L_OSREGISTERED))
lptr->flags &= ~L_OSREGISTERED;
os_notice(lptr, sockfd, "Logged out");
o_RecordCommand(sockfd, "LOGOUT");
#ifdef SHAKEIT
toserv(":%s SVSID %s ao\r\n", Me.name, lptr->nick);
#endif
} | false | false | false | false | false | 0 |
ReplyGetActiveCalls(int messagetype, unsigned char *buffer, int length, gn_data *data, struct gn_statemachine *state)
{
at_driver_instance *drvinst;
gn_error error;
at_line_buffer buf;
int status;
if (!data->call_active)
return GN_ERR_INTERNALERROR;
if ((error = at_error_get(buffer, state)) != GN_ERR_NONE)
... | false | false | false | false | true | 1 |
compareRow( const void* A, const void* B )
{
int numberOfGroupings;
int comp;
char*** rA = (char***)A;
char*** rB = (char***)B;
char** rowA = *rA;
char** rowB = *rB;
if(opField != (-1)) /* the sorting by the operation field is the highest priority */
if((comp = compareCell(rowA[opField],rowB[opField],opField... | false | false | false | false | false | 0 |
ramoops_pstore_erase(enum pstore_type_id type, u64 id, int count,
struct timespec time, struct pstore_info *psi)
{
struct ramoops_context *cxt = psi->data;
struct persistent_ram_zone *prz;
switch (type) {
case PSTORE_TYPE_DMESG:
if (id >= cxt->max_dump_cnt)
return -EINVAL;
prz = cxt->przs[id];
break;
... | false | false | false | false | false | 0 |
drm_atomic_set_fb_for_plane(struct drm_plane_state *plane_state,
struct drm_framebuffer *fb)
{
if (plane_state->fb)
drm_framebuffer_unreference(plane_state->fb);
if (fb)
drm_framebuffer_reference(fb);
plane_state->fb = fb;
if (fb)
DRM_DEBUG_ATOMIC("Set [FB:%d] for plane state %p\n",
fb->base.id, ... | false | false | false | false | false | 0 |
extractRotThermElasticIGP_p(AMPIBuffer* B)
{
CRotThermElasticIGP* res=new CRotThermElasticIGP;
res->setName(B->pop_string());
res->setSpringConst(B->pop_double());
res->setDiffusivity(B->pop_double());
return res;
} | false | false | false | false | false | 0 |
libuna_utf8_string_compare_with_utf16(
const libuna_utf8_character_t *utf8_string,
size_t utf8_string_size,
const libuna_utf16_character_t *utf16_string,
size_t utf16_string_size,
libcerror_error_t **error )
{
static char *function = "libuna_utf8_string_compare_wit... | false | false | false | false | false | 0 |
value_stack_pop (ParseInfo *info)
{
GConfValue *retval;
if (!info->value_stack)
return NULL;
retval = info->value_stack->data;
info->value_freelist = g_slist_remove (info->value_freelist, retval);
info->value_stack = g_slist_remove (info->value_stack, retval);
return retval;
} | false | false | false | false | false | 0 |
config_tool_entry_get( BackendDB *be, ID id )
{
CfBackInfo *cfb = be->be_private;
BackendInfo *bi = cfb->cb_db.bd_info;
if ( bi && bi->bi_tool_entry_get )
return bi->bi_tool_entry_get( &cfb->cb_db, id );
else
return NULL;
} | false | false | false | false | false | 0 |
seahorse_context_dispose (GObject *gobject)
{
SeahorseContext *sctx;
GSList *objects, *l;
sctx = SEAHORSE_CONTEXT (gobject);
/* Release all the objects */
objects = NULL;
g_hash_table_foreach (sctx->pv->objects_by_source, hash_to_ref_slist, &objects);
for (l = objects; l; l = g_sli... | false | false | false | false | false | 0 |
entry_fill_from_node(Entry* e)
{
gchar* tmp;
GError* error = NULL;
g_return_if_fail(e->node != NULL);
tmp = my_xmlGetProp(e->node, "schema");
if (tmp != NULL)
{
/* Filter any crap schemas that appear, some speed cost */
gchar* why_bad = NULL;
if (gconf_valid_key(tmp, &why_bad))
... | false | false | false | false | false | 0 |
addContent(CachedObject* o)
{
if (!o)
return; // The object is null. Nothing to do. Just bail.
StyleGeneratedData *t_generated = generated.access();
ContentData* lastContent = t_generated->content;
while (lastContent && lastContent->_nextContent)
lastContent = lastContent->_nextContent... | false | false | false | false | false | 0 |
gm_mcp_icecrew_serverinfo_create_view(GmMcpPackage *package, GObject *parent) {
GmMcpIcecrewServerinfoView *view;
if (!GM_IS_APP_VIEW(parent)) {
return;
}
view = g_new(GmMcpIcecrewServerinfoView, 1);
view->view = GM_APP_VIEW(parent);
view->package = GM_MCP_ICECREW_SERVERINFO(package);
// Connect the got_... | false | false | false | false | false | 0 |
player_capital(const struct player *pplayer)
{
if (!pplayer) {
/* The client depends on this behavior in some places. */
return NULL;
}
city_list_iterate(pplayer->cities, pcity) {
if (is_capital(pcity)) {
return pcity;
}
} city_list_iterate_end;
return NULL;
} | false | false | false | false | false | 0 |
mx_bin_allocate_child (MxBin *bin,
const ClutterActorBox *box,
ClutterAllocationFlags flags)
{
MxBinPrivate *priv;
g_return_if_fail (MX_IS_BIN (bin));
priv = bin->priv;
if (priv->child)
{
MxPadding padding;
ClutterActorBox alloc... | false | false | false | false | false | 0 |
strtoupper (char *s_orig)
{
char *s;
for (s = s_orig; *s != '\0'; s++)
if (isascii (*s))
*s = toupper (*s);
return s_orig;
} | false | false | false | false | false | 0 |
createSpecialChangeRecord(PX_ChangeRecord ** ppcr,
PT_DocPosition dpos,
PT_BlockOffset blockOffset)
{
UT_return_val_if_fail (ppcr,false);
PX_ChangeRecord_Object * pcr
= new PX_ChangeRecord_Object(PX_Chang... | false | false | false | false | false | 0 |
gda_binary_to_string (const GdaBinary *bin, guint maxlen)
{
gint nb_rewrites = 0;
gchar *sptr, *rptr;
gulong realsize = MYMIN ((gulong)(bin->binary_length), maxlen);
gchar *retval;
gulong offset = 0;
if (!bin->data || (bin->binary_length == 0))
return g_strdup ("");
/* compute number of char rewrites */
fo... | false | false | false | false | false | 0 |
do_read()
{
debuglog(("ClientSession::do_read(), connected: %d\n", connected));
if (!connected)
{
if (!connect_parent())
{
state = STARTING;
// Disable reads on the PTY until we are connected (or it fails)
LATServer::Instance()->set_fd_state(master_fd, true);
close(slave_fd);
sl... | false | false | false | false | false | 0 |
SplitPath(anchor, before)
register struct segment *anchor;
register struct segment *before;
{
register struct segment *r;
if (before == anchor->last)
return(NULL);
r = before->link;
r->last = anchor->last;
anchor->last = before;
before->link = N... | false | false | false | true | false | 1 |
do_ll_wrap(const double *x, const double *y, int n,
void (*func) (const double *, const double *, int))
{
double *xx = G_malloc(n * sizeof(double));
int count, i;
memcpy(xx, x, n * sizeof(double));
count = euclidify(xx, y, n, 0);
for (i = 0; i < count; i++) {
int j;
(*func) (xx, y, n);... | false | false | false | false | false | 0 |
goochTrace(const Ray& ray){
Object * obj;
Hit min_hit = trace(ray, &obj);
if(!obj) return Vector(0.0, 0.0, 0.0);
Material *material = obj->material; //the hit objects material
Point hit = ray.at(min_hit.t); //the hit point
Vector N = min_hit.N.normalized(); //the normal at hit point
Vecto... | false | false | false | false | false | 0 |
pg_stat_get_backend_activity(PG_FUNCTION_ARGS)
{
int32 beid = PG_GETARG_INT32(0);
PgBackendStatus *beentry;
const char *activity;
if ((beentry = pgstat_fetch_stat_beentry(beid)) == NULL)
activity = "<backend information not available>";
else if (!superuser() && beentry->st_userid != GetUserId())
activity = "... | false | false | false | false | false | 0 |
jbd2_journal_start_commit(journal_t *journal, tid_t *ptid)
{
int ret = 0;
write_lock(&journal->j_state_lock);
if (journal->j_running_transaction) {
tid_t tid = journal->j_running_transaction->t_tid;
__jbd2_log_start_commit(journal, tid);
/* There's a running transaction and we've just made sure
* it's com... | false | false | false | false | false | 0 |
binarylib_read_s8(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
{
ScmObj port_scm;
ScmPort* port;
ScmObj endian_scm;
ScmSymbol* endian;
ScmObj SCM_SUBRARGS[4];
int SCM_i;
SCM_ENTER_SUBR("read-s8");
if (SCM_ARGCNT >= 3
&& !SCM_NULLP(SCM_ARGREF(SCM_ARGCNT-1)))
Scm_Error("too many arguments: up to... | false | false | false | false | false | 0 |
ISNS_GetDD_ID_from_sym ( char *p_sym )
{
SOIP_DB_Entry lentry;
SOIP_Dd *p_dd;
ISNS_DBKey qkey = { 0 };
int rval;
if ( p_sym )
{
memset(&qkey, 0, sizeof(qkey));
qkey.tag = DD_ID_KEY;
while (SNSdbGetNextOfKey (&qkey) == SUCCESS)
{
/* If a symboli... | false | false | false | false | false | 0 |
debugfs_write_file_bool(struct file *file, const char __user *user_buf,
size_t count, loff_t *ppos)
{
char buf[32];
size_t buf_size;
bool bv;
bool *val = file->private_data;
buf_size = min(count, (sizeof(buf)-1));
if (copy_from_user(buf, user_buf, buf_size))
return -EFAULT;
buf[buf_size] = '\0';
if (str... | false | false | false | false | false | 0 |
on_menu_view_show_rules()
{
const bool active = m_action_showrules->get_active();
m_canvas.set_rules_visibility(active);
Gtk::Widget* hruler = Glib::wrap(GTK_WIDGET(m_hruler));
Gtk::Widget* vruler = Glib::wrap(GTK_WIDGET(m_vruler));
if(active)
{
hruler->drag_source_set(m_drag_targets_rule);
vruler... | false | false | false | false | false | 0 |
gtk_plot_canvas_rectangle_set_attributes(GtkPlotCanvasRectangle *rectangle,
GtkPlotLineStyle style,
gfloat width,
const GdkColor *fg,
const GdkColor *bg,
... | false | false | false | false | false | 0 |
_shelf_handler_rename_cb(E_Config_Dialog_Data *cfdata, int type __UNUSED__, E_Event_Shelf *ev)
{
const Eina_List *l;
E_Ilist_Item *ili;
EINA_LIST_FOREACH(e_widget_ilist_items_get(cfdata->o_list), l, ili)
{
if (e_widget_ilist_item_data_get(ili) != ev->shelf) continue;
e_ilist_item_label_se... | false | false | false | false | false | 0 |
process_journal_block(ext2_filsys fs,
blk_t *block_nr,
e2_blkcnt_t blockcnt,
blk_t ref_block EXT2FS_ATTR((unused)),
int ref_offset EXT2FS_ATTR((unused)),
void *priv_data)
{
struct process_block_struct *p;
blk_t blk = *block_nr;
p = (struct process_block_struct *) priv_data;
if (blk < fs->... | false | false | false | false | false | 0 |
init_reiserfs_fs(void)
{
int ret;
ret = init_inodecache();
if (ret)
return ret;
reiserfs_proc_info_global_init();
ret = register_filesystem(&reiserfs_fs_type);
if (ret)
goto out;
return 0;
out:
reiserfs_proc_info_global_done();
destroy_inodecache();
return ret;
} | false | false | false | false | false | 0 |
supersede_group (struct group_object *group, int writep)
{
struct group_object *t;
/* Register the group in the group name hash table,
so we can look it up later. */
if (group_name_hash) {
t = (struct group_object *)0;
group_hash_lookup (&t, group_name_hash,
group -> name,
strlen (group -> name),... | false | false | false | false | false | 0 |
addTab(const core::rect<s32>& rectangle,
IGUIElement* parent, s32 id)
{
IGUITab* t = new CGUITab(-1, this, parent ? parent : this,
rectangle, id);
t->drop();
return t;
} | false | false | false | false | false | 0 |
ftrace_find_tramp_ops_new(struct dyn_ftrace *rec)
{
struct ftrace_ops *op;
unsigned long ip = rec->ip;
do_for_each_ftrace_op(op, ftrace_ops_list) {
/* pass rec in as regs to have non-NULL val */
if (hash_contains_ip(ip, op->func_hash))
return op;
} while_for_each_ftrace_op(op);
return NULL;
} | false | false | false | false | false | 0 |
Argusgen_host(addr, mask, proto, dir)
u_int addr;
u_int mask;
int proto;
int dir;
{
struct ablock *b0, *b1 = NULL;
switch (proto) {
case Q_DEFAULT:
b0 = Argusgen_hostop(addr, mask, dir, ETHERTYPE_ARP, 40, 44);
b1 = Argusgen_hostop(addr, mask, dir, ETHERTYPE_IP, 40, 44);
Argusgen_or(b0, b1);... | false | false | false | false | false | 0 |
fishd_env_get(const char *key)
{
const char *env = getenv(key);
if (env != NULL)
{
return env_var_t(str2wcstring(env));
}
else
{
const wcstring wkey = str2wcstring(key);
const wchar_t *tmp = env_universal_common_get(wkey);
return tmp ? env_var_t(tmp) : env_var_t::... | false | false | false | false | false | 0 |
camel_header_param (struct _camel_header_param *params,
const gchar *name)
{
while (params && params->name &&
g_ascii_strcasecmp (params->name, name) != 0)
params = params->next;
if (params)
return params->value;
return NULL;
} | false | false | false | false | false | 0 |
fdilate_2_15(l_uint32 *datad,
l_int32 w,
l_int32 h,
l_int32 wpld,
l_uint32 *datas,
l_int32 wpls)
{
l_int32 i;
register l_int32 j, pwpls;
register l_uint32 *sptr, *dptr;
l_int32 wpls4;
wpls4 = 4 * wpls;
pwpls =... | false | false | false | false | false | 0 |
agfrino_lists_scan(int is_aggregate,
int which_it,
int which_ait,
struct fsck_iag_info *iagiptr,
int *errors_detected,
struct fsck_imap_msg_info *msg_info_ptr)
{
int intermed_rc = FSCK_OK;
uint32_t agidx;
struct iagctl *agg_agrec;
struct fsck_ag_record *wsp_agrec;
int e... | false | false | false | false | false | 0 |
_evas_map_new(int count)
{
int i;
int alloc;
Evas_Map *m;
/* Adjust allocation such that: at least 4 points, and always an even
* number: this allows the software engine to work efficiently */
alloc = (count < 4) ? 4 : count;
if (alloc & 0x1) alloc ++;
m = calloc(1, sizeof(Evas_Map) + (alloc ... | false | false | false | false | false | 0 |
ack_recv(struct mad_rmpp_recv *rmpp_recv,
struct ib_mad_recv_wc *recv_wc)
{
struct ib_mad_send_buf *msg;
int ret, hdr_len;
hdr_len = ib_get_mad_data_offset(recv_wc->recv_buf.mad->mad_hdr.mgmt_class);
msg = ib_create_send_mad(&rmpp_recv->agent->agent, recv_wc->wc->src_qp,
recv_wc->wc->pkey_index, 1, hdr... | false | false | false | false | false | 0 |
Assign(const char *str, va_list ap)
{
if (str==0 || str[0]==0)
{
sharedString=&emptyString;
return;
}
char stackBuff[512];
if (_vsnprintf(stackBuff, 512, str, ap)!=-1
#ifndef _WIN32
// Here Windows will return -1 if the string is too long; Linux just truncates the string.
&& strlen(str) <511
... | false | false | false | false | false | 0 |
smpboot_unpark_thread(struct smp_hotplug_thread *ht, unsigned int cpu)
{
struct task_struct *tsk = *per_cpu_ptr(ht->store, cpu);
if (!ht->selfparking)
kthread_unpark(tsk);
} | false | false | false | false | false | 0 |
e_collection_backend_factory_prepare_mail (ECollectionBackendFactory *factory,
ESource *mail_account_source,
ESource *mail_identity_source,
ESource *mail_transport_source)
{
ECollectionBacke... | false | false | false | true | false | 1 |
ct_terminate_read(char flgs)
{
char readbuf[132];
char t;
short *p;
int i;
if (debug == 2) { printf(" Entered static void ct_terminate_read...\n");}
read_present = FALSE;
alarm(0);
readbuf[0] = 0x09;
readbuf[1] = 0x00;
readbuf[4] = 0x03;
if (aheadcnt > 0) t = 0x10;
else t = 0x00;
readbuf[5] = f... | true | true | false | false | false | 1 |
handleSpecialQueryResult( CollectionTreeItem::Type type, Collections::QueryMaker *qm, const Meta::DataList &dataList )
{
CollectionTreeItem *parent = 0;
if( type == CollectionTreeItem::VariousArtist )
parent = m_compilationQueries.value( qm );
else if( type == CollectionTreeItem::NoLabel )
... | false | false | false | false | false | 0 |
init()
{
if (!first) return;
// need a full neighbor list once
int irequest = neighbor->request((void *) this);
neighbor->requests[irequest]->pair = 0;
neighbor->requests[irequest]->fix = 1;
neighbor->requests[irequest]->half = 0;
neighbor->requests[irequest]->full = 1;
neighbor->requests[irequest]->... | false | false | false | false | false | 0 |
GetNeighbourMask( int x, int y, int* Arr )
{
int res = 0;
for ( int d = 0; d < sidenum; d++ ) {
int x1 = x;
int y1 = y;
getnextfield ( x1, y1, d );
MapField* fld = getfield ( x1, y1 );
if ( fld ) {
... | false | false | false | false | false | 0 |
Update()
{
/// execute the callbacks waiting in the synchronization queue
MaNGOS::IQueryCallback* callback = NULL;
while (next(callback))
{
callback->Execute();
delete callback;
}
} | false | false | false | false | false | 0 |
tg3_irq_count(struct tg3 *tp)
{
u32 irq_cnt = max(tp->rxq_cnt, tp->txq_cnt);
if (irq_cnt > 1) {
/* We want as many rx rings enabled as there are cpus.
* In multiqueue MSI-X mode, the first MSI-X vector
* only deals with link interrupts, etc, so we add
* one to the number of vectors we are requesting.
*... | false | false | false | false | false | 0 |
formatValue( const QVariant &value, bool beautify )
{
if ( value.type() == QVariant::ByteArray ) {
// check the first bytes (up to 8) if they are
// printable characters
QByteArray arr = value.toByteArray();
bool printable = true;
for ( int i=qMin( arr.size(), 8 )-1; i>=0 && printable; i-- ) {
... | 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.