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 |
|---|---|---|---|---|---|---|
set_new_state (mw, val, level)
XlwMenuWidget mw;
widget_value* val;
int level;
{
int i;
mw->menu.new_depth = 0;
for (i = 0; i < level; i++)
push_new_stack (mw, mw->menu.old_stack [i]);
push_new_stack (mw, val);
} | false | false | false | false | false | 0 |
invoke_main(JNIEnv* env, jclass main_class, int argc, char** argv)
{
jmethodID main_mid;
jobjectArray main_args;
int i = 0;
DENTER(TOP_LAYER, "invoke_main");
main_mid = (*env)->GetStaticMethodID(env, main_class, "main", "([Ljava/lang/String;)V");
if (main_mid == NULL) {
CRITICAL((SGE_EVENT, "cla... | false | false | false | false | false | 0 |
cifs_new_fileinfo(struct cifs_fid *fid, struct file *file,
struct tcon_link *tlink, __u32 oplock)
{
struct dentry *dentry = file->f_path.dentry;
struct inode *inode = d_inode(dentry);
struct cifsInodeInfo *cinode = CIFS_I(inode);
struct cifsFileInfo *cfile;
struct cifs_fid_locks *fdlocks;
struct cifs_tcon *tc... | false | false | false | false | false | 0 |
GetHierachicalSearchTags(const ERootType& inRootType) const
{
assert( inRootType == ePatientRootType );
std::vector<Tag> tags;
// Patient is always toplevel !
// just return Required and Unique
std::vector<Tag> utags = GetUniqueTags(inRootType);
tags.insert(tags.end(), utags.begin(), utags.end());
return ... | false | false | false | false | false | 0 |
send_message(struct sap_connection *conn, void *buf, size_t size)
{
size_t written = 0;
GError *gerr = NULL;
GIOStatus gstatus;
if (!conn || !buf)
return -EINVAL;
DBG("conn %p, size %zu", conn, size);
gstatus = g_io_channel_write_chars(conn->io, buf, size, &written,
&gerr);
if (gstatus != G_IO_STAT... | false | false | false | false | false | 0 |
xfs_iomap_eof_align_last_fsb(
xfs_mount_t *mp,
xfs_inode_t *ip,
xfs_extlen_t extsize,
xfs_fileoff_t *last_fsb)
{
xfs_extlen_t align = 0;
int eof, error;
if (!XFS_IS_REALTIME_INODE(ip)) {
/*
* Round up the allocation request to a stripe unit
* (m_dalign) boundary if the file size is >= stripe unit
* ... | false | false | false | false | false | 0 |
keyword_delete(GtkTreeStore *keyword_tree, GtkTreeIter *iter_ptr)
{
GList *list;
GtkTreeIter child;
while (gtk_tree_model_iter_children(GTK_TREE_MODEL(keyword_tree), &child, iter_ptr))
{
keyword_delete(keyword_tree, &child);
}
meta_data_connect_mark_with_keyword(GTK_TREE_MODEL(keyword_tree), iter_ptr, -1);
... | false | false | false | false | false | 0 |
ajFeatGetSeq(const AjPFeature thys,
const AjPSeq seq, AjPStr* Pseqstr)
{
AjPSeq remoteseq = NULL;
/* AjBool isjoin = ajFalse; */
AjPStr tmpseq = NULL;
AjBool compjoin = ajFalse;
ajStrSetClear(Pseqstr);
/* isjoin = ajFeatIsMultiple(thys); */
ajDebug("ajFeatGetSeq usa:%S\n... | false | false | false | false | false | 0 |
main(void)
{
int rv = 0;
printf("-- speed tests determine parsing throughput given %d different sample documents --\n",
num_docs());
rv = parse(1);
if (rv != 0) return rv;
rv = parse(0);
if (rv != 0) return rv;
rv = gen();
return rv;
} | false | false | false | false | false | 0 |
dump (ostream& o)
{
/* NOT LOCKED ... for debugging only */
for (EventList::iterator x = _events.begin(); x != _events.end(); ++x) {
o << (*x)->value << " @ " << (uint64_t) (*x)->when << endl;
}
} | false | false | false | false | false | 0 |
tomoyo_path_mknod(struct path *parent, struct dentry *dentry,
umode_t mode, unsigned int dev)
{
struct path path = { parent->mnt, dentry };
int type = TOMOYO_TYPE_CREATE;
const unsigned int perm = mode & S_IALLUGO;
switch (mode & S_IFMT) {
case S_IFCHR:
type = TOMOYO_TYPE_MKCHAR;
break;
case S_IFBLK:... | false | false | false | false | false | 0 |
conn_can_see_vote(const struct connection *pconn,
const struct vote *pvote)
{
if (!pconn) {
return FALSE;
}
if (conn_is_global_observer(pconn)) {
/* All is visible for global observer. */
return TRUE;
}
if (vote_is_team_only(pvote)) {
const struct player *pplayer, *cal... | false | false | false | false | false | 0 |
_get_common_recombiner(const PseudoJet &jet) const{
if (jet.has_associated_cluster_sequence())
return jet.validated_cs()->jet_def().recombiner();
// if the jet has pieces, recurse in the pieces
if (jet.has_pieces()){
vector<PseudoJet> pieces = jet.pieces();
if (pieces.size() == 0) return 0;
const... | false | false | false | false | false | 0 |
ndmconn_unexpected_impl (struct ndmconn *conn, struct ndmp_msg_buf *nmb)
{
NDMPConnection *self = NDMP_CONNECTION(conn->context);
if (!ndmconn_handle_notify(self, nmb)) {
g_warning("ignoring unrecognized, unexpected packet");
}
ndmconn_free_nmb(NULL, nmb);
} | false | false | false | false | false | 0 |
edac_device_dump_device(struct edac_device_ctl_info *edac_dev)
{
edac_dbg(3, "\tedac_dev = %p dev_idx=%d\n",
edac_dev, edac_dev->dev_idx);
edac_dbg(4, "\tedac_dev->edac_check = %p\n", edac_dev->edac_check);
edac_dbg(3, "\tdev = %p\n", edac_dev->dev);
edac_dbg(3, "\tmod_name:ctl_name = %s:%s\n",
edac_dev->mod_... | false | false | false | false | false | 0 |
exec_stmt_loop(PLpgSQL_execstate *estate, PLpgSQL_stmt_loop *stmt)
{
for (;;)
{
int rc = exec_stmts(estate, stmt->body);
switch (rc)
{
case PLPGSQL_RC_OK:
break;
case PLPGSQL_RC_EXIT:
if (estate->exitlabel == NULL)
return PLPGSQL_RC_OK;
if (stmt->label == NULL)
return PLPGSQL_RC_... | false | false | false | false | false | 0 |
print_promiscuous(const char *val)
{
int ival;
errno = 0;
ival = strtol(val, NULL, 10);
if (errno) {
printf("conversion error(%s) ", val);
return;
}
if (ival == 0)
printf("no ");
else
printf("yes ");
} | false | false | false | false | false | 0 |
plnxtvhi(PLINT *u, PLINT *v, PLFLT* c, PLINT n, PLINT init)
{
/*
* For the initial set of points, just display them and store them as the
* peak points.
*/
if (init == 1) {
int i;
oldhiview = (PLINT *) malloc((size_t) (2 * n * sizeof(PLINT)));
if ( ! oldhiview)
myexit("plnxtvhi: Out of me... | false | false | false | false | false | 0 |
__get_wave(audio_patch_t *p)
{
int wave = p->param[APP_WAVE];
if((wave < 0) || (wave >= AUDIO_MAX_WAVES))
return -1;
if(AF_MIDI == wavetab[wave].format)
return -1;
return wave;
} | false | false | false | false | false | 0 |
test_empty_member (void)
{
JsonObject *object = json_object_new ();
json_object_set_string_member (object, "string", "");
g_assert (json_object_has_member (object, "string"));
g_assert_cmpstr (json_object_get_string_member (object, "string"), ==, "");
json_object_set_string_member (object, "null", NULL);
... | false | false | false | false | false | 0 |
get_no_of_species() {
if (!has_valid_counters()) {
update_species_counters();
e4_assert(has_valid_counters());
}
return species;
} | false | false | false | false | false | 0 |
brasero_normalize_new_decoded_pad_cb (GstElement *decode,
GstPad *pad,
BraseroNormalize *normalize)
{
GstPad *sink;
GstCaps *caps;
GstStructure *structure;
BraseroNormalizePrivate *priv;
priv = BRASERO_NORMALIZE_PRIVATE (normalize);
sink = gst_element_get_static_pad (priv->resample, "sink");... | false | false | false | false | false | 0 |
name2addrlist(SOCKADDR_LIST *addr_list, char *name, char *default_host) {
char *tmp, *hostname, *portname;
int retval;
/* set hostname and portname */
tmp=str_dup(name);
portname=strrchr(tmp, ':');
if(portname) {
hostname=tmp;
*portname++='\0';
} else { /* no ':' - use defau... | false | false | false | false | false | 0 |
string_list_concat_destroy (string_list_ty *slp)
{
char *result;
/* Optimize the most frequent case. */
if (slp->nitems == 1)
{
result = (char *) slp->item[0];
free (slp->item);
}
else
{
result = string_list_concat (slp);
string_list_destroy (slp);
}
return result;
} | false | false | false | false | false | 0 |
synaptics_i2c_reschedule_work(struct synaptics_i2c *touch,
unsigned long delay)
{
unsigned long flags;
spin_lock_irqsave(&touch->lock, flags);
mod_delayed_work(system_wq, &touch->dwork, delay);
spin_unlock_irqrestore(&touch->lock, flags);
} | false | false | false | false | false | 0 |
encode()
{
SMSEncoder e;
e.setAddress(_serviceCentreAddress, true);
e.set2Bits(_messageTypeIndicator); // bits 0..1
e.setTimestamp(_serviceCentreTimestamp);
e.setBit(_protocolIdentifierPresent); // bit 0
e.setBit(_dataCodingSchemePresent); // bit 1
e.setBit(_userDataLengthPresent); // bit 2
if (_protoco... | false | false | false | false | false | 0 |
t4_read_rss(struct adapter *adapter, u16 *map)
{
u32 val;
int i, ret;
for (i = 0; i < RSS_NENTRIES / 2; ++i) {
ret = rd_rss_row(adapter, i, &val);
if (ret)
return ret;
*map++ = LKPTBLQUEUE0_G(val);
*map++ = LKPTBLQUEUE1_G(val);
}
return 0;
} | false | false | false | false | false | 0 |
flag_bsearch(unsigned short flags[], unsigned short flag, int length) {
int mid;
int left = 0;
int right = length - 1;
while (left <= right) {
mid = (left + right) / 2;
if (flags[mid] == flag) return 1;
if (flag < flags[mid]) right = mid - 1;
else left = mid + 1;
}
return 0;
} | false | false | false | false | false | 0 |
get
(
Image_buffer *dest, // Copy to here.
int srcx, int srcy // Upper-left corner of source rect.
)
{
int srcw = dest->width, srch = dest->height;
int destx = 0, desty = 0;
// Constrain to window's space. (Note
// convoluted use of clip().)
if (!clip(destx, desty, srcw, srch, srcx, srcy))
retur... | false | false | false | false | false | 0 |
load_to_vec (gretl_matrix *targ, const gretl_matrix *src,
int t)
{
int i;
for (i=0; i<targ->cols; i++) {
gretl_matrix_set(targ, t, i, src->val[i]);
}
} | false | false | false | false | false | 0 |
reduce_region_radius( struct point * reg, int * reg_size,
image_double modgrad, double reg_angle,
double prec, double p, struct rect * rec,
image_char used, image_double angles,
double den... | false | false | false | false | false | 0 |
map_unit_homecity_enqueue(struct tile *ptile)
{
unit_list_iterate(ptile->units, punit) {
struct city *phome = game_city_by_number(punit->homecity);
if (NULL == phome) {
continue;
}
city_refresh_queue_add(phome);
} unit_list_iterate_end;
} | false | false | false | false | false | 0 |
H5PL__search_table(H5PL_type_t plugin_type, int type_id, const void **info)
{
htri_t ret_value = FALSE;
FUNC_ENTER_STATIC
/* Search in the table of already opened dynamic libraries */
if(H5PL_table_used_g > 0) {
size_t i;
for(i = 0; i < H5PL_table_used_g; i++) {
... | false | false | false | false | false | 0 |
slotResult( KJob * job )
{
Q_D(DirectorySizeJob);
//kDebug(7007) << d->m_totalSize;
removeSubjob(job);
if (d->m_currentItem < d->m_lstItems.count())
{
d->processNextItem();
}
else
{
if (job->error()) {
setError( job->error() );
setErrorText( job->e... | false | false | false | false | false | 0 |
dump_tasks_in_task_group_cfs_rq(int depth, ulong cfs_rq, int cpu)
{
struct task_context *tc;
struct rb_root *root;
struct rb_node *node;
ulong my_q, leftmost, curr, curr_my_q, tg;
int total, i;
total = 0;
if (depth) {
readmem(cfs_rq + OFFSET(cfs_rq_tg), KVADDR,
&tg, sizeof(ulong), "cfs_rq tg",
FAULT_ON... | false | false | false | false | false | 0 |
AddCmd(AsmCmdName cmd, RegisterName reg, AsmMemory mem, CmdSize size)
{
commands.push_back(new AsmCmd2(cmd, new AsmRegister(reg), new AsmMemory(mem), size));
} | false | false | false | false | false | 0 |
GetLogicalDriveStrings (guint32 len, gunichar2 *buf)
{
int fd;
gint32 ret = 0;
LinuxMountInfoParseState state;
gboolean (*parser)(guint32, gunichar2*, LinuxMountInfoParseState*) = NULL;
memset (buf, 0, len * sizeof (gunichar2));
fd = open ("/proc/self/mountinfo", O_RDONLY);
if (fd != -1)
parser = GetLogicalDr... | false | true | false | false | true | 1 |
pw_paste_file (char * const * path,
const char * name, const char * suffix)
{
char buf[512];
char * fullpath;
FILE * fp;
int line = 0;
message (msg_pw,
(stderr, "pw: pasting `%s%s'\n", name, suffix ? suffix : ""));
fullpath = _pw_find_file (path, name, suffix);
if (!fullpath)
return 0;
... | false | false | false | false | false | 0 |
fifo_get(fifo *f)
{
void* get;
if (f->avail > 0)
{
get = f->table[f->out];
f->out = (f->out + 1) % f->size;
f->avail--;
return (get);
}
return 0;
} | false | false | false | false | false | 0 |
_feeder_add_line(char* line)
{
struct _feeder_line_t ln;
char* strtokbuf;
ln.id = strtok_r(line, "\t", &strtokbuf);
ln.line = strtok_r(NULL, "", &strtokbuf);
ln.show = true;
if(!ln.id || !ln.line)
return;
ln.id = strdup(ln.id);
ln.line = strdup(ln.line);
if(_feeder_nb ... | false | false | false | true | false | 1 |
__ecereMethod_WatchMultiLineString_OnSaveEdit(struct __ecereNameSpace__ecere__com__Class * class, char ** this, struct __ecereNameSpace__ecere__com__Instance * window, void * object)
{
unsigned int changed = 0x0;
struct __ecereNameSpace__ecere__com__Instance * editBox = (struct __ecereNameSpace__ecere__com__Instance *)... | false | false | false | false | false | 0 |
Cns_get_grpinfo_by_gid(dbfd, gid, group_entry, lock, rec_addr)
struct Cns_dbfd *dbfd;
gid_t gid;
struct Cns_groupinfo *group_entry;
int lock;
Cns_dbrec_addr *rec_addr;
{
char func[23];
int i = 0;
static char query[] =
"SELECT GID, GROUPNAME, BANNED FROM Cns_groupinfo \
WHERE gid = %d";
static char query4upd[] =... | false | false | false | false | false | 0 |
elm_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
const Elm_Scroller_Policy map[3] =
{
ELM_SMART_SCROLLER_POLICY_AUTO,
ELM_SMART_SCROLLER_POLICY_ON,
ELM_SMART... | false | false | false | false | false | 0 |
WILC_HostIf_PackStaParam(u8 *pu8Buffer,
struct add_sta_param *pstrStationParam)
{
u8 *pu8CurrByte;
pu8CurrByte = pu8Buffer;
PRINT_D(HOSTINF_DBG, "Packing STA params\n");
memcpy(pu8CurrByte, pstrStationParam->au8BSSID, ETH_ALEN);
pu8CurrByte += ETH_ALEN;
*pu8CurrByte++ = pstrStationParam->u16AssocID & ... | false | true | false | false | false | 1 |
put (ogzstream& file) const
{
vector <vector<mapsquare_walkable> >::iterator it;
vector <mapsquare_walkable>::iterator jt;
// Put the area size.
area_length () >> file;
area_height () >> file;
// Save the area.
for (it = area.begin (); it != area.end (); it++)
for (jt = it->be... | false | false | false | false | false | 0 |
asus_tx300_automute(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
snd_hda_gen_update_outputs(codec);
if (snd_hda_jack_detect(codec, 0x1b))
spec->gen.mute_bits |= (1ULL << 0x14);
} | false | false | false | false | false | 0 |
read_one_header_line(char *line, int sz, FILE *in)
{
int len;
/*
* We will read at most (sz-1) bytes and then potentially
* re-add NUL after it. Accessing line[sz] after this is safe
* and we can allow len to grow up to and including sz.
*/
sz--;
/* Get the first part of the line. */
if (!fgets(line, sz... | true | true | false | false | true | 1 |
fattal02_find_percentiles (const gfloat *array,
const guint size,
const gfloat min_percent,
gfloat *min_value,
const gfloat max_percent,
gfloat *max_value)
{
guint i... | false | false | false | false | false | 0 |
cupsFinishDestDocument(
http_t *http, /* I - Connection to destination */
cups_dest_t *dest, /* I - Destination */
cups_dinfo_t *info) /* I - Destination information */
{
DEBUG_printf(("cupsFinishDestDocument(http=%p, dest=%p(%s/%s), info=%p)",
http, dest, dest ? dest->name : ... | false | false | false | false | false | 0 |
GetNearestKeyFrame(framepos_t pos) const
{
pos = getFramePos(pos);
framepos_t rpos = m_Header.dwStart + pos;
if (m_Header.dwSampleSize
|| (pos < m_Offsets.size() && (m_Offsets[pos] & 1)))
return rpos; // already keyframe
framepos_t prev = GetPrevKeyFrame(rpos);
framepos_t next = GetNextKeyFrame... | false | false | false | false | false | 0 |
_ojc_val_return(List freed, MList freed_bstrs) {
if (0 == freed->head) {
return;
}
pthread_mutex_lock(&free_mutex);
if (0 == free_vals.head) {
free_vals.head = freed->head;
} else {
free_vals.tail->next = freed->head;
}
free_vals.tail = freed->tail;
if (0 != freed_bstrs->head) {
if ... | false | false | false | false | false | 0 |
get_appropriate_upper_left_xy (GucharmapChartable *chartable,
gint width, gint height,
gint x_root, gint y_root,
gint *x, gint *y)
{
GucharmapChartablePrivate *priv = chartable->priv;
gint row, col;
row = (priv->ac... | false | false | false | false | false | 0 |
got_bad_result(SCHED_RESULT_ITEM& sri) {
int gavid = generalized_app_version_id(sri.app_version_id, sri.appid);
DB_HOST_APP_VERSION* havp = gavid_to_havp(gavid);
if (!havp) {
if (config.debug_handle_results) {
log_messages.printf(MSG_NORMAL,
"[handle] No app version for %... | false | false | false | false | false | 0 |
nvkm_ioctl_unmap(struct nvkm_object *object, void *data, u32 size)
{
union {
struct nvif_ioctl_unmap none;
} *args = data;
int ret;
nvif_ioctl(object, "unmap size %d\n", size);
if (nvif_unvers(args->none)) {
nvif_ioctl(object, "unmap\n");
}
return ret;
} | false | false | false | false | false | 0 |
ExecuteAction(int x, int y, struct icon_info *item)
{
int type = NO_CLICK;
XEvent d;
struct mousefunc *tmp;
/* Wait and see if we have a click, or a move */
/* wait forever, see if the user releases the button */
type = CheckActionType(x, y, &d, False, True);
if (type == CLICK)
{
/* If it was a cli... | false | false | false | false | false | 0 |
translate_addresses (bfd *abfd, char *addr_hex, FILE *f, asymbol **syms)
{
pc = bfd_scan_vma (addr_hex, NULL, 16);
found = FALSE;
bfd_map_over_sections (abfd, find_address_in_section, syms);
if (! found)
fprintf (f, "??");
else
fprintf (f, "%u", line);
} | false | false | false | false | false | 0 |
g2_packet_decide_spec(struct ptype_action_args *parg, g2_ptype_action_func const *work_type)
{
uint8_t *guid;
/* if we are called from external (for a root packet), check for routing */
if(g2_packet_needs_routing(parg->source, &guid))
return magic_route(parg, guid);
return g2_packet_decide_spec_int(parg, work_ty... | false | false | false | false | false | 0 |
set_noa_data(struct rtl_priv *rtlpriv,
struct rtl_p2p_ps_info *p2pinfo,
struct p2p_ps_offload_t *p2p_ps_offload)
{
int i;
u32 start_time, tsf_low;
/* hw only support 2 set of NoA */
for (i = 0 ; i < p2pinfo->noa_num ; i++) {
/* To control the reg setting for which NOA*/
rtl_write_byte(rtlpriv, 0x5cf, (... | false | false | false | false | true | 1 |
regulatory_hint_core(const char *alpha2)
{
struct regulatory_request *request;
request = malloc(sizeof(struct regulatory_request));
if (!request)
return -ENOMEM;
memset(request, 0, sizeof(struct regulatory_request));
request->alpha2[0] = alpha2[0];
request->alpha2[1] = alpha2[1];
request->initiator = IEEE802... | false | false | false | false | false | 0 |
mono_debug_lookup_source_location (MonoMethod *method, guint32 address, MonoDomain *domain)
{
MonoDebugMethodInfo *minfo;
MonoDebugSourceLocation *location;
gint32 offset;
if (mono_debug_format == MONO_DEBUG_FORMAT_NONE)
return NULL;
mono_debugger_lock ();
minfo = _mono_debug_lookup_method (method);
if (!min... | false | false | false | false | false | 0 |
e_fm2_select_set(Evas_Object *obj, const char *file, int select_)
{
Eina_List *l;
E_Fm2_Icon *ic;
EFM_SMART_CHECK();
EINA_LIST_FOREACH(sd->icons, l, ic)
{
if ((file) && (!strcmp(ic->info.file, file)))
{
if (select_) _e_fm2_icon_select(ic);
else _e_fm2_icon_d... | false | false | false | false | false | 0 |
internal_readFromStream(mrpt::utils::CStream &in)
{
in.ReadBuffer(&header,sizeof(header));
uint32_t nBytesInStream;
in >> nBytesInStream;
msg_body.resize(nBytesInStream);
if (nBytesInStream)
in.ReadBuffer(&msg_body[0],sizeof(nBytesInStream));
} | false | false | false | false | false | 0 |
reader_process( void *args )
{
int line;
unsigned long status;
unsigned long data_length;
struct SIGACTION act;
sigset_t ignore_set;
Plustek_Scanner *scanner = (Plustek_Scanner *)args;
if( sanei_thread_is_forked()) {
DBG( _DBG_PROC, "reader_process started (forked)\n" );
close( sc... | false | false | false | false | false | 0 |
digest_authorize(void *instance, REQUEST *request)
{
int rcode;
/* quiet the compiler */
instance = instance;
/*
* Double-check and fix the attributes.
*/
rcode = digest_fix(request);
if (rcode != RLM_MODULE_OK) return rcode;
if (pairfind(request->config_items, PW_AUTHTYPE)) {
RDEBUG2("WARNING: Auth... | false | false | false | false | false | 0 |
svg_parse_point_into_matrix(GF_Matrix2D *p, char *value_string)
{
u32 i = 0, j = 0;
gf_mx2d_init(*p);
i = svg_parse_number(&(value_string[i]), &(p->m[2]), 0);
if (i == 0) return 0;
j = svg_parse_number(&(value_string[i]), &(p->m[5]), 0);
if (j == 0) return 0;
return i+j;
} | false | false | false | false | false | 0 |
mca_base_component_repository_release(const mca_base_component_t *component)
{
#if OPAL_WANT_LIBLTDL
if (initialized) {
repository_item_t *ri = find_component(component->mca_type_name,
component->mca_component_name);
if (NULL != ri) {
OBJ_RELEASE(ri);
}
... | false | false | false | false | false | 0 |
gkrellm_disk_temperature_display(gpointer sr, gchar *id_name, gfloat t,
gchar units)
{
GList *list;
DiskMon *disk;
GkrellmPanel *p;
GkrellmDecal *decal;
gchar *disk_name;
gint len;
gboolean display_done = FALSE, display_possible = FALSE;
if ((disk_name = strrchr(id_name, '/')) != NULL)
++... | false | false | false | false | false | 0 |
H5HF_huge_bt2_filt_indir_remove(const void *nrecord, void *_udata)
{
H5HF_huge_remove_ud_t *udata = (H5HF_huge_remove_ud_t *)_udata; /* User callback data */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Free the space in the file for the object being removed */
... | false | false | false | false | false | 0 |
scan_finalizer_entries (FinalizeReadyEntry *list, ScanCopyContext ctx)
{
CopyOrMarkObjectFunc copy_func = ctx.copy_func;
SgenGrayQueue *queue = ctx.queue;
FinalizeReadyEntry *fin;
for (fin = list; fin; fin = fin->next) {
if (!fin->object)
continue;
SGEN_LOG (5, "Scan of fin ready object: %p (%s)\n", fin->ob... | false | false | false | false | false | 0 |
beam_start_warmup(beam *b)
{
// set the warmup stamp
b->warmup_stamp = timestamp(Weapon_info[b->weapon_info_index].b_info.beam_warmup);
// start playing warmup sound
if(!(Game_mode & GM_STANDALONE_SERVER) && (Weapon_info[b->weapon_info_index].b_info.beam_warmup_sound >= 0)){
snd_play_3d(&Snds[Weapon_info[b->we... | false | false | false | false | false | 0 |
dodele(char *name)
{
#ifndef ANON_CAN_DELETE
if (guest != 0) {
addreply_noformat(550, MSG_ANON_CANT_DELETE);
return;
}
#endif
if (name == NULL || *name == 0) {
addreply_noformat(501, MSG_NO_FILE_NAME);
return;
}
if (checknamesanity(name, dot_write_ok) != 0) {
... | true | true | false | false | true | 1 |
reduce_vowels (char *str)
{
char *next;
while (*str != NULL_CHAR) {
next = a68g_strchr (str + 1, '+');
if (next == NO_TEXT) {
break;
}
if (!is_vowel (*str) && is_vowel (next[1])) {
while (str != next && !is_vowel (*str)) {
str++;
}
if (str != next) {
memmove (... | false | false | false | false | false | 0 |
build_v2_property_table_initializer (tree type, tree context)
{
tree x;
VEC(constructor_elt,gc) *inits = NULL;
if (TREE_CODE (context) == PROTOCOL_INTERFACE_TYPE)
x = CLASS_PROPERTY_DECL (context);
else
x = IMPL_PROPERTY_DECL (context);
for (; x; x = TREE_CHAIN (x))
{
VEC(constructor_elt,gc... | false | false | false | false | false | 0 |
coeff(int narg, char **arg)
{
if (narg != 9) error->all(FLERR,"Incorrect args for pair coefficients");
if (!allocated) allocate();
int ilo,ihi,jlo,jhi;
force->bounds(arg[0],atom->ntypes,ilo,ihi);
force->bounds(arg[1],atom->ntypes,jlo,jhi);
double bulkmodulus_one = atof(arg[2]);
double shearmodulus_one =... | false | false | false | false | false | 0 |
dbi_result_next_row(dbi_result Result) {
if (!RESULT) {
_error_handler(/*RESULT->conn*/ NULL, DBI_ERROR_BADPTR);
return 0;
}
_reset_conn_error(RESULT->conn);
if (!dbi_result_has_next_row(Result)) {
/* _error_handler(RESULT->conn, DBI_ERROR_BADIDX); */
return 0;
}
return dbi_result_seek_ro... | false | false | false | false | false | 0 |
fimc_is_debugfs_create(struct fimc_is *is)
{
struct dentry *dentry;
is->debugfs_entry = debugfs_create_dir("fimc_is", NULL);
dentry = debugfs_create_file("fw_log", S_IRUGO, is->debugfs_entry,
is, &fimc_is_debugfs_fops);
if (!dentry)
fimc_is_debugfs_remove(is);
return is->debugfs_entry == NULL ? -EIO ... | false | false | false | false | false | 0 |
insertin_unparsedeclsinfo(unparsedeclinfo new_decl, unparsedeclsinfo old_decls)
{{
unparsedeclsinfo kc_selvar_0_1 = phylum_cast<unparsedeclsinfo>(old_decls);
if ((kc_selvar_0_1->prod_sel() == sel_Consunparsedeclsinfo)) {
const unparsedeclinfo head_decl = (kc_selvar_0_1)->unparsedeclinfo_1;
const unparsedecl... | false | false | false | false | false | 0 |
showExtraHelp() {
cerr << " Possible values: ";
for (vector<int>::size_type i = 0; i < m_Values.size(); i++) {
if (m_HasValue[i] != CMDLINE_UNSUPPORTED) {
if (i != 0) cerr << ", ";
cerr << m_Values[i];
}
}
cerr << endl;
} | false | false | false | false | false | 0 |
idmap(void *state, int objtype, char *str, unsigned long *id,
int createflag)
{
char *s;
static unsigned long ctr = 1;
NOTUSED(objtype);
if (str) {
Agraph_t *g;
g = state;
if (createflag)
s = agstrdup(g, str);
else
s = agstrbind(g, str);
*id = (unsigned long) s;
} else {
*id = c... | false | false | false | false | false | 0 |
sinfo_new_extract_image_from_cube(cpl_imagelist * cube, int plane_index)
{
if ( cube == NULL )
{
sinfo_msg_error ("null cube") ;
return NULL ;
}
if ( plane_index < 0 || plane_index >= cpl_imagelist_get_size(cube) )
{
sinfo_msg_error ("wrong plane index for image to be extrac... | false | false | false | false | false | 0 |
carm_init_shm(struct carm_host *host)
{
host->shm = pci_alloc_consistent(host->pdev, CARM_SHM_SIZE,
&host->shm_dma);
if (!host->shm)
return -ENOMEM;
host->msg_base = host->shm + RBUF_LEN;
host->msg_dma = host->shm_dma + RBUF_LEN;
memset(host->shm, 0xff, RBUF_LEN);
memset(host->msg_base, 0, PDC_SHM_SIZE ... | false | false | false | false | false | 0 |
tracker_sparql_builder_insert_silent_open (TrackerSparqlBuilder* self, const gchar* graph) {
TrackerSparqlBuilderState _tmp0_;
TrackerSparqlBuilderState _tmp1_;
TrackerSparqlBuilderState* _tmp2_;
gint _tmp2__length1;
const gchar* _tmp3_;
#line 221 "/home/martyn/Source/tracker/src/libtracker-sparql/tracker-builder.... | false | false | false | false | false | 0 |
gst_h264_parse_prepare_key_unit (GstH264Parse * parse, GstEvent * event)
{
GstClockTime running_time;
guint count;
gboolean have_sps, have_pps;
gint i;
parse->pending_key_unit_ts = GST_CLOCK_TIME_NONE;
gst_event_replace (&parse->force_key_unit_event, NULL);
gst_video_event_parse_downstream_force_key_uni... | false | false | false | false | false | 0 |
_archive_write_disk_free(struct archive *_a)
{
struct archive_write_disk *a;
int ret;
if (_a == NULL)
return (ARCHIVE_OK);
archive_check_magic(_a, ARCHIVE_WRITE_DISK_MAGIC,
ARCHIVE_STATE_ANY | ARCHIVE_STATE_FATAL, "archive_write_disk_free");
a = (struct archive_write_disk *)_a;
ret = _archive_write_disk_cl... | false | false | false | false | false | 0 |
ohci_set_iso_channels(struct fw_iso_context *base, u64 *channels)
{
struct fw_ohci *ohci = fw_ohci(base->card);
unsigned long flags;
int ret;
switch (base->type) {
case FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL:
spin_lock_irqsave(&ohci->lock, flags);
/* Don't allow multichannel to grab other contexts' channels. *... | false | false | false | false | false | 0 |
drawImage(void)
{
if(m_pDragImage == NULL)
{
UT_ASSERT_HARMLESS(UT_SHOULD_NOT_HAPPEN);
return false;
}
GR_Painter painter(getGraphics());
xxx_UT_DEBUGMSG(("Draw Inline image \n"));
painter.drawImage(m_pDragImage,m_recCurFrame.left,m_recCurFrame.top);
return true;
} | false | false | false | false | false | 0 |
visit_managers (boost::function1<bool, HalManager &> visitor) const
{
bool go_on = true;
for (std::set<HalManager *>::const_iterator iter = managers.begin ();
iter != managers.end () && go_on;
iter++)
go_on = visitor (*(*iter));
} | false | false | false | false | false | 0 |
_show_rec(char *f[])
{
int i;
fprintf(stderr, "rec>");
for (i=0; f[i]; i++)
fprintf(stderr, " %s", f[i]);
fprintf(stderr, "\n");
return;
} | false | false | false | false | false | 0 |
EffectKnockBack(SpellEffectIndex eff_idx)
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
{ return; }
((Player*)unitTarget)->KnockBackFrom(m_caster, float(m_spellInfo->EffectMiscValue[eff_idx]) / 10, float(damage) / 10);
} | false | false | false | false | false | 0 |
Analysis_ArgumentSet_create(Argument *arg){
register ArgumentSet *as;
static Analysis_ArgumentSet aas;
if(arg){
as = ArgumentSet_create("Analysis Options");
ArgumentSet_add_option(as, 'E', "exhaustive", NULL,
"Perform exhaustive alignment (slow)", "FALSE",
Argument_pa... | false | false | false | false | false | 0 |
pack_key16(struct tc_u32_sel *sel, __u32 key, __u32 mask,
int off, int offmask)
{
if (key > 0xFFFF || mask > 0xFFFF)
return -1;
if ((off & 3) == 0) {
key <<= 16;
mask <<= 16;
}
off &= ~3;
key = htonl(key);
mask = htonl(mask);
return pack_key(sel, key, mask, off, offmask);
} | false | false | false | false | false | 0 |
xmlrpc_doc_add_scalar(XMLRPCDocument *xrdoc, int d_type, int type, void *arg)
{
XMLRPCValue *param;
param = xmlrpc_create_scalar_value(type, arg);
if (xmlrpc_doc_add_value(xrdoc, d_type, param) < 0) {
xmlrpc_value_destroy(param);
return -1;
}
return 0;
} | false | false | false | false | false | 0 |
_inc_by_one(QString &str, int position)
{
for (int i = position; i >= 0; i--) {
char last_char = str[i].toLatin1();
switch (last_char) {
case '0':
str[i] = '1';
break;
case '1':
str[i] = '2';
break;
case '2':
str[i] ... | false | false | false | false | false | 0 |
__get_duplex(struct port *port)
{
struct slave *slave = port->slave;
u8 retval = 0x0;
/* handling a special case: when the configuration starts with
* link down, it sets the duplex to 0.
*/
if (slave->link == BOND_LINK_UP) {
switch (slave->duplex) {
case DUPLEX_FULL:
retval = 0x1;
netdev_dbg(slave->b... | false | false | false | false | false | 0 |
test_odb_loose__exists(void)
{
git_oid id, id2;
git_odb *odb;
write_object_files(&one);
cl_git_pass(git_odb_open(&odb, "test-objects"));
cl_git_pass(git_oid_fromstr(&id, one.id));
cl_assert(git_odb_exists(odb, &id));
/* Test for a non-existant object */
cl_git_pass(git_oid_fromstr(&id2, "8b13... | false | false | false | false | false | 0 |
_gcr_gnupg_process_get_property (GObject *obj, guint prop_id, GValue *value,
GParamSpec *pspec)
{
GcrGnupgProcess *self = GCR_GNUPG_PROCESS (obj);
switch (prop_id) {
case PROP_DIRECTORY:
g_value_set_string (value, self->pv->directory);
break;
case PROP_EXECUTABLE:
g_value_set... | false | false | false | false | false | 0 |
saveEntry(Xauth *auth)
{
struct addrList *new;
if (!(new = Malloc(offsetof(struct addrList, data) +
auth->address_length + auth->number_length)))
return;
new->address_length = auth->address_length;
new->number_length = auth->number_length;
memcpy(new->data, auth->addr... | false | true | false | false | true | 1 |
test_core_pqueue__interleaved_pushes_and_pops(void)
{
git_pqueue pq;
int i, j, *val;
static int commands[] =
{ 6, 9, 8, 0, 5, 0, 7, 0, 4, 3, 0, 0, 0, 4, 0, 2, 0, 1, 0, 0, -1 };
static int expected[] =
{ 9, 8, 7, 6, 5, 4, 4, 3, 2, 1, -1 };
cl_git_pass(git_pqueue_init(&pq, 0, 10, cmp_ints_like_commit_time));
... | false | false | false | true | false | 1 |
copy_data_node(Data_node *npt)
{
Data_node *new_npt = NULL;
int i, str_length;
if (npt != NULL) {
new_npt = alloc_data_node();
new_npt->times = npt->times;
new_npt->type = npt->type;
switch (npt->type) {
case TYPE_INT:
new_npt->val.i = npt->val.i;
break;... | false | false | false | false | false | 0 |
cgethostbyaddr(addr, len, type)
const char *addr;
int len;
int type;
{
const char *function = "cgethostbyaddr()";
static struct {
unsigned allocated:1;
in_addr_t addr;
time_t written;
struct hostent hostent;
} table[SOCKD_ADDRESSCACHE], *freehost;
static unsigned long int hit, miss, count;
const... | 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.