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 |
|---|---|---|---|---|---|---|
EXTRACTOR_common_unzip_open_current_file (struct EXTRACTOR_UnzipFile *file)
{
int err;
uInt iSizeVar;
struct FileInZipReadInfo *pfile_in_zip_read_info;
uLong offset_local_extrafield; /* offset of the local extra field */
uInt size_local_extrafield; /* size of the local extra field */
if (NULL == fil... | false | false | false | false | false | 0 |
ast_xmldoc_build_seealso(const char *type, const char *name, const char *module)
{
char *output;
struct ast_xml_node *node;
if (ast_strlen_zero(type) || ast_strlen_zero(name)) {
return NULL;
}
/* get the application/function root node. */
node = xmldoc_get_node(type, name, module, documentation_language);
if... | false | false | false | false | false | 0 |
fs_funnel_getcaps (GstPad * pad)
{
FsFunnel *funnel = FS_FUNNEL (gst_pad_get_parent (pad));
GstCaps *caps;
caps = gst_pad_peer_get_caps_reffed (funnel->srcpad);
if (caps == NULL)
caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
gst_object_unref (funnel);
return caps;
} | false | false | false | false | false | 0 |
print_duration ( char *durtok, int temp )
{
int high;
int low;
int done;
high = temp;
done = FALSE;
while (high > 0 && !done)
{
if ( qdiv % high == 0 || high == 1)
{
done = TRUE;
}
else if ( high % 3 == 0 && (qdiv % (high/3) == 0) )
{
done = TRUE;
}
else if ( high%7 == 0 && qdiv%(high/7) =... | false | false | false | false | false | 0 |
bt_tags_for_each(struct blk_mq_tags *tags,
struct blk_mq_bitmap_tags *bt, unsigned int off,
busy_tag_iter_fn *fn, void *data, bool reserved)
{
struct request *rq;
int bit, i;
if (!tags->rqs)
return;
for (i = 0; i < bt->map_nr; i++) {
struct blk_align_bitmap *bm = &bt->map[i];
for (bit = find_first_bit(&... | false | false | false | false | false | 0 |
sourceRowsAboutToBeRemoved(const QModelIndex &source_parent, int start, int end)
{
Q_Q(KRecursiveFilterProxyModel);
if (source_parent.isValid() && q->filterAcceptsRow(source_parent.row(), source_parent.parent()))
{
invokeRowsAboutToBeRemoved(source_parent, start, end);
completeRemove = true;
return;
... | false | false | false | false | false | 0 |
set_logscale()
{
TBOOLEAN set_for_axis[AXIS_ARRAY_SIZE] = AXIS_ARRAY_INITIALIZER(FALSE);
int axis;
double newbase = 10;
c_token++;
if (END_OF_COMMAND) {
for (axis = 0; axis < LAST_REAL_AXIS; axis++)
set_for_axis[axis] = TRUE;
} else {
/* do reverse search because of "x", "x1", "x2" seque... | false | false | false | false | false | 0 |
gageStackBlurParmBoundarySet(gageStackBlurParm *sbp,
int boundary, double padValue) {
static const char me[]="gageStackBlurParmBoundarySet";
if (!sbp) {
biffAddf(GAGE, "%s: got NULL pointer", me);
return 1;
}
nrrdBoundarySpecNix(sbp->bspec);
sbp->bspec = nrrdBoundarySpecN... | false | false | false | false | false | 0 |
get_poll_adj(NCR_Instance inst, double error_in_estimate, double peer_distance)
{
double poll_adj;
if (error_in_estimate > peer_distance) {
int shift = 0;
unsigned long temp = (int)(error_in_estimate / peer_distance);
do {
shift++;
temp>>=1;
} while (temp);
poll_adj = -shift - inst... | false | false | false | false | false | 0 |
playlist_positions_count (playlist_positions_t *positions)
{
GList *n;
int count = g_list_length (positions->atoms);
for (n = positions->intervals; n; n = g_list_next (n)) {
interval_t *ival = (interval_t *) n->data;
count += ival->end - ival->start;
}
return count;
} | false | false | false | false | false | 0 |
gender() const
{
return Trans::ConstantTranslations::genders().at(genderIndex());
} | false | false | false | false | false | 0 |
hdhomerun_device_set_var(struct hdhomerun_device_t *hd, const char *name, const char *value, char **pvalue, char **perror)
{
if (!hd->cs) {
hdhomerun_debug_printf(hd->dbg, "hdhomerun_device_set_var: device not set\n");
return -1;
}
return hdhomerun_control_set_with_lockkey(hd->cs, name, value, hd->lockkey, pval... | false | false | false | false | false | 0 |
sfree(void *ptr)
{
struct pool *pool = NULL;
unsigned int i;
if (!ptr)
return;
global_read_lock();
for (i = 0; i < nr_pools; i++) {
if (ptr_valid(&mp[i], ptr)) {
pool = &mp[i];
break;
}
}
global_read_unlock();
if (pool) {
sfree_pool(pool, ptr);
return;
}
log_err("smalloc: ptr %p not from... | false | true | false | false | false | 1 |
cmGeneratedFileStream():
cmGeneratedFileStreamBase(), Stream()
{
} | false | false | false | false | false | 0 |
extract_meta_data(string_ty **spp)
{
cstate_ty *change_set;
const char *begin;
const char *end;
string_ty *s;
//
// See if the necessary text markers are present.
//
begin = strstr((*spp)->str_text, "Aegis-Change-Set-Begin");
if (!begin)
return 0;
while (*... | false | false | false | false | false | 0 |
a1D(double s) {
// rG is defined as the running width.
double rG = 0;
// The rho and pion cut off thresholds defined in the fit.
double piM = 0.16960;
double rM = 0.83425;
// Fit of width below three pion mass threshold.
if (s < piM)
rG = 0;
// Fit of width below pion and rho mass threshold.
e... | false | false | false | false | false | 0 |
set_min_rpc_time(double future_time, const char* reason) {
if (future_time <= min_rpc_time) return;
min_rpc_time = future_time;
possibly_backed_off = true;
if (log_flags.sched_op_debug) {
msg_printf(this, MSG_INFO,
"[sched_op] Deferring communication for %s",
timediff_for... | false | false | false | false | false | 0 |
postCoreInitialization()
{
if (Utils::Log::warnPluginsCreation())
WARN_FUNC;
userCore().postCoreInitialization();
} | false | false | false | false | false | 0 |
plugin_db_catalog_get_free ( GWDBContext *context) {
GWDBDisk* disk = NULL;
_data *data = NULL;
GNode *tree = NULL;
gint i = 0, nb = 0;
guint64 free = 0;
if ( context != NULL ) {
data = gw_db_context_get_data ( context);
tree = data->tree;
nb = g_node_n_children ( tree);
for ( i = 0; i < nb; i++ ) {
... | false | false | false | false | false | 0 |
map_str(char *outbuf, size_t outbuflen,
const char *input_str)
{
size_t input_len;
size_t output_len;
/* get the length of the input string */
input_len = strlen(input_str);
/* map the string to the output buffer */
output_len = map(&outbuf, &outbufl... | false | false | false | false | false | 0 |
sgen_memgov_major_collection_end (gboolean forced)
{
last_collection_los_memory_usage = los_memory_usage;
if (forced) {
sgen_get_major_collector ()->finish_sweeping ();
sgen_memgov_calculate_minor_collection_allowance ();
}
} | false | false | false | false | false | 0 |
usbnet_cdc_update_filter(struct usbnet *dev)
{
struct cdc_state *info = (void *) &dev->data;
struct usb_interface *intf = info->control;
struct net_device *net = dev->net;
u16 cdc_filter = USB_CDC_PACKET_TYPE_DIRECTED
| USB_CDC_PACKET_TYPE_BROADCAST;
/* filtering on the device is an optional feature and not w... | false | false | false | false | false | 0 |
AppendRlist(struct Rlist **start,void *item, char type)
/* Allocates new memory for objects - careful, could leak! */
{ struct Rlist *rp,*lp = *start;
struct FnCall *fp;
switch(type)
{
case CF_SCALAR:
Debug("Appending scalar to rval-list [%s]\n",(char *)item);
break;
case CF_FNCALL:... | false | false | false | false | false | 0 |
gsb_data_scheduled_get_adjusted_amount_for_currency ( gint scheduled_number,
gint return_currency_number,
gint return_exponent )
{
struct_scheduled *scheduled;
gsb_real amount = null_real;
gint link_number;
if (return_exponent == -1)
return_expone... | false | false | false | false | false | 0 |
free_data_level_4( definitionInfoT *info )
{
uint64_t i;
if( info->processNames != NULL )
{
for( i = 0; i < info->counterProcessDefinition; i++ )
{
free( (info->processNames)[i] );
}
free( info->processNames );
}
if( info->processGroupNames != NULL )
{
for( i = 0; i < info->count... | false | false | false | false | false | 0 |
playlist_get_next(playlist_t *pl)
{
if (pl == NULL) {
printf("%s: playlist_get_next(): Internal error: NULL argument\n",
__progname);
exit(1);
}
if (pl->program)
return (playlist_run_program(pl));
if (pl->num == 0)
return (NULL);
return ((const char *)pl->list[pl->index++]);
} | false | false | false | false | false | 0 |
init_sensitivity (SnippetsEditor *snippets_editor)
{
SnippetsEditorPrivate *priv = NULL;
gboolean has_snippet = FALSE;
/* Assertions */
g_return_if_fail (ANJUTA_IS_SNIPPETS_EDITOR (snippets_editor));
priv = ANJUTA_SNIPPETS_EDITOR_GET_PRIVATE (snippets_editor);
has_snippet = ANJUTA_IS_SNIPPET (priv->snippet);
... | false | false | false | false | false | 0 |
pc_render_add_request(struct drm_i915_gem_request *req)
{
struct intel_engine_cs *ring = req->ring;
u32 scratch_addr = ring->scratch.gtt_offset + 2 * CACHELINE_BYTES;
int ret;
/* For Ironlake, MI_USER_INTERRUPT was deprecated and apparently
* incoherent with writes to memory, i.e. completely fubar,
* so we nee... | false | false | false | false | false | 0 |
test_crc(int start)
{
void *buf;
uint32_t crc;
if (!(super.flags & CRAMFS_FLAG_FSID_VERSION_2)) {
#ifdef INCLUDE_FS_TESTS
return;
#else
errx(FSCK_USAGE, _("unable to test CRC: old cramfs format"));
#endif
}
crc = crc32(0L, Z_NULL, 0);
buf =
mmap(NULL, super.size, PROT_READ | PROT_WRITE, MAP_PRIVATE, f... | false | false | false | false | true | 1 |
extract_menu_item_name (char *item_text)
{
char *p;
if (*item_text == '*')
item_text++;
while (*item_text == ' ')
item_text++;
p = item_text;
while (*p && *p != ':') p++;
return copy_string (item_text, p - item_text);
} | false | false | false | false | false | 0 |
CreateNewTeam()
{
// check if the team change is legal
tASSERT ( nCLIENT != sn_GetNetState() );
if(!TeamChangeAllowed( true )) {
return;
}
if ( !eTeam::NewTeamAllowed() ||
( bool( currentTeam ) && ( currentTeam->NumHumanPlayers() == 1 ) ) ||
IsSpectating() )
{
... | false | false | false | false | false | 0 |
rhash_whirlpool_update(whirlpool_ctx *ctx, const unsigned char* msg, size_t size)
{
unsigned index = (unsigned)ctx->length & 63;
unsigned left;
ctx->length += size;
/* fill partial block */
if(index) {
left = whirlpool_block_size - index;
memcpy(ctx->message + index, msg, (size < left ? size : left));
if(si... | false | false | false | false | false | 0 |
e_book_backend_summary_check_magic (EBookBackendSummary *summary,
FILE *fp)
{
gchar buf[PAS_SUMMARY_MAGIC_LEN + 1];
gint rv;
memset (buf, 0, sizeof (buf));
rv = fread (buf, PAS_SUMMARY_MAGIC_LEN, 1, fp);
if (rv != 1)
return FALSE;
if (strcmp (buf, PAS_SUMMARY_MAGIC))
retu... | false | false | false | false | false | 0 |
ipmi_ek_display_current_descriptor(
struct fru_picmgext_carrier_activation_record car,
struct fru_picmgext_activation_record * cur_desc, char * filename )
{
int index = 0;
float power_in_watt = 0.0;
float current_in_amp = 0.0;
for ( index = 0; index < car.module_activation_record_count; index++... | false | false | false | false | false | 0 |
on_preview_draw (GtkWidget *widget,
cairo_t *cr,
CcBackgroundPanel *panel)
{
CcBackgroundPanelPrivate *priv = panel->priv;
/* we have another shot in flight or an existing cache */
if (panel->priv->display_screenshot == NULL
&& panel->priv->screenshot_path... | false | false | false | false | false | 0 |
liquidio_stop_nic_module(struct octeon_device *oct)
{
int i, j;
struct lio *lio;
dev_dbg(&oct->pci_dev->dev, "Stopping network interfaces\n");
if (!oct->ifcount) {
dev_err(&oct->pci_dev->dev, "Init for Octeon was not completed\n");
return 1;
}
for (i = 0; i < oct->ifcount; i++) {
lio = GET_LIO(oct->props[... | false | false | false | false | false | 0 |
go_plugin_services_shutdown (void)
{
g_return_if_fail (services != NULL);
g_hash_table_destroy (services);
services = NULL;
} | false | false | false | false | false | 0 |
slotOpenFile()
{
QString fileName = QFileDialog::getOpenFileName(this, tr("Open PDF Document"), QDir::homePath(), tr("PDF Documents (*.pdf)"));
if (fileName.isEmpty()) {
return;
}
loadDocument(fileName);
} | false | false | false | false | false | 0 |
xdrrec_inline(XDR *xdrs, int len)
{
/* LINTED pointer cast */
RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
rpc_inline_t *buf = NULL;
switch (xdrs->x_op) {
case XDR_ENCODE:
if ((rstrm->out_finger + len) <= rstrm->out_boundry) {
/* LINTED pointer cast */
buf = (rpc_inline_t *)rstrm->out_finger;
rstr... | false | false | false | false | false | 0 |
reportWriteFeatTable(AjPReport thys,const AjPFeattable ftable,
const AjPSeq seq)
{
AjPFile outf;
AjIList iterft = NULL;
AjPFeature feature = NULL;
ajuint istart = 0;
ajuint iend = 0;
AjPStr subseq = NULL;
ajuint ntags;
static AjPStr* tagtypes = NULL;
static AjPStr*... | false | false | false | false | false | 0 |
formatOffsetRFC822(int32_t offset, UnicodeString& result, UErrorCode& status) const {
if (U_FAILURE(status)) {
result.setToBogus();
return result;
}
if (offset <= -MAX_OFFSET || offset >= MAX_OFFSET) {
result.setToBogus();
status = U_ILLEGAL_ARGUMENT_ERROR;
return res... | false | false | false | false | false | 0 |
removeTrailingWhitespace(string &str) {
// strip trailing whitespace
string::size_type first_pos = str.find_last_not_of(" \t");
if (first_pos != string::npos) {
string::size_type last_pos = str.find_first_of(" \t", first_pos);
while (last_pos != string::npos) {
str.erase(last_pos... | false | false | false | false | false | 0 |
dfs_global_file_read(struct file *file, char __user *u,
size_t count, loff_t *ppos)
{
struct dentry *dent = file->f_path.dentry;
int val;
if (dent == dfs_chk_gen)
val = ubifs_dbg.chk_gen;
else if (dent == dfs_chk_index)
val = ubifs_dbg.chk_index;
else if (dent == dfs_chk_orph)
val = ubifs_dbg.chk_or... | false | false | false | false | false | 0 |
lpuart32_console_get_options(struct lpuart_port *sport, int *baud,
int *parity, int *bits)
{
unsigned long cr, bd;
unsigned int sbr, uartclk, baud_raw;
cr = lpuart32_read(sport->port.membase + UARTCTRL);
cr &= UARTCTRL_TE | UARTCTRL_RE;
if (!cr)
return;
/* ok, the port was enabled */
cr = lpuart32_rea... | false | false | false | false | false | 0 |
Scheduler_Cell_shadow_end(C4_Transition *transition,
C4_Score *src_cell, gint shadow_start,
gint dst_query_pos, gint dst_target_pos,
gpointer user_data){
register gint i;
register C4_Shadow *shadow;
for(i = 0; i < tran... | false | false | false | false | false | 0 |
ct_pcm_playback_close(struct snd_pcm_substream *substream)
{
struct ct_atc *atc = snd_pcm_substream_chip(substream);
/* TODO: Notify mixer inactive. */
if (IEC958 == substream->pcm->device)
atc->spdif_out_passthru(atc, 0);
/* The ct_atc_pcm object will be freed by runtime->private_free */
return 0;
} | false | false | false | false | false | 0 |
_krb5_des_checksum(krb5_context context,
const EVP_MD *evp_md,
struct _krb5_key_data *key,
const void *data,
size_t len,
Checksum *cksum)
{
struct _krb5_evp_schedule *ctx = key->schedule->data;
EVP_MD_CTX *m;
DES_cblock ivec;
unsigned char *p = cksum->checksum.data;
krb5_ge... | false | false | false | false | false | 0 |
listfields (LexState *ls) {
/* listfields -> { ',' exp1 } [','] */
int n = 1; /* one has been read before */
while (ls->token == ',') {
next(ls);
if (ls->token == ';' || ls->token == '}')
break;
exp1(ls);
n++;
if (n%LFIELDS_PER_FLUSH == 0)
flush_list(ls, n/LFIELDS_PER_FLUSH - 1, L... | false | false | false | false | false | 0 |
delallobj(int x, int y)
{
struct obj *otmp, *otmp2;
for (otmp = level.objects[x][y]; otmp; otmp = otmp2) {
if (otmp == uball)
unpunish();
/* after unpunish(), or might get deallocated chain */
otmp2 = otmp->nexthere;
if (otmp == uchain)
continue;
... | false | false | false | false | false | 0 |
createDefaultTextures(video::IVideoDriver * driver)
{
const u32 width = 256;
const u32 height = 256;
video::IImage * imageA8R8G8B8 = driver->createImage (video::ECF_A8R8G8B8, core::dimension2d<u32>(width, height));
if ( !imageA8R8G8B8 )
return;
const u32 pitch = imageA8R8G8B8->getPitch();
// s... | false | false | false | false | false | 0 |
navi_calc_frametiming(gint32 frame_nr, char *buf, gint32 sizeof_buf)
{
gint32 first;
gdouble framerate;
first = frame_nr;
if(naviD->ainfo_ptr)
{
first = naviD->ainfo_ptr->first_frame_nr;
}
framerate = 24.0;
if(naviD->vin_ptr)
{
framerate = naviD->vin_ptr->framerate;
}
gap_timeconv_frame... | false | false | false | false | false | 0 |
cgw_sender(void *arg)
{
SMSCConn *conn = arg;
PrivData *privdata = conn->data;
Msg *msg = NULL;
Connection *server = NULL;
int l = 0;
int ret = 0;
conn->status = SMSCCONN_CONNECTING;
/* Make sure we log into our own log-file if defined */
log_thread_to(conn->log_idx);
while (!... | false | false | false | false | false | 0 |
rr_open(struct net_device *dev)
{
struct rr_private *rrpriv = netdev_priv(dev);
struct pci_dev *pdev = rrpriv->pci_dev;
struct rr_regs __iomem *regs;
int ecode = 0;
unsigned long flags;
dma_addr_t dma_addr;
regs = rrpriv->regs;
if (rrpriv->fw_rev < 0x00020000) {
printk(KERN_WARNING "%s: trying to configure ... | false | false | false | false | false | 0 |
sourceSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected)
{
Q_Q(KBreadcrumbSelectionModel);
QItemSelection deselectedCrumbs = getBreadcrumbSelection(deselected);
QItemSelection selectedCrumbs = getBreadcrumbSelection(selected);
QItemSelection removed = deselectedCrumbs;
foreach... | false | false | false | false | false | 0 |
notifyExpireInfo(TNotifyScriptParams& params, const TSrvAddrMgr::TExpiredInfo& exp,
TAddrIA::TIAType type) {
stringstream tmp;
tmp << exp.ia->getIface();
params.addParam("IFINDEX", tmp.str());
SPtr<TIfaceIface> iface = SrvIfaceMgr().getIfaceByID(exp.ia->getIface());
... | false | false | false | false | false | 0 |
__ecereNameSpace__ecere__gfx__drivers__STRETCH_B8T(struct __ecereNameSpace__ecere__com__Instance * src, struct __ecereNameSpace__ecere__com__Instance * dst, int dx, int dy, int sx, int sy, int w, int h, int sw, int sh)
{
int x, y;
unsigned int xerr, yerr;
unsigned int adddest = ((struct __ecereNameSpace__ecere__gfx__Bi... | false | false | false | false | false | 0 |
fbus_initialise(int attempt, struct gn_statemachine *state)
{
unsigned char init_char = 0x55;
bool connection = false;
if (!state)
return GN_ERR_FAILED;
/* Fill in the link functions */
state->link.loop = &fbus_loop;
state->link.send_message = &fbus_send_message;
state->link.reset = &fbus_reset;
state->link... | false | false | false | false | true | 1 |
destroy_link(struct talloc_link *link)
{
list_del(&link->list);
if (list_empty(&link->linked->links))
talloc_free(link->linked);
return 0;
} | false | false | false | false | false | 0 |
argf_rewind()
{
if (!next_argv()) {
rb_raise(rb_eArgError, "no stream to rewind");
}
ARGF_FORWARD();
return rb_io_rewind(current_file);
} | false | false | false | false | false | 0 |
stmmac_get_ethtool_stats(struct net_device *dev,
struct ethtool_stats *dummy, u64 *data)
{
struct stmmac_priv *priv = netdev_priv(dev);
int i, j = 0;
/* Update the DMA HW counters for dwmac10/100 */
if (!priv->plat->has_gmac)
priv->hw->dma->dma_diagnostic_fr(&dev->stats,
(void *) &priv->xstats,
... | false | false | false | false | false | 0 |
pipeRunAAMono1(SplashPipe *pipe) {
Guchar aSrc;
SplashColor cDest;
Guchar cResult0;
//----- read destination pixel
cDest[0] = (*pipe->destColorPtr & pipe->destColorMask) ? 0xff : 0x00;
//----- source alpha
aSrc = div255(pipe->aInput * pipe->shape);
//----- result color
// note: aDest = alpha2 = aRe... | false | false | false | false | false | 0 |
generate_list (const char *s, DATASET *dset, int *err)
{
parser p;
int *ret = NULL;
*err = realgen(s, &p, dset, NULL, P_LIST | P_PRIVATE);
if (!*err) {
NODE *n = p.ret;
if (n->t == LIST) {
const int *nlist = n->v.ivec;
if (nlist == NULL) {
*err = E_DATA;
} else {
ret = gretl_lis... | false | false | false | false | false | 0 |
SplinePointMDFree(SplineChar *sc, SplinePoint *sp) {
MinimumDistance *md, *prev, *next;
if ( sc!=NULL ) {
prev = NULL;
for ( md = sc->md; md!=NULL; md = next ) {
next = md->next;
if ( md->sp1==sp || md->sp2==sp ) {
if ( prev==NULL )
sc->md = next;
else
prev->next = next;
chunkfree... | false | false | false | false | false | 0 |
SetType(TargetType type, const char* name)
{
this->Name = name;
// only add dependency information for library targets
this->TargetTypeValue = type;
if(this->TargetTypeValue >= STATIC_LIBRARY
&& this->TargetTypeValue <= MODULE_LIBRARY)
{
this->RecordDependencies = true;
}
else
{
this-... | false | false | false | false | false | 0 |
ars_d_field_off(char *packet, char *layer, char *field, int skip,
int *field_start, int *value_start, int *value_end)
{
char *p = packet;
int end, toadd;
/* Minimal overhead with a zero skip */
if (skip <= 0)
return ars_d_firstfield_off(packet, layer, field,
field_start, value_start, value_end);
do {
if... | false | false | false | false | false | 0 |
name2val (const gchar **attribute_names,
const gchar **attribute_values,
const gchar *name)
{
while (*attribute_names)
{
if (!strcmp (*attribute_names, name))
{
return *attribute_values;
}
attribute_names++;
... | false | false | false | false | false | 0 |
workon_release( const char *name )
{
Wentry **dptr, *ent, *tmp = NULL;
unsigned int hash;
if( ! name || ! (*name) )
{
msglog( MSG_ERR, "workon_release: invalid name" );
return;
}
hash = string_hash( name );
pthread_mutex_lock( &hash_lock );
WENTRY_LOCATE( name, hash, dptr );
ent = *dptr;
if( ! ent ) /*... | false | false | false | false | false | 0 |
do_session_property_tests (void)
{
gboolean use_system;
GTlsDatabase *tlsdb;
char *ca_file;
SoupSession *session;
debug_printf (1, "session properties\n");
session = soup_session_async_new ();
g_object_get (G_OBJECT (session),
"ssl-use-system-ca-file", &use_system,
"tls-database", &tlsdb,
"ssl-ca... | false | false | false | false | false | 0 |
readSIB(struct InternalInstruction* insn) {
SIBIndex sibIndexBase = SIB_INDEX_NONE;
SIBBase sibBaseBase = SIB_BASE_NONE;
uint8_t index, base;
dbgprintf(insn, "readSIB()");
if (insn->consumedSIB)
return 0;
insn->consumedSIB = true;
switch (insn->addressSize) {
case 2:
dbgprintf(insn, "SIB-bas... | false | false | false | false | false | 0 |
crypt_iv_lmk_init(struct crypt_config *cc)
{
struct iv_lmk_private *lmk = &cc->iv_gen_private.lmk;
int subkey_size = cc->key_size / cc->key_parts;
/* LMK seed is on the position of LMK_KEYS + 1 key */
if (lmk->seed)
memcpy(lmk->seed, cc->key + (cc->tfms_count * subkey_size),
crypto_shash_digestsize(lmk-... | false | true | false | false | false | 1 |
uwb_rsv_find_best_col_alloc(struct uwb_rsv_alloc_info *ai, int interval)
{
int n_safe, n_unsafe, n_mas;
int n_column = UWB_NUM_ZONES / interval;
int max_per_zone = ai->max_mas / n_column;
int min_per_zone = ai->min_mas / n_column;
if (ai->min_mas % n_column)
min_per_zone++;
if (min_per_zone > UWB_MAS_PER_ZO... | false | false | false | false | false | 0 |
test_prompt_properties_unset (Test *test,
gconstpointer unused)
{
GcrPrompt *prompt;
GError *error = NULL;
prompt = gcr_system_prompt_open_for_prompter (test->prompter_name, 0, NULL, &error);
g_assert_no_error (error);
g_assert (GCR_IS_SYSTEM_PROMPT (prompt));
g_object_add_weak_poin... | false | false | false | false | false | 0 |
gc_qsort(ListNode **inds,int s,int e, enum SortTypes st)
{
Region creg,sreg;
int i,m,last;
int r;
if (s>=e) return;
m=(s+e)/2;
creg=LIST_RNUM(inds,m);
LIST_RNUM(inds,m)=LIST_RNUM(inds,s);
LIST_RNUM(inds,s)=creg;
last=s;
for(i=s+1;i<=e;i++)
{
if (st==SORT_BY_S... | false | false | false | false | false | 0 |
xsh_localization_load( cpl_frame* frame){
cpl_table* table = NULL;
cpl_propertylist* header = NULL;
const char* tablename = NULL;
xsh_localization *result = NULL;
int pol_degree = 0;
cpl_size k;
/* check input parameters */
XSH_ASSURE_NOT_NULL( frame);
/* get table filename */
check( tablename = ... | false | false | false | false | false | 0 |
boundsCheckY(int y_)
{
if (y_<sliderAreaRect().y()) y_=sliderAreaRect().y();
if (y_+_elevator->height()>sliderAreaRect().y()+sliderAreaRect().height())
{ y_=sliderAreaRect().y()+sliderAreaRect().height()-_elevator->height(); }
return y_;
} | false | false | false | false | false | 0 |
qla2x00_sysfs_read_fw_dump(struct file *filp, struct kobject *kobj,
struct bin_attribute *bin_attr,
char *buf, loff_t off, size_t count)
{
struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj,
struct device, kobj)));
struct qla_hw_data *ha = vha->hw;
int rval = 0;
if (!(ha->fw_dum... | false | false | false | false | false | 0 |
opcode_delete(opcode_ty *op)
{
trace(("opcode_delete(op = %08lX)\n{\n", (long)op));
assert(op);
assert(op->method);
if (op->method->destructor)
op->method->destructor(op);
op->method = 0; /* paranoia */
mem_free(op);
trace(("}\n"));
} | false | false | false | false | false | 0 |
camel_mime_filter_index_new (CamelIndex *index)
{
CamelMimeFilter *new;
CamelMimeFilterIndexPrivate *priv;
new = g_object_new (CAMEL_TYPE_MIME_FILTER_INDEX, NULL);
priv = CAMEL_MIME_FILTER_INDEX_GET_PRIVATE (new);
if (index != NULL)
priv->index = g_object_ref (index);
return new;
} | false | false | false | false | false | 0 |
create(int buttonType, int pX1, int pY1, int pX2, int pY2,
const void* bodyPtr, char pElastic, char defIsPushed)
{
int strLen;
init_flag = 1;
button_type = buttonType;
x1 = pX1;
y1 = pY1;
x2 = pX2;
y2 = pY2;
elastic = pElastic;
is_pushed = defIsPushed;
enable_flag = 1;
//------------------... | false | false | false | false | false | 0 |
Execute () {
Editor* ed = GetEditor();
Editor* newEd = new FrameEditor((OverlayComp*)GetGraphicComp());
*newEd->GetState("ModifStatusVar") = *ed->GetState("ModifStatusVar");
unidraw->Open(newEd);
} | false | false | false | false | false | 0 |
get_gui_specific_themes_directories(int *count)
{
const struct strvec *data_dirs = get_data_dirs();
char **directories = fc_malloc(strvec_size(data_dirs) * sizeof(char *));
int i = 0;
*count = strvec_size(data_dirs);
strvec_iterate(data_dirs, data_dir) {
char buf[strlen(data_dir) + strlen("/themes/gui-... | false | false | false | false | false | 0 |
replace_aggs_with_params_mutator(Node *node, List **context)
{
if (node == NULL)
return NULL;
if (IsA(node, Aggref))
{
Aggref *aggref = (Aggref *) node;
TargetEntry *curTarget = (TargetEntry *) linitial(aggref->args);
ListCell *l;
foreach(l, *context)
{
PrivateMMAggInfo *info = (PrivateMMAggInfo... | false | false | false | false | false | 0 |
eina_inlist_iterator_next(Eina_Iterator_Inlist *it, void **data) {
if (!it->current)
return EINA_FALSE;
if (data)
*data = (void *)it->current;
it->current = it->current->next;
return EINA_TRUE;
} | false | false | false | false | false | 0 |
ipmi_pef_get_policy_table(struct ipmi_intf * intf,
struct pef_cfgparm_policy_table_entry ** table)
{ /*
// get the PEF policy table: allocate space, fillin, and return its size
// NB: the caller must free the returned area (when returned size > 0)
*/
struct ipmi_rs * rsp;
struct ipmi_rq req;
struct pef... | false | true | false | false | false | 1 |
show_get() {
if (adt_ali != 0) {
if ((seq == 0) || (show_timestamp < timestamp) ) {
ADT_SEQUENCE::show_update();
}
return seq;
}
new AD_ERR("ADT_SEQUENCE::show_get() class not inited ?",CORE);
return 0;
} | false | false | false | false | false | 0 |
return_gap_lebs(struct ubifs_info *c)
{
int *p, err;
if (!c->gap_lebs)
return 0;
dbg_cmt("");
for (p = c->gap_lebs; *p != -1; p++) {
err = ubifs_change_one_lp(c, *p, LPROPS_NC, LPROPS_NC, 0,
LPROPS_TAKEN, 0);
if (err)
return err;
}
kfree(c->gap_lebs);
c->gap_lebs = NULL;
return 0;
} | false | false | false | false | false | 0 |
counter_alloc_res(struct mlx4_dev *dev, int slave, int op, int cmd,
u64 in_param, u64 *out_param, int port)
{
u32 index;
int err;
if (op != RES_OP_RESERVE)
return -EINVAL;
err = mlx4_grant_resource(dev, slave, RES_COUNTER, 1, 0);
if (err)
return err;
err = __mlx4_counter_alloc(dev, &index);
if (er... | false | false | false | false | false | 0 |
test_object_tree_read__loaded(void)
{
// acces randomly the entries on a loaded tree
git_oid id;
git_tree *tree;
git_oid_fromstr(&id, tree_oid);
cl_git_pass(git_tree_lookup(&tree, g_repo, &id));
cl_assert(git_tree_entry_byname(tree, "README") != NULL);
cl_assert(git_tree_entry_byname(tree, "NOTEXISTS") == N... | false | false | false | false | false | 0 |
pcmpt_parse(char* ibuf)
{
int i, j1, j2, j3, j4, j5, j6;
int lat, lon;
char altflag, u1, u2;
float alt, f1, f2;
char coords[20] = {0};
int dmy, hms;
dmy = hms = 0;
sscanf(ibuf,"$PCMPT,%d,%d,%d,%c,%f,%d,%[^,],%d,%f,%d,%f,%c,%d,%c,%d",
&j1, &j2, &j3, &altflag, &alt, &j4, (char*) &coords,
... | true | true | false | false | false | 1 |
udp_datagramsWritten(int count)
{
QList<Written> writtenDests;
while(count > 0)
{
Q_ASSERT(!writeItems.isEmpty());
WriteItem wi = writeItems.takeFirst();
--count;
if(wi.type == WriteItem::Data)
{
int at = -1;
for(int n = 0; n < writtenDests.count(); ++n)
{
if(writtenDests[n].add... | false | false | false | false | false | 0 |
compute_outgoing_frequencies (b)
basic_block b;
{
edge e, f;
if (b->succ && b->succ->succ_next && !b->succ->succ_next->succ_next)
{
rtx note = find_reg_note (b->end, REG_BR_PROB, NULL);
int probability;
if (!note)
return;
probability = INTVAL (XEXP (find_reg_note (b->end,
... | false | false | false | false | false | 0 |
tp_account_chat_enabled_changed_cb (TpAccount *tp_account,
GParamSpec *spec,
GoaTpAccountLinker *self)
{
GoaTpAccountLinkerPrivate *priv = self->priv;
const gchar *id;
GoaObject *goa_object;
GoaAccount *goa_account;
gbool... | false | false | false | false | false | 0 |
LC141(base0)
register object *base0;
{ register object *base=vs_base;
register object *sup=base+VM154; VC154
vs_reserve(VM154);
ihs_check;
{register object V814;
check_arg(1);
V814=(base[0]);
vs_top=sup;
{register object V815;
register object V816;
V815= Cnil;
V816= (base0[0]->c.c_car);
goto T6553;
T6553:;
... | false | false | false | false | false | 0 |
shadowText(QString text, QColor textColor, QColor shadowColor, QPoint offset, int radius)
{
return shadowText(text, qApp->font(), textColor, shadowColor, offset, radius);
} | false | false | false | false | false | 0 |
ms_excel_chart_read_PROTECT (BiffQuery *q, XLChartReadState *state)
{
gboolean is_protected;
XL_CHECK_CONDITION (q->length >= 2);
is_protected = (1 == GSF_LE_GET_GUINT16 (q->data));
d (4, g_printerr ("Chart is%s protected;\n",
is_protected ? "" : " not"););
} | false | false | false | false | false | 0 |
xhci_urb_free_priv(struct urb_priv *urb_priv)
{
if (urb_priv) {
kfree(urb_priv->td[0]);
kfree(urb_priv);
}
} | false | false | false | false | false | 0 |
__connman_ipconfig_deladdr(int index, int family, const char *label,
unsigned char prefixlen, const char *address)
{
struct connman_ipdevice *ipdevice;
struct connman_ipaddress *ipaddress;
enum connman_ipconfig_type type;
GList *list;
DBG("index %d", index);
ipdevice = g_hash_table_lookup(ipdevice_hash, GIN... | false | false | false | false | false | 0 |
getHeightFromFloat(float x, float y) const
{
if (!m_V8 || !m_V9)
return m_gridHeight;
x = MAP_RESOLUTION * (32 - x / SIZE_OF_GRIDS);
y = MAP_RESOLUTION * (32 - y / SIZE_OF_GRIDS);
int x_int = (int)x;
int y_int = (int)y;
x -= x_int;
y -= y_int;
x_int &= (MAP_RESOLUTION - 1);
... | false | false | false | false | false | 0 |
owl_safe_move(int move, int color)
{
int acode, safe = 0;
if (trymove(move, color, "owl_safe_move", 0)) {
acode = attack(move, NULL);
if (acode != WIN)
safe = 1;
else
safe = 0;
popgo();
}
current_owl_data->safe_move_cache[move] = safe+1;
return safe;
} | false | false | false | false | false | 0 |
mono_once (mono_once_t *once, void (*once_init) (void))
{
int thr_ret;
if (!once->complete) {
pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
(void *)&once->mutex);
thr_ret = pthread_mutex_lock (&once->mutex);
g_assert (thr_ret == 0);
if (!once->complete) {
once_init ();
once... | 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.