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 |
|---|---|---|---|---|---|---|
reiserfs_write_end(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied,
struct page *page, void *fsdata)
{
struct inode *inode = page->mapping->host;
int ret = 0;
int update_sd = 0;
struct reiserfs_transaction_handle *th;
unsigned start;
bool locked = fals... | false | false | false | false | false | 0 |
fcgi_proc_load_inc(server *srv, handler_ctx *hctx) {
plugin_data *p = hctx->plugin_data;
hctx->proc->load++;
status_counter_inc(srv, CONST_STR_LEN("fastcgi.active-requests"));
fastcgi_status_copy_procname(p->statuskey, hctx->host, hctx->proc);
buffer_append_string_len(p->statuskey, CONST_STR_LEN(".load"));
sta... | false | false | false | false | false | 0 |
glade_gtk_action_widgets_write_child (GladeWidget *widget,
GladeXmlContext *context,
GladeXmlNode *node,
gchar *action_container)
{
GladeXmlNode *widgets_node;
widgets_node = glade_xml_node_new (contex... | false | false | false | false | false | 0 |
ipmi_sel_parse_output_inventec_event_data2_discrete_oem (ipmi_sel_parse_ctx_t ctx,
struct ipmi_sel_parse_entry *sel_parse_entry,
uint8_t sel_record_type,
char *tmpbuf,
unsigned int tmpbuflen,
unsigned int flags,
unsigned int *wlen,
struct ipmi_sel_system_event_rec... | false | false | false | false | false | 0 |
m68hc11_initialize_trampoline (tramp, fnaddr, cxt)
rtx tramp;
rtx fnaddr;
rtx cxt;
{
const char *static_chain_reg = reg_names[STATIC_CHAIN_REGNUM];
/* Skip the '*'. */
if (*static_chain_reg == '*')
static_chain_reg++;
if (TARGET_M6811)
{
emit_move_insn (gen_rtx_MEM (HImode, tramp)... | false | false | false | false | false | 0 |
check_space_left(int lfd, struct daemon_conf *config)
{
int rc;
struct statfs buf;
rc = fstatfs(lfd, &buf);
if (rc == 0) {
if (buf.f_bavail < 5) {
/* we won't consume the last 5 blocks */
fs_space_left = 0;
do_disk_full_action(config);
} else {
unsigned long blocks;
unsigned long b... | false | false | false | false | false | 0 |
bna_rxf_mcmac_get(struct bna_rxf *rxf, const u8 *mac_addr)
{
struct bna_mac *mac;
list_for_each_entry(mac, &rxf->mcast_active_q, qe)
if (ether_addr_equal(mac->addr, mac_addr))
return mac;
list_for_each_entry(mac, &rxf->mcast_pending_del_q, qe)
if (ether_addr_equal(mac->addr, mac_addr))
return mac;
retu... | false | false | false | false | false | 0 |
SetTypes()
{
char type[4];
_mol.SetAtomTypesPerceived();
// mark all atoms and bonds as non-aromatic
_mol.SetAromaticPerceived();
FOR_BONDS_OF_MOL (bond, _mol)
bond->UnsetAromatic();
FOR_ATOMS_OF_MOL (atom, _mol)
atom->UnsetAromatic();
// It might be needed to run this funct... | false | false | false | false | false | 0 |
calculateTagMap(volatile bool *breakFlag)
{
if(m_mapTagToIndexItems.isEmpty())
{
foreach(TagIndex tagIndex, m_tagNames.keys())
{
for(GameId gameId = 0; gameId < (GameId)m_indexItems.size(); ++gameId)
{
if(breakFlag && *breakFlag)
{
... | false | false | false | false | false | 0 |
setvjslots(argv)
char **argv;
{
int value;
if (!int_option(*argv, &value))
return 0;
if (value < 2 || value > 16) {
option_error("vj-max-slots value must be between 2 and 16");
return 0;
}
ipcp_wantoptions [0].maxslotindex =
ipcp_allowoptions[0].maxslotindex = value - 1;
slprintf... | false | false | false | false | false | 0 |
st_table_child_set_y_fill (StTable *table,
ClutterActor *child,
gboolean fill)
{
StTableChild *meta;
g_return_if_fail (ST_IS_TABLE (table));
g_return_if_fail (CLUTTER_IS_ACTOR (child));
meta = get_child_meta (table, child);
meta->y_fill = fill... | false | false | false | false | false | 0 |
hfs_cat_create(u32 cnid, struct inode *dir, struct qstr *str, struct inode *inode)
{
struct hfs_find_data fd;
struct super_block *sb;
union hfs_cat_rec entry;
int entry_size;
int err;
hfs_dbg(CAT_MOD, "create_cat: %s,%u(%d)\n",
str->name, cnid, inode->i_nlink);
if (dir->i_size >= HFS_MAX_VALENCE)
return -EN... | false | false | false | false | false | 0 |
decode_timestamp_uint (unsigned char **in, size_t inlen, unsigned char expect,
int min, int max, const char *version, const char *token)
{
register unsigned char *inptr = *in;
unsigned char *inend = *in + inlen;
int val = 0;
while (inptr < inend && (*inptr >= '0' && *inptr <= '9')) {
if (((val * 10) + ... | false | false | false | false | false | 0 |
close ()
{
if (!menu)
return;
make_continue();
menu=NULL;
choosebook_button.destroy();
firstrecite_button.destroy();
revise_button.destroy();
rest_button.destroy();
know_button.destroy();
shooting_button.destroy();
typing_button.destroy();
quit_button.destroy();
fixed = NULL;
} | false | false | false | false | false | 0 |
lam_setfunc(int locfunc)
{
/* If we have not been initialized yet, then call lamupdown_init()
to initialize the stack. We're within MPI_Init/MPI_Init/thread
here, so we know that there are no other threads active, so this
is safe to do. Also, the MPI thread level defaults to
MPI_THREAD_SINGLE, s... | false | false | false | false | false | 0 |
reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs)
{
int err = reiserfs_for_each_xattr(inode, chown_one_xattr, attrs);
if (err)
reiserfs_warning(inode->i_sb, "jdm-20007",
"Couldn't chown all xattrs (%d)\n", err);
return err;
} | false | false | false | false | false | 0 |
gegl_node_new_from_xml (const gchar *xmldata,
const gchar *path_root)
{
glong time = gegl_ticks ();
ParseData pd = { 0, };
GMarkupParseContext *context;
gboolean success = FALSE;
g_return_val_if_fail (xmldata != NULL, NULL);
pd.ids ... | false | false | false | false | false | 0 |
btmrvl_sdio_probe(struct sdio_func *func,
const struct sdio_device_id *id)
{
int ret = 0;
struct btmrvl_private *priv = NULL;
struct btmrvl_sdio_card *card = NULL;
BT_INFO("vendor=0x%x, device=0x%x, class=%d, fn=%d",
id->vendor, id->device, id->class, func->num);
card = devm_kzalloc(&func->dev, sizeof(*c... | false | false | false | false | false | 0 |
ex_undojoin(eap)
exarg_T *eap UNUSED;
{
if (curbuf->b_u_newhead == NULL)
return; /* nothing changed before */
if (curbuf->b_u_curhead != NULL)
{
EMSG(_("E790: undojoin is not allowed after undo"));
return;
}
if (!curbuf->b_u_synced)
return; /* already unsynced */
if (p_ul < 0)
... | false | false | false | false | false | 0 |
gmpc_widgets_volume_b_scroll_event (GmpcWidgetsVolume* self, GdkEventScroll* event) {
gboolean result = FALSE;
gint _tmp0_;
gint tvolume_level;
GdkEventScroll _tmp1_;
GdkScrollDirection _tmp2_;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (event != NULL, FALSE);
_tmp0_ = self->_volume_level;... | false | false | false | false | false | 0 |
SetRawMode (const Arguments& args) {
HandleScope scope;
if (args[0]->IsFalse()) {
Stdio::DisableRawMode(STDIN_FILENO);
} else {
if (0 != EnableRawMode(STDIN_FILENO)) {
return ThrowException(ErrnoException(errno, "EnableRawMode"));
}
}
return rawmode ? True() : False();
} | false | false | false | false | false | 0 |
start_delay_helper(gpointer data)
{
remote_ra_cmd_t *cmd = data;
lrm_state_t *connection_rsc = NULL;
cmd->delay_id = 0;
connection_rsc = lrm_state_find(cmd->rsc_id);
if (connection_rsc && connection_rsc->remote_ra_data) {
remote_ra_data_t *ra_data = connection_rsc->remote_ra_data;
... | false | false | false | false | false | 0 |
test_parse_empty (void)
{
GcrParser *parser = gcr_parser_new ();
GError *error = NULL;
gboolean result;
result = gcr_parser_parse_data (parser, (const guchar *)"", 0, &error);
g_assert_error (error, GCR_DATA_ERROR, GCR_ERROR_UNRECOGNIZED);
g_assert (!result);
g_error_free (error);
g_object_unref (parser);
} | false | false | false | false | false | 0 |
unpack_border(int n, int first, double *buf)
{
int i,j,m,last;
m = 0;
last = first + n;
for (i = first; i < last; i++) {
if (i == nmax) grow(0);
x[i][0] = buf[m++];
x[i][1] = buf[m++];
x[i][2] = buf[m++];
tag[i] = static_cast<int> (buf[m++]);
type[i] = static_cast<int> (buf[m++]);
m... | false | false | false | false | false | 0 |
grhottCharIn(radioInstance_t *r, uint8_t c) {
switch (grhottData.state) {
case GRHOTT_WAIT_SYNC1:
if (c == GRHOTT_START_CHAR1) {
grhottData.state = GRHOTT_WAIT_SYNC2;
grhottData.dataCount = 0;
grhottData.nb_channel = 0;
}
break;
case GRHOTT_WAIT_SYNC2:
if (c == GRHOTT_START_CHAR2) {
gr... | false | false | false | false | false | 0 |
gst_shm_sink_class_init (GstShmSinkClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseSinkClass *gstbasesink_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstbasesink_class = (GstBaseSinkClass *) klass;
gobject_class->fi... | false | false | false | false | false | 0 |
cdiff_cmd_open(const char *cmdstr, struct cdiff_ctx *ctx, char *lbuf, unsigned int lbuflen)
{
char *db;
unsigned int i;
if(!(db = cdiff_token(cmdstr, 1, 1))) {
logg("!cdiff_cmd_open: Can't get first argument\n");
return -1;
}
if(ctx->open_db) {
logg("!cdiff_cmd_open: %s not closed before opening %s\... | false | false | false | false | false | 0 |
posix_onewrite_allread_blocks(int numprocs, int rank, int write_size)
{
int ret;
int i;
int offset = rank*write_size*sizeof(int);
int* writebuf = (int*)malloc(write_size*sizeof(int));
int* readbuf = (int*)malloc (write_size*sizeof(int));
FILE* file = NULL;
for(i=0; i<write_size; i++... | false | false | false | false | true | 1 |
SV_StartSound (vec3_t origin, edict_t *entity, int channel,
int soundindex, float volume,
float attenuation, float timeofs)
{
int sendchan;
int flags;
int i;
int ent;
vec3_t origin_v;
qboolean use_phs;
if (volume < 0 || volume > 1.0)
Com_Error (ERR_FATAL, "SV_StartSound: volume... | false | false | false | false | false | 0 |
gimple_compatible_complete_and_incomplete_subtype_p (tree t1, tree t2)
{
/* If one pointer points to an incomplete type variant of
the other pointed-to type they are the same. */
if (TREE_CODE (t1) == TREE_CODE (t2)
&& RECORD_OR_UNION_TYPE_P (t1)
&& (!COMPLETE_TYPE_P (t1)
|| !COMPLETE_TYPE_P (t... | false | false | false | false | false | 0 |
handle_burst(CMD_Request *rx_message, CMD_Reply *tx_message)
{
int status;
IPAddr address, mask;
UTI_IPNetworkToHost(&rx_message->data.burst.mask, &mask);
UTI_IPNetworkToHost(&rx_message->data.burst.address, &address);
status = NSR_InitiateSampleBurst(ntohl(rx_message->data.burst.n_good_samples),
... | false | false | false | false | false | 0 |
receiveFile(sd, path, size)
int sd;
char *path;
long size;
{
FILE *fp ;
char *data ;
int towrite ;
if ((data = (char *) malloc(SEGMENT)) == NULL)
return 0 ;
/* open file for storage */
if ((fp = fopen(path, "w")) == NULL)
{
free(data) ;
return 0 ;
}
while (size > ... | false | false | false | false | false | 0 |
clear()
{
/*
We can't delete the widgets in the following loop, because
we would get ChildRemoved events, changing d_itemMap, while
we are iterating.
*/
QList<const QWidget *> widgets;
QMap<const QwtLegendItemManager *, QWidget *>::const_iterator it;
for ( it = d_itemMap.beg... | false | false | false | false | false | 0 |
makeXnode (graph_t* G, char* name)
{
node_t *n = agnode(G, name, 1);
alloc_elist(4, ND_in(n));
alloc_elist(4, ND_out(n));
if (Last_node) {
ND_prev(n) = Last_node;
ND_next(Last_node) = n;
} else {
ND_prev(n) = NULL;
GD_nlist(G) = n;
}
Last_node = n;
ND_next(n) = NULL;
return ... | false | false | false | false | false | 0 |
vee_folder_remove_folder (CamelVeeFolder *vfolder,
CamelFolder *subfolder,
GCancellable *cancellable)
{
CamelFolderChangeInfo *changes;
CamelFolder *v_folder;
GHashTable *uids;
v_folder = CAMEL_FOLDER (vfolder);
changes = camel_folder_change_info_new ();
camel... | false | false | false | false | false | 0 |
updatebot(int idx, char *who, char share, int vernum)
{
tand_t *ptr = findbot(who);
if (ptr) {
if (share)
ptr->share = share;
if (vernum)
ptr->ver = vernum;
botnet_send_update(idx, ptr);
}
} | false | false | false | false | false | 0 |
st_LoadConfig( bool printChange )
{
// default include files are executed at owner level
tCurrentAccessLevel level( tAccessLevel_Owner, true );
st_InstallSigHupHandler();
const tPath& var = tDirectories::Var();
const tPath& config = tDirectories::Config();
const tPath& data = tDirectories::Dat... | false | false | false | false | false | 0 |
snp_annotator_stream_free(GtNodeStream *ns)
{
unsigned long i;
GtSNPAnnotatorStream *sas;
if (!ns) return;
sas = gt_snp_annotator_stream_cast(ns);
gt_region_mapping_delete(sas->rmap);
while (gt_queue_size(sas->snps) > 0) {
gt_genome_node_delete((GtGenomeNode*) gt_queue_get(sas->snps));
}
while (gt_q... | false | false | false | false | false | 0 |
hpfs_remove_btree(struct super_block *s, struct bplus_header *btree)
{
struct bplus_header *btree1 = btree;
struct anode *anode = NULL;
anode_secno ano = 0, oano;
struct buffer_head *bh;
int level = 0;
int pos = 0;
int i;
int c1, c2 = 0;
int d1, d2;
go_down:
d2 = 0;
while (bp_internal(btree1)) {
ano = le3... | false | false | false | false | false | 0 |
socketConnect()
{
ialogV( "SO_CONNECT" );
switch( _socket->getCla2() ) {
case C_CONN_OK:
ialogN( "Receive: Connect Ok" );
_socket->sendConnectionVersion( VERSION );
_socket->sendConnectionName( "IA" );
break;
case C_CONN_ID:{
_player->setNum(_socket->readChar());
ialogN( "Receive: Connect Id = %d", _pla... | false | false | false | false | false | 0 |
reset_state(void) {
_u32 i;
for (i=0;i<infcount;i++) {
/* Do not dealloc as-is files workbuffers, it's pointless unless a
reload is requested; clean buffers may stay, too. */
if (infile[i].asis) continue;
if (infile[i].dirty && infile[i].data) {
free(infile[i].data);
infile[i].data ... | false | false | false | false | false | 0 |
reg_create(struct ib_pd *pd, u64 virt_addr,
u64 length, struct ib_umem *umem,
int npages, int page_shift,
int access_flags)
{
struct mlx5_ib_dev *dev = to_mdev(pd->device);
struct mlx5_create_mkey_mbox_in *in;
struct mlx5_ib_mr *mr;
int inlen;
int err;
bool pg_cap = !!(MLX5_CAP_GEN(dev-... | false | false | false | false | false | 0 |
ssd_do_barrier_request(struct ssd_device *dev, int rw, void *msg, int *done)
{
DECLARE_COMPLETION(wait);
struct ssd_cmd *cmd;
int tag;
int ret = 0;
tag = ssd_barrier_get_tag(dev);
if (tag < 0) {
return -EBUSY;
}
cmd = &dev->cmd[tag];
cmd->nsegs = 1;
memcpy(cmd->msg, msg, SSD_DCMD_MAX_SZ);
((struct ssd_rw... | false | true | false | false | false | 1 |
GetAuxFile(FILE *auxfp)
{
ch = ' ';
endfile = 0;
linenum = 1;
GetAuxTok(auxfp);
while (endfile == 0) {
GetAuxLine(auxfp);
}
fclose(auxfp);
} | false | false | false | false | false | 0 |
ippSetString(ipp_t *ipp, /* I - IPP message */
ipp_attribute_t **attr, /* IO - IPP attribute */
int element, /* I - Value number (0-based) */
const char *strvalue) /* I - String value */
{
char *temp; /* Temporary string */
_ipp_value_t *value; /* C... | false | false | false | false | false | 0 |
real_isnegzero (const REAL_VALUE_TYPE *r)
{
return r->sign && r->cl == rvc_zero;
} | false | false | false | false | false | 0 |
membuf_error(u8 errors, int *error_found, int handle_error)
{
*error_found = 1;
if (handle_error)
do_membuf_error(errors);
} | false | false | false | false | false | 0 |
mv6_read_preamp(struct mv_host_priv *hpriv, int idx,
void __iomem *mmio)
{
void __iomem *port_mmio;
u32 tmp;
tmp = readl(mmio + RESET_CFG);
if ((tmp & (1 << 0)) == 0) {
hpriv->signal[idx].amps = 0x7 << 8;
hpriv->signal[idx].pre = 0x1 << 5;
return;
}
port_mmio = mv_port_base(mmio, idx);
tmp = readl(... | false | false | false | false | false | 0 |
print_discovered_flat(void *data, node_rec_t *rec)
{
struct discovery_rec *drec = data;
if (rec->disc_type != drec->type)
goto no_match;
if (drec->type == DISCOVERY_TYPE_SENDTARGETS ||
drec->type == DISCOVERY_TYPE_ISNS) {
if (rec->disc_port != drec->port ||
strcmp(rec->disc_address, drec->address))
... | false | false | false | false | false | 0 |
n1_2(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs)
{
{
INT i;
for (i = v; i > 0; i = i - 1, ri = ri + ivs, ii = ii + ivs, ro = ro + ovs, io = io + ovs, MAKE_VOLATILE_STRIDE(is), MAKE_VOLATILE_STRIDE(os)) {
E T1, T2, T3, T4;
T1 = ri[0];
T2 = ri[... | false | false | false | false | false | 0 |
get_dobj_mixer_type(
struct snd_soc_tplg_ctl_hdr *control_hdr)
{
if (control_hdr == NULL)
return SND_SOC_DOBJ_NONE;
switch (control_hdr->ops.info) {
case SND_SOC_TPLG_CTL_VOLSW:
case SND_SOC_TPLG_CTL_VOLSW_SX:
case SND_SOC_TPLG_CTL_VOLSW_XR_SX:
case SND_SOC_TPLG_CTL_RANGE:
case SND_SOC_TPLG_CTL_STROBE:
ret... | false | false | false | false | false | 0 |
setUser( const QString& username )
{
Q_ASSERT( !username.isEmpty() );
The::settings().setCurrentUsername( username );
The::webService()->setUsername( username );
The::webService()->setPassword( The::currentUser().password() );
if ( !m_extensionsLoaded )
{
// Can't load extensions u... | false | false | false | false | false | 0 |
ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...)
{
struct ast_callid *callid;
va_list ap;
callid = ast_read_threadstorage_callid();
va_start(ap, fmt);
if (level == __LOG_VERBOSE) {
__ast_verbose_ap(file, line, function, 0, callid, fmt, ap);
} else {
ast_log_full(lev... | false | false | false | false | false | 0 |
pixRemoveColormapGeneral(PIX *pixs,
l_int32 type,
l_int32 ifnocmap)
{
PROCNAME("pixRemoveColormapGeneral");
if (!pixs)
return (PIX *)ERROR_PTR("pixs not defined", procName, NULL);
if (ifnocmap != L_CLONE && ifnocmap != L_COPY)
return (... | false | false | false | false | false | 0 |
setAppearingItemProgress(qreal value)
{
if (value<=0.25) {
m_appearingOpacity = 0.0;
m_appearingIconSize = iconSize()*value*4;
if (m_appearingIconSize>=m_iconSize) {
m_appearingIconSize = m_iconSize;
}
} else {
m_appearingIconSize = m_iconSize;
m_appe... | false | false | false | false | false | 0 |
DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
class DeferredInstanceOfKnownGlobal: public LDeferredCode {
public:
DeferredInstanceOfKnownGlobal(LCodeGen* codegen,
LInstanceOfKnownGlobal* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Gen... | false | false | false | false | false | 0 |
soap_in_wsrm__CloseSequenceType(struct soap *soap, const char *tag, struct wsrm__CloseSequenceType *a, const char *type)
{
size_t soap_flag_Identifier = 1;
size_t soap_flag_LastMsgNumber = 1;
if (soap_element_begin_in(soap, tag, 0, type))
return NULL;
a = (struct wsrm__CloseSequenceType *)soap_id_enter(soap, soap... | false | false | false | false | false | 0 |
show_version(user_interaction & dialog, const char *command)
{
string cmd;
tools_extract_basename(command, cmd);
U_I maj, med, min;
get_version(maj, med, min);
shell_interaction_change_non_interactive_output(&cout);
dialog.printf("\n %s version %s Copyright (C) 2002-2052 Denis Corbin\n\n", cmd.... | false | false | false | false | false | 0 |
bindVars(const StaticEnv & env)
{
if (recursive) {
StaticEnv newEnv(false, &env);
unsigned int displ = 0;
foreach (ExprAttrs::Attrs::iterator, i, attrs)
newEnv.vars[i->first] = displ++;
foreach (list<Inherited>::iterator, i, inherited) {
newEnv.vars[i->... | false | false | false | false | false | 0 |
GDALSuggestedWarpOutput2_MustAdjustForRightBorder(
GDALTransformerFunc pfnTransformer, void *pTransformArg,
double* padfExtent, int nPixels, int nLines,
double dfPixelSizeX, double dfPixelSizeY)
{
int nSamplePoints;
double dfRatio;
int bErr;
... | false | false | false | false | false | 0 |
set_label_offset(int label, int32 offset)
{
if (label >= MAX_LABELS) memoryerror("MAX_LABELS", MAX_LABELS);
label_offsets[label] = offset;
if (last_label == -1)
{ label_prev[label] = -1;
first_label = label;
}
else
{ label_prev[label] = last_label;
label_next[last_label]... | false | false | false | false | false | 0 |
grab_ok()
{
if( ! m_bt_ok ) return;
m_bt_ok->set_flags( Gtk::CAN_DEFAULT );
m_bt_ok->grab_default();
m_bt_ok->grab_focus();
} | false | false | false | false | false | 0 |
Scm_BignumAbsCmp(ScmBignum *bx, ScmBignum *by)
{
int i;
if (bx->size < by->size) return -1;
if (bx->size > by->size) return 1;
for (i=(int)bx->size-1; i>=0; i--) {
if (bx->values[i] < by->values[i]) return -1;
if (bx->values[i] > by->values[i]) return 1;
}
return 0;
} | false | false | false | false | false | 0 |
apple2_free (Display *dpy, Window window, void *closure)
{
struct state *st = (struct state *) closure;
if (st->sim) {
st->sim->stepno = A2CONTROLLER_DONE;
if (apple2_one_frame (st->sim))
abort(); /* should have freed! */
}
free (st);
} | false | false | false | false | false | 0 |
bgav_qt_rdrf_read(qt_atom_header_t * h,
bgav_input_context_t * input, qt_rdrf_t * ret)
{
if(!bgav_input_read_32_le(input, &ret->flags) ||
!bgav_input_read_fourcc(input, &ret->fourcc) ||
!bgav_input_read_fourcc(input, &ret->data_ref_size))
return 0;
ret->data_ref = malloc(ret->... | false | false | false | false | false | 0 |
stmpe_remove(struct stmpe *stmpe)
{
if (!IS_ERR(stmpe->vio))
regulator_disable(stmpe->vio);
if (!IS_ERR(stmpe->vcc))
regulator_disable(stmpe->vcc);
mfd_remove_devices(stmpe->dev);
return 0;
} | false | false | false | false | false | 0 |
match_style (char const *css_border_style,
ccss_border_style_type_t *style)
{
g_return_val_if_fail (css_border_style && *css_border_style, false);
for (unsigned int i = 0; i < G_N_ELEMENTS (_border_style_map); i++) {
if (0 == strcmp (_border_style_map[i].css, css_border_style)) {
*style = _border_style_m... | false | false | false | false | false | 0 |
handle_unset_command(String *args, int offset)
{
Var *var;
if (!(var = findglobalvar(args->data + offset)))
return shareval(val_zero);
return unsetvar(var) ? shareval(val_one) : shareval(val_zero);
} | false | false | false | false | false | 0 |
pcie_disable_notification(struct controller *ctrl)
{
u16 mask;
mask = (PCI_EXP_SLTCTL_PDCE | PCI_EXP_SLTCTL_ABPE |
PCI_EXP_SLTCTL_MRLSCE | PCI_EXP_SLTCTL_PFDE |
PCI_EXP_SLTCTL_HPIE | PCI_EXP_SLTCTL_CCIE |
PCI_EXP_SLTCTL_DLLSCE);
pcie_write_cmd(ctrl, 0, mask);
ctrl_dbg(ctrl, "%s: SLOTCTRL %x write cmd %x\n", ... | false | false | false | false | false | 0 |
globus_guc_plugin_finished(
globus_guc_plugin_op_t done_op,
globus_result_t result)
{
globus_l_guc_plugin_op_t * op;
op = (globus_l_guc_plugin_op_t *) done_op;
globus_mutex_lock(&op->monitor.mutex);
{
if(result != GLOBUS_SUCCESS)
{
... | false | false | false | false | false | 0 |
PK11_IVFromParam(CK_MECHANISM_TYPE type,SECItem *param,int *len)
{
CK_RC2_CBC_PARAMS *rc2_params;
CK_RC5_CBC_PARAMS *rc5_cbc_params;
*len = 0;
switch (type) {
case CKM_SEED_ECB:
case CKM_CAMELLIA_ECB:
case CKM_AES_ECB:
case CKM_DES_ECB:
case CKM_DES3_ECB:
case CKM_RSA_PKCS:
... | false | false | false | false | false | 0 |
make_datetime(struct tm *tm)
{
char *str;
if (tm == NULL) {
time_t now;
time(&now);
tm = gmtime(&now);
}
str = ds_xprintf("%d-%.2d-%.2dT%.2d:%.2d:%.2d%.2d%.2d",
tm->tm_year + 1900,
tm->tm_mon + 1,
tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec,
tm_get_gmtoff(tm) / 3600... | false | false | false | false | false | 0 |
cuesheet_track_array_copy_(const FLAC__StreamMetadata_CueSheet_Track *object_array, unsigned num_tracks)
{
FLAC__StreamMetadata_CueSheet_Track *return_array;
FLAC__ASSERT(0 != object_array);
FLAC__ASSERT(num_tracks > 0);
return_array = cuesheet_track_array_new_(num_tracks);
if(0 != return_array) {
unsigned i;... | false | false | false | false | false | 0 |
CalcMax() {
unsigned long p;
float i,r,m;
max=m=0.0;
for(p=0; p<pixels; p++) {
r=image[p].r; i=image[p].i;
m=r*r+i*i;
if (m>max) max=m;
}
max=sqrt(max);
} | false | false | false | false | false | 0 |
operator==( Workspace const &right ) const
{
if( right.codes_.size() != codes_.size() )return false;
std::size_t size( codes_.size() );
for( std::size_t i(0); i < size; ++i )
{
if( *codes_[i] != *right.codes_[i] )return false;
}
return true;
} | false | false | false | false | false | 0 |
AllocateHandles(const int& nhandles)
{
if ( (this->NumberOfHandles == nhandles) || (nhandles < 1) ){ return; }
// De-allocate the handles
this->ResetHandles();
this->NumberOfHandles = nhandles;
// Create the handles
this->Handle = new vtkActor* [this->NumberOfHandles];
this->HandleGeometry = new... | false | false | false | false | false | 0 |
sendData(int type, int flag, char *data, int count)
{
DEBUG2("[EX]: sendData() >%d<",count);
dMessage* dm = (dMessage*) malloc(sizeof(dMessage));
dm->size = count;
dm->file = NULL;
if (type == ID_SEND && flag) {
logger(L_DBG,"[EX]: sendData() send as bytes");
dm->type = DM_SENDB... | false | false | false | false | false | 0 |
square_set_to_string_test (void)
{
//! [square_set_to_string usage]
gchar *ss_to_string;
ss_to_string = square_set_to_string((SquareSet) 0);
g_assert_cmpstr(ss_to_string, ==, "");
g_free(ss_to_string);
ss_to_string = square_set_to_string((SquareSet) 5);
g_assert_cmpstr(ss_to_string, ==, "A1 C1");
g_free... | false | false | false | false | false | 0 |
aggressive_coalesce ()
{
struct dlist *d;
struct move *m;
init_web_pairs ();
while ((d = pop_list (&mv_worklist)) != NULL)
if ((m = DLIST_MOVE (d)))
{
struct web *s = alias (m->source_web);
struct web *t = alias (m->target_web);
if (t->type == PRECOLORED)
{
struct web *h = s;
s = t;
... | false | false | false | false | false | 0 |
volume_file_name_used (NemoDesktopLinkMonitor *monitor,
const char *name)
{
GList *l;
char *other_name;
gboolean same;
for (l = monitor->details->mount_links; l != NULL; l = l->next) {
other_name = nemo_desktop_link_get_file_name (l->data);
same = strcmp (name, other_name) == 0;
g_free (other_name);... | false | false | false | false | false | 0 |
dj_ready_mod(char mod_num)
{
#ifndef NO_SDL_MIXER
FILE *tmp;
int tmp_fd;
char* filename;
unsigned char *fp;
int len;
if (main_info.no_sound)
return 0;
switch (mod_num) {
case MOD_MENU:
fp = dat_open("jump.mod");
len = dat_filelen("jump.mod");
break;
case MOD_GAME:
fp = dat_open("bump.mod");
len =... | false | false | false | false | false | 0 |
DiagMatInverseAddU(void*A, double alpha, double dd[], int nn, int n){
diagmat* AA = (diagmat*)A;
int i;
double *val=AA->val;
for (i=0;i<n;i++){
dd[i*n+i]+=alpha/val[i];
}
return 0;
} | false | false | false | false | false | 0 |
on_help (G_GNUC_UNUSED GtkWidget *widget, Window* Win)
{
Win->GetApplication ()->OnHelp ();
} | false | false | false | false | false | 0 |
write_jt_footer(struct libjte_env *o)
{
int ret;
/* Finish calculating the image's checksum */
checksum_final(o->iso_context);
ret = write_template_desc_entries(o, o->image_size);
if (ret <= 0)
return ret;
ret = write_jigdo_file(o);
return ret;
} | false | false | false | false | false | 0 |
brasero_sum_dialog_drive_changed (BraseroToolDialog *dialog,
BraseroMedium *medium)
{
if (medium)
brasero_tool_dialog_set_valid (dialog, BRASERO_MEDIUM_VALID (brasero_medium_get_status (medium)));
else
brasero_tool_dialog_set_valid (dialog, FALSE);
} | false | false | false | false | false | 0 |
OnPortDestroyed(Port* port) {
ASSERT(worker_thread_ == talk_base::Thread::Current());
// Remove this port from the list (if we didn't drop it already).
std::vector<Port*>::iterator iter =
std::find(ports_.begin(), ports_.end(), port);
if (iter != ports_.end())
ports_.erase(iter);
LOG(INFO) << "Rem... | false | false | false | false | false | 0 |
dsp_jscc(void)
{
Uint32 newpc, cc_code;
cc_code = 0;
switch((cur_inst >> 16) & BITMASK(8)) {
case 0x0b:
dsp_calc_ea((cur_inst >>8) & BITMASK(6), &newpc);
cc_code=cur_inst & BITMASK(4);
break;
case 0x0f:
newpc = cur_inst & BITMASK(12);
cc_code=(cur_inst>>12) & BITMASK(4);
break;
}
if (dsp_ca... | false | false | false | false | false | 0 |
most_deregister_interface(struct most_interface *iface)
{
struct most_inst_obj *i = iface->priv;
struct most_c_obj *c;
mutex_lock(&deregister_mutex);
if (unlikely(!i)) {
pr_info("Bad Interface\n");
mutex_unlock(&deregister_mutex);
return;
}
pr_info("deregistering MOST device %s (%s)\n", i->kobj.name,
ifa... | false | false | false | false | false | 0 |
cursor_up(int n)
{
ofs -= n;
if (ofs < 0) ofs = 0;
return n;
} | false | false | false | false | false | 0 |
read_super(void)
{
unsigned long offset = super.root.offset << 2;
if (!S_ISDIR(super.root.mode))
die(FSCK_UNCORRECTED, 0, "root inode is not directory");
if (!(super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET) &&
((offset != sizeof(struct cramfs_super)) &&
(offset != PAD_SIZE + sizeof(struct cramfs_super)... | false | false | false | false | false | 0 |
knot_zone_diff_load_content(const knot_zone_contents_t *zone1,
const knot_zone_contents_t *zone2,
knot_changeset_t *changeset)
{
int result;
result = knot_zone_diff_load_trees(zone1->nodes, zone2->nodes, changeset);
if (result != KNOT_EOK... | false | false | false | false | false | 0 |
slaDimxv (dm, va, vb)
double (*dm)[3];
double *va;
double *vb;
/*
** - - - - - - - - -
** s l a D i m x v
** - - - - - - - - -
**
** Performs the 3-d backward unitary transformation:
**
** vector vb = (inverse of matrix dm) * vector va
**
** (double precision)
**
** (n.b. The matrix must be u... | false | false | false | false | false | 0 |
print_operand_address (FILE *file, rtx addr)
{
if (!addr)
error ("PRINT_OPERAND_ADDRESS, null pointer");
switch (GET_CODE (addr))
{
default:
fatal_insn ("invalid address", addr);
break;
case REG:
fprintf (file, "%s, 0", reg_names [REGNO (addr)]);
break;
case PLUS:
... | false | false | false | false | false | 0 |
opera1_xilinx_rw(struct usb_device *dev, u8 request, u16 value,
u8 * data, u16 len, int flags)
{
int ret;
u8 tmp;
u8 *buf;
unsigned int pipe = (flags == OPERA_READ_MSG) ?
usb_rcvctrlpipe(dev,0) : usb_sndctrlpipe(dev, 0);
u8 request_type = (flags == OPERA_READ_MSG) ? USB_DIR_IN : USB_DIR_OUT;
buf = kmall... | false | true | false | false | false | 1 |
printlines(FILE *fp, FILEINFO *fi, long line, long count, const char *tagstr)
{
LINE **lines; /* data of file */
long *lnum; /* line numbers */
char *data; /* current data line */
long curlnum; /* current line number */
line = line - fc.co... | false | false | false | false | false | 0 |
push(int port, Packet *p_in)
{
WritablePacket *p = p_in->uniqueify();
click_ip *iph = p->ip_header();
IPFlowID flowid(iph->ip_src, 0, iph->ip_dst, 0);
IPRewriterEntry *m = _map.get(flowid);
if (!m) { // create new mapping
IPRewriterInput &is = _input_specs.at_u(port);
IPFlowID rewritten_flowid... | false | false | false | false | false | 0 |
SetSubdivider( vtkDataSetEdgeSubdivisionCriterion* s )
{
if ( this->Subdivider == s )
{
return;
}
if ( this->Subdivider )
{
this->Subdivider->UnRegister( this );
}
this->Subdivider = s;
if ( this->Subdivider )
{
this->Subdivider->Register( this );
}
if ( this->T... | false | false | false | false | false | 0 |
lam_rflseek(fd, offset, whence)
int fd;
int4 offset;
int whence;
{
struct nmsg nhead; /* network message desc. */
struct freq *request; /* filed request */
struct freply *reply; /* filed reply */
int mask; /* signal mask */
/*
* Do simple error checking.
*/
if (_fdvalid(fd)) return(LAMERROR);
req... | false | false | false | false | false | 0 |
block_append(head, tail)
NODE *head, *tail;
{
NODE *end, *h = head;
if (tail == 0) return head;
again:
if (h == 0) return tail;
switch (nd_type(h)) {
case NODE_NEWLINE:
h = h->nd_next;
goto again;
case NODE_LIT:
case NODE_STR:
parser_warning(h, "unused literal ignored");
re... | false | false | false | false | false | 0 |
env_setf(const char *name, const char *fmt, ...)
{
char buffer[1000];
va_list ap;
va_start(ap, fmt);
vsnprintf(buffer, sizeof(buffer), fmt, ap);
va_end(ap);
env_set(name, buffer);
} | 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.