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_tracer_option(struct trace_array *tr,
struct tracer_flags *tracer_flags,
struct tracer_opt *opts, int neg)
{
struct tracer *trace = tr->current_trace;
int ret;
ret = trace->set_flag(tr, tracer_flags->val, opts->bit, !neg);
if (ret)
return ret;
if (neg)
tracer_flags->val &= ~opts->bi... | false | false | false | false | false | 0 |
delete_store (struct ls_expr * expr, basic_block bb)
{
rtx reg, i, del;
if (expr->reaching_reg == NULL_RTX)
expr->reaching_reg = gen_reg_rtx (GET_MODE (expr->pattern));
reg = expr->reaching_reg;
for (i = AVAIL_STORE_LIST (expr); i; i = XEXP (i, 1))
{
del = XEXP (i, 0);
if (BLOCK_FOR_INSN ... | false | false | false | false | false | 0 |
icaldirset_read_directory(icaldirset *dset)
{
char *str;
#ifndef WIN32
struct dirent *de;
DIR* dp;
dp = opendir(dset->dir);
if (dp == 0) {
icalerror_set_errno(ICAL_FILE_ERROR);
return ICAL_FILE_ERROR;
}
/* clear contents of directory list */
while((str = pvl_pop(dset->directory)... | false | false | false | false | false | 0 |
_setup(struct plugin *plugin, struct lms_context *ctxt)
{
plugin->video_db = lms_db_video_new(ctxt->db);
if (!plugin->video_db)
return -1;
return 0;
} | false | false | false | false | false | 0 |
qed_spq_hw_initialize(struct qed_hwfn *p_hwfn,
struct qed_spq *p_spq)
{
u16 pq;
struct qed_cxt_info cxt_info;
struct core_conn_context *p_cxt;
union qed_qm_pq_params pq_params;
int rc;
cxt_info.iid = p_spq->cid;
rc = qed_cxt_get_cid_info(p_hwfn, &cxt_info);
if (rc < 0) {
DP_NOTICE(p_hwfn, "Ca... | false | false | false | false | false | 0 |
load_dup(Unpicklerobject *self)
{
PyObject *last;
Py_ssize_t len;
if ((len = self->stack->length) <= 0) return stackUnderflow();
last=self->stack->data[len-1];
Py_INCREF(last);
PDATA_PUSH(self->stack, last, -1);
return 0;
} | false | false | false | false | false | 0 |
i915_check_and_clear_faults(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_engine_cs *ring;
int i;
if (INTEL_INFO(dev)->gen < 6)
return;
for_each_ring(ring, dev_priv, i) {
u32 fault_reg;
fault_reg = I915_READ(RING_FAULT_REG(ring));
if (fault_reg & RING_FAULT_... | false | false | false | false | false | 0 |
fasta_index_fetch(FastaDB *fdb, FILE *index_fp,
FastaDB_Mask mask, gchar *id,
gboolean be_silent){
register CompoundFile_Pos pos = fasta_index_lookup(fdb,
index_fp, id);
register FastaDB_Seq *fdb... | false | false | false | false | false | 0 |
gog_styled_object_parent_changed (GogObject *obj, gboolean was_set)
{
GogObjectClass *gog_object_klass = GOG_OBJECT_CLASS (parent_klass);
if (was_set) {
GogStyledObject *gso = GOG_STYLED_OBJECT (obj);
gog_theme_fillin_style (gog_object_get_theme (GOG_OBJECT (gso)),
gso->style, GOG_OBJECT (gso), 0, GO_STYLE_ALL... | false | false | false | false | false | 0 |
foldOffsetIntoAddress(uint64_t Offset,
X86ISelAddressMode &AM) {
// Cannot combine ExternalSymbol displacements with integer offsets.
if (Offset != 0 && (AM.ES || AM.MCSym))
return true;
int64_t Val = AM.Disp + Offset;
CodeModel::Model M = TM.getCodeModel();
if ... | false | false | false | false | false | 0 |
XGI_SetVCLKState(struct xgi_hw_device_info *HwDeviceExtension,
unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo)
{
unsigned short data, data2 = 0;
short VCLK;
unsigned char index;
index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
index &= IndexMask;
VCLK = XGI_VCLKData[index].C... | false | false | false | false | false | 0 |
gtksettings_gtk_settings_set_long_property(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
{
ScmObj settings_scm;
GtkSettings* settings;
ScmObj name_scm;
const gchar * name;
ScmObj v_long_scm;
long v_long;
ScmObj origin_scm;
const gchar * origin;
ScmObj SCM_SUBRARGS[4];
int SCM_i;
SCM_ENTER_SUBR("gtk... | false | false | false | false | false | 0 |
hts_parse_externals(htsmoduleStruct * str) {
str->wrapper_name = "wrapper-lib";
/* External callback */
if (RUN_CALLBACK1(str->opt, detect, str)) {
if (str->wrapper_name == NULL)
str->wrapper_name = "wrapper-lib";
/* Blacklisted */
if (multipleStringMatch
(str->wrapper_name, StringBuff(... | false | false | false | true | false | 1 |
radeon_atom_disp_eng_pll_init(struct radeon_device *rdev)
{
/* always set DCPLL */
if (ASIC_IS_DCE6(rdev))
atombios_crtc_set_disp_eng_pll(rdev, rdev->clock.default_dispclk);
else if (ASIC_IS_DCE4(rdev)) {
struct radeon_atom_ss ss;
bool ss_enabled = radeon_atombios_get_asic_ss_info(rdev, &ss,
ASIC_IN... | false | false | false | false | false | 0 |
get_codec_header(int card, int device, unsigned int* address,
unsigned int* codec_vendorid, unsigned int* codec_ssid)
{
gchar* filename = g_strdup_printf("/proc/asound/card%d/codec#%d", card, device);
gchar* contents = NULL;
int ok = g_file_get_contents(filename, &contents, NULL, NULL);
g_free(file... | false | false | false | false | false | 0 |
GetTag_SByte ( XMP_Uns8 ifd, XMP_Uns16 id, XMP_Int8* data ) const
{
const InternalTagInfo* thisTag = this->FindTagInIFD ( ifd, id );
if ( thisTag == 0 ) return false;
if ( (thisTag->type != kTIFF_SByteType) || (thisTag->dataLen != 1) ) return false;
if ( data != 0 ) *data = *thisTag->dataPtr;
return true;
} | false | false | false | false | false | 0 |
user_renameacl(char *name, char *olduser, char *newuser)
{
int r = 0;
char *acl;
char *rights, *nextid;
struct mboxlist_entry mbentry;
char *aclalloc;
r = mboxlist_lookup(name, &mbentry, NULL);
if (r) return r;
/* setacl re-calls mboxlist_lookup and will stomp on us */
aclalloc = a... | false | false | false | false | false | 0 |
endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
{
--depth;
if(depth == 0) {
Parser::Event *e = new Parser::Event;
e->setDocumentClose(namespaceURI, localName, qName);
e->setActualString(in->lastString());
in->resetLastData();
eventList.append(e);
i... | false | false | false | false | false | 0 |
freePlugin(ggobid *gg, PluginInstance *inst)
{
if (inst->data) {
GtkWidget *window = (GtkWidget *) inst->data;
gtk_widget_destroy (window);
inst->data = NULL;
}
} | false | false | false | false | false | 0 |
gs_alloc_tx_context(struct gs_can *dev)
{
int i = 0;
unsigned long flags;
spin_lock_irqsave(&dev->tx_ctx_lock, flags);
for (; i < GS_MAX_TX_URBS; i++) {
if (dev->tx_context[i].echo_id == GS_MAX_TX_URBS) {
dev->tx_context[i].echo_id = i;
spin_unlock_irqrestore(&dev->tx_ctx_lock, flags);
return &dev->tx_... | false | false | false | false | false | 0 |
prepare_dbo_server_operation (GdaDDLCreator *ddlc, GdaServerProvider *prov, GdaConnection *cnc, GdaMetaDbObject *dbo, GError **error)
{
GdaServerOperation *op = NULL;
switch (dbo->obj_type) {
case GDA_META_DB_UNKNOWN:
g_set_error (error, GDA_DDL_CREATOR_ERROR, GDA_DDL_CREATOR_INCORRECT_SCHEMA_ERROR,
_("Unk... | false | false | false | false | false | 0 |
commSetTypesUsed(void) {
uint8_t typesUsed = 0;
int i;
for (i = 0; i < COMM_NUM_PORTS; i++) {
typesUsed |= commData.portStreams[i];
}
commData.typesUsed = typesUsed;
} | false | false | false | false | false | 0 |
dbg_scan_orphans(struct ubifs_info *c, struct check_info *ci)
{
int lnum, err = 0;
void *buf;
/* Check no-orphans flag and skip this if no orphans */
if (c->no_orphs)
return 0;
buf = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL);
if (!buf) {
ubifs_err(c, "cannot allocate memory to check orphans");
return ... | false | false | false | false | false | 0 |
limnObjectEdgeAdd(limnObject *obj, unsigned int partIdx,
unsigned int lookIdx, unsigned int faceIdx,
unsigned int vertIdx0, unsigned int vertIdx1) {
int tmp, edgeIdx=-42;
unsigned int edgeIdxIdx;
limnEdge *edge=NULL;
limnPart *part;
part = obj->part[partIdx];
if (vertIdx... | false | false | false | false | false | 0 |
__blob_salvage(env, blob_id, offset, size, file_id, sdb_id, dbt)
ENV *env;
uintmax_t blob_id;
off_t offset;
size_t size;
uintmax_t file_id;
uintmax_t sdb_id;
DBT *dbt;
{
DB_FH *fhp;
char *blob_sub_dir, *dir, *path;
int ret;
size_t bytes;
blob_sub_dir = dir = path = NULL;
fhp = NULL;
if (file_id == 0 && ... | false | false | false | false | false | 0 |
retree_help()
{
/* display help information */
char tmp[100];
printf("\n\n . Redisplay the same tree again\n");
if (haslengths) {
printf(" = Redisplay the same tree with");
if (!nolengths)
printf("out/with");
else
printf("/without");
printf(" lengths\n");
}
printf(" U Undo the mo... | true | true | false | false | false | 1 |
__lambda111_ (Block27Data* _data27_) {
GtkDialog* clear_dialog = NULL;
const gchar* _tmp0_ = NULL;
GtkMessageDialog* _tmp1_ = NULL;
GtkDialog* _tmp2_ = NULL;
GtkButton* button = NULL;
const gchar* _tmp3_ = NULL;
GtkButton* _tmp4_ = NULL;
GtkImage* img = NULL;
GtkImage* _tmp5_ = NULL;
GtkButton* _tmp6_ = NULL;... | false | false | false | false | false | 0 |
QuadsWalk(QuadArgs *args, int quadIndex)
{
int side;
int *quad;
int knt;
int nbr;
ArrayHandle pHandle;
ArrayHandle qHandle;
int *visited, vCount;
int limit;
int fuzzFlag;
int *vPtr;
pHandle = args->pHandle;
qHandle = args->qHandle;
... | false | true | false | false | false | 1 |
drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
{
int num_modes = 0;
u32 quirks;
if (edid == NULL) {
return 0;
}
if (!drm_edid_is_valid(edid)) {
dev_warn(connector->dev->dev, "%s: EDID invalid.\n",
connector->name);
return 0;
}
quirks = edid_get_quirks(edid);
/*
* EDID spec... | false | false | false | false | false | 0 |
slotSelectionChanged()
{
bool startenabled = selectionModel()->hasSelection();
bool stopenabled = false;
bool hasselection = selectionModel()->selectedIndexes().count() > 0;
foreach(const QModelIndex &index, itemSelection().indexes()) {
Action* action = ActionCollectionModel::action(index);
... | false | false | false | false | false | 0 |
compose_exec_ext_editor_real(const gchar *file)
{
gchar buf[1024];
gchar *p;
gchar **cmdline;
pid_t pid;
cm_return_val_if_fail(file != NULL, -1);
if ((pid = fork()) < 0) {
perror("fork");
return -1;
}
if (pid != 0) return pid;
/* grandchild process */
if (setpgid(0, getppid()))
perror("setpgid");
... | false | false | false | false | false | 0 |
xz_bidder_bid(struct archive_read_filter_bidder *self,
struct archive_read_filter *filter)
{
const unsigned char *buffer;
ssize_t avail;
(void)self; /* UNUSED */
buffer = __archive_read_filter_ahead(filter, 6, &avail);
if (buffer == NULL)
return (0);
/*
* Verify Header Magic Bytes : FD 37 7A 58 5A 00
... | false | false | false | false | false | 0 |
node_get_type(node N, int side)
{
if (N == 0)
bad_error("null node to node_get_type");
if (side == LEFT)
return N->LT;
else if (side == RIGHT)
return N->RT;
bad_error("bad side given in node_get_type");
return 0;
} | false | false | false | false | false | 0 |
got_no_connection(watchdog_t *unused_wd, void *unused_obj)
{
(void) unused_wd;
(void) unused_obj;
if (GNET_PROPERTY(fw_debug)) {
g_debug("FW: got no connection to port %u for %d secs",
socket_listen_port(), FW_INCOMING_WINDOW);
}
inet_firewalled();
return FALSE; /* Disarm watchdog */
} | false | false | false | false | false | 0 |
xmlSecIsEmptyString(const xmlChar* str) {
xmlSecAssert2(str != NULL, -1);
for( ;*str != '\0'; ++str) {
if(!isspace((int)(*str))) {
return(0);
}
}
return(1);
} | false | false | false | false | false | 0 |
depth_rec(Quadtree *arbol, QNode *nodo) {
QList<sMarching_Square> cubos;
sMarching_Square m_cubo;
//Calcular si la superfice lo corta
m_cubo = evaluar_cubo(nodo->cubo);
if(m_cubo.tipo != 0 && m_cubo.tipo != 15) {
//Superfice corta
if(m_cubo.medio_lado*2 > min_grid) {
//... | false | false | false | false | false | 0 |
Finalize(Unit& unit)
{
unit.clearUnitState(UNIT_STAT_ROAMING | UNIT_STAT_ROAMING_MOVE);
((Creature*)&unit)->SetNoCallAssistance(false);
((Creature*)&unit)->CallAssistance();
if (unit.IsAlive())
{ unit.GetMotionMaster()->MoveSeekAssistanceDistract(sWorld.getConfig(CONFIG_UINT32_CREATURE_FAMILY_A... | false | false | false | false | false | 0 |
GetNextChunk( const WordType& wType)
{
vtkIdType size;
if(this->BufferInfo->loopTimes > 0)
{
size = this->BufferInfo->numWordsToRead;
}
else if(this->BufferInfo->loopTimes == 0)
{
size = this->BufferInfo->leftOver;
}
else
{
size = 0;
}
this->BufferChunk(wType,size);
--th... | false | false | false | false | false | 0 |
yy_SpecialChar()
{ int yypos0= yypos, yythunkpos0= yythunkpos;
yyprintf((stderr, "%s\n", "SpecialChar"));
{ int yypos279= yypos, yythunkpos279= yythunkpos; if (!yymatchChar('*')) goto l280; goto l279;
l280:; yypos= yypos279; yythunkpos= yythunkpos279; if (!yymatchChar('_')) goto l281; goto l279;
l281:; ... | false | false | false | false | false | 0 |
lockJob(Job& job, int how, fxStr& emsg)
{
if (job.fd < 0) {
job.fd = Sys::open("/" | job.qfile, O_RDWR, 0600);
if (job.fd < 0) {
emsg = "Cannot open/create job description file /" | job.qfile;
return (false);
}
}
if (flock(job.fd, how | LOCK_NB) >= 0)
return true;
if (errno == EWOULDBLOCK... | false | false | false | false | false | 0 |
seahorse_widget_new (const gchar *name, GtkWindow *parent)
{
/* Check if have widget hash */
SeahorseWidget *swidget = seahorse_widget_find (name);
GtkWindow *window;
/* If widget already exists, present */
if (swidget != NULL) {
gtk_window_present (GTK_WINDOW (seahorse_widget_get_w... | false | false | false | false | false | 0 |
epilog_slurmctld(struct job_record *job_ptr)
{
int rc;
pthread_t thread_id_epilog;
pthread_attr_t thread_attr_epilog;
if ((slurmctld_conf.epilog_slurmctld == NULL) ||
(slurmctld_conf.epilog_slurmctld[0] == '\0'))
return SLURM_SUCCESS;
if (access(slurmctld_conf.epilog_slurmctld, X_OK) < 0) {
error("Inval... | false | false | false | false | false | 0 |
ft_headcopy(fits)
FITSHead fits;
{
FITSHead head;
if ( fits == NULL ) return ft_headinit(NULL, 0);
Calloc(head, sizeof(struct _FITSHead));
head->primary = NULL;
head->rfcount = 1;
if ( fits->primary )
ft_primlink(fits->primary, head);
memmove(head, fits, sizeof(struct _FITSHead));
(void)Calloc (head... | false | false | false | false | false | 0 |
vect_single_imm_use (gimple def_stmt)
{
tree lhs = gimple_assign_lhs (def_stmt);
use_operand_p use_p;
gimple use_stmt;
if (!single_imm_use (lhs, &use_p, &use_stmt))
return NULL;
if (!vect_same_loop_or_bb_p (def_stmt, use_stmt))
return NULL;
return use_stmt;
} | false | false | false | false | false | 0 |
dc1394_log_set_default_handler(dc1394log_t type) {
switch (type) {
case DC1394_LOG_ERROR:
system_errorlog_handler = default_errorlog_handler;
errorlog_data=NULL;
return DC1394_SUCCESS;
case DC1394_LOG_WARNING:
system_warninglog_handler = default_warninglog_handler;
wa... | false | false | false | false | false | 0 |
hpet_resources(struct acpi_resource *res, void *data)
{
struct hpet_data *hdp;
acpi_status status;
struct acpi_resource_address64 addr;
hdp = data;
status = acpi_resource_to_address64(res, &addr);
if (ACPI_SUCCESS(status)) {
hdp->hd_phys_address = addr.address.minimum;
hdp->hd_address = ioremap(addr.addres... | false | false | false | false | false | 0 |
main_jadd(int argc, char *argv[])
{
struct gfs2_sbd sbd, *sdp = &sbd;
unsigned int total;
memset(sdp, 0, sizeof(struct gfs2_sbd));
sdp->jsize = GFS2_DEFAULT_JSIZE;
sdp->qcsize = GFS2_DEFAULT_QCSIZE;
sdp->md.journals = 1;
decode_arguments(argc, argv, sdp);
verify_arguments(sdp);
sdp->path_fd = open(sdp->pat... | false | false | false | false | true | 1 |
gtk_cmoption_menu_update_contents (GtkCMOptionMenu *option_menu)
{
GtkWidget *child;
GtkRequisition child_requisition;
GtkAllocation allocation;
cm_return_if_fail (GTK_IS_CMOPTION_MENU (option_menu));
if (option_menu->menu)
{
GtkWidget *old_item = option_menu->menu_item;
gtk_cmoption_... | false | false | false | false | false | 0 |
spy_bribe(int bribeAmount, short briberSpyRecno, short workerId)
{
if( !can_spy_bribe(workerId, spy_array[briberSpyRecno]->true_nation_recno) ) // this can happen in multiplayer as there is a one frame delay when the message is sent and when it is processed
return 0;
//---------------------------------------//
... | false | false | false | false | false | 0 |
gck_mock_C_Finalize (CK_VOID_PTR pReserved)
{
g_return_val_if_fail (pReserved == NULL, CKR_ARGUMENTS_BAD);
g_return_val_if_fail (initialized == TRUE, CKR_CRYPTOKI_NOT_INITIALIZED);
initialized = FALSE;
logged_in = FALSE;
g_hash_table_destroy (the_objects);
the_objects = NULL;
g_hash_table_destroy (the_sessions... | false | false | false | false | false | 0 |
print(STD_NAMESPACE ostream &out,
const size_t flags,
const int level,
const char *pixelFileName,
size_t *pixelCounter)
{
out << OFendl;
if (flags & DCMTypes::PF_useANSIEscapeCodes)
out << ANSI_ESCAPE... | false | false | false | false | false | 0 |
atmel_ssc_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai)
{
struct atmel_ssc_info *ssc_p = &ssc_info[dai->id];
struct atmel_pcm_dma_params *dma_params;
int dir;
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
dir = 0;
else
dir = 1;
dma_params = ssc_p->dma_params[di... | false | false | false | false | false | 0 |
boolean_param(bool& b)
{
return SPACE() && BOOLEAN(b) && CRLF();
} | false | false | false | false | false | 0 |
inf_gtk_certificate_dialog_set_chain(InfGtkCertificateDialog* dialog,
InfCertificateChain* chain)
{
InfGtkCertificateDialogPrivate* priv;
guint i;
gnutls_x509_crt_t crt;
GtkTreeIter prev_row;
GtkTreeIter new_row;
GtkTreeIter* parent;
GtkTreePath* path;
priv = INF_GT... | false | false | false | false | false | 0 |
snd_ac97_ad18xx_pcm_put_bits(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
int codec = kcontrol->private_value & 3;
int lshift = (kcontrol->private_value >> 8) & 0x0f;
int rshift = (kcontrol->private_value >> 12) & 0x0f;
int mask = (kcont... | false | false | false | false | false | 0 |
svm_init_osvw(struct kvm_vcpu *vcpu)
{
/*
* Guests should see errata 400 and 415 as fixed (assuming that
* HLT and IO instructions are intercepted).
*/
vcpu->arch.osvw.length = (osvw_len >= 3) ? (osvw_len) : 3;
vcpu->arch.osvw.status = osvw_status & ~(6ULL);
/*
* By increasing VCPU's osvw.length to 3 we ar... | false | false | false | false | false | 0 |
gd_commit_op_phase (struct list_head *peers, glusterd_op_t op, dict_t *op_ctx,
dict_t *req_dict, char **op_errstr, int npeers)
{
dict_t *rsp_dict = NULL;
int peer_cnt = -1;
int ret =... | false | false | false | false | false | 0 |
clear_counter(int min /** the minimum counter number */)
{
int i;
for (i=min; i<5; i++)
counter_chapter[i]=0;
} | false | false | false | false | false | 0 |
GetMaxCellSize()
{
int maxCellSize=0, cellSize;
if ( this->Verts )
{
cellSize = this->Verts->GetMaxCellSize();
if ( cellSize > maxCellSize )
{
maxCellSize = cellSize;
}
}
if ( this->Lines )
{
cellSize = this->Lines->GetMaxCellSize();
if ( cellSize > maxCellSize )... | false | false | false | false | false | 0 |
getidexpr(BOOL okmat, int autodef)
{
int type;
char name[SYMBOLSIZE+1]; /* symbol name */
int oldmode;
type = 0;
if (!getid(name))
return type;
switch (gettoken()) {
case T_LEFTPAREN:
oldmode = tokenmode(TM_DEFAULT);
getcallargs(name);
(void) tokenmode(oldmode);
type = 0;
break;
case T_ASSIGN:
if... | true | true | false | false | false | 1 |
has_sometimes_template (GstElement * element)
{
GstElementClass *klass = GST_ELEMENT_GET_CLASS (element);
GList *l;
for (l = klass->padtemplates; l != NULL; l = l->next) {
if (GST_PAD_TEMPLATE (l->data)->presence == GST_PAD_SOMETIMES)
return TRUE;
}
return FALSE;
} | false | false | false | false | false | 0 |
atanprep(prec,nptr1,nptr2,x,segp)
int prec;
numdata *nptr1, *nptr2;
word2 *x;
int *segp;
{
numdata *temp;
long diff, sh;
int n, m, sign1, sign2;
int cmp;
sign1 = nptr1->sign;
sign2 = nptr2->sign;
n = alignfloat(prec+1,nptr1);
m = alignfloat(prec+1,nptr2);
if(!n) {
if(!m)
... | false | false | false | false | false | 0 |
efichar_to_char(char *dest, const efi_char16_t *src, size_t dest_len)
{
int i, src_len = efichar_strlen(src, -1);
for (i=0; i < src_len && i < (dest_len/sizeof(*dest)) - 1; i++) {
dest[i] = src[i];
}
dest[i] = 0;
return i;
} | false | false | false | false | false | 0 |
execute( MapDisplayInterface* md )
{
if ( gamemap->state == GameMap::Replay )
return;
ASCString name = gamemap->preferredFileNames.mapname[0];
if ( name.find('.') != ASCString::npos )
name.erase( name.find('.') );
savegame( "map-" + name + "-completed" + (savegameextension + 1), gamemap );... | false | false | false | false | false | 0 |
xmlSecKeyGenerateByName(const xmlChar* name, xmlSecSize sizeBits, xmlSecKeyDataType type) {
xmlSecKeyDataId dataId;
xmlSecAssert2(name != NULL, NULL);
dataId = xmlSecKeyDataIdListFindByName(xmlSecKeyDataIdsGet(), name, xmlSecKeyDataUsageAny);
if(dataId == xmlSecKeyDataIdUnknown) {
xmlSecError(... | false | false | false | false | false | 0 |
amd_uncore_stop(struct perf_event *event, int flags)
{
struct hw_perf_event *hwc = &event->hw;
wrmsrl(hwc->config_base, hwc->config);
hwc->state |= PERF_HES_STOPPED;
if ((flags & PERF_EF_UPDATE) && !(hwc->state & PERF_HES_UPTODATE)) {
amd_uncore_read(event);
hwc->state |= PERF_HES_UPTODATE;
}
} | false | false | false | false | false | 0 |
fmc_find_sdb_device(struct sdb_array *tree,
uint64_t vid, uint32_t did, unsigned long *sz)
{
signed long res = -ENODEV;
union sdb_record *r;
struct sdb_product *p;
struct sdb_component *c;
int i, n = tree->len;
uint64_t last, first;
/* FIXME: what if the first interconnect is not at zero? */
for (i = 0; i... | false | false | false | false | false | 0 |
Read(void *buffer)
{
const unsigned int nDims = this->GetNumberOfDimensions();
// this will check to see if we are actually streaming
// we initialize with the dimensions of the file, since if
// largestRegion and ioRegion don't match, we'll use the streaming
// path since the comparison will fail
ImageIOR... | false | false | false | false | false | 0 |
buildSupportDir(string const & binary_dir,
exe_build_dir_to_top_build_dir top_build_dir_location)
{
string indirection;
switch (top_build_dir_location) {
case top_build_dir_is_one_level_up:
indirection = "../lib";
break;
case top_build_dir_is_two_levels_up:
indirection = "../../lib";
break;
}
retu... | false | false | false | false | false | 0 |
get_redirect_address(char *callback, char *buffer, int buflen,
char **address, char **ip_port, int *rsn)
{
char *p, *addr, *port;
bzero(buffer, buflen);
if (call_program(callback, NULL, NULL, buffer, buflen, 0))
return -1;
/* syntax is string_addr:string_port:string_reason */
addr = p = buffer;
if (*p == '... | false | false | false | false | false | 0 |
update_create_info(HA_CREATE_INFO *create_info)
{
ha_myisam::info(HA_STATUS_AUTO | HA_STATUS_CONST);
if (!(create_info->used_fields & HA_CREATE_USED_AUTO))
{
create_info->auto_increment_value= stats.auto_increment_value;
}
create_info->data_file_name=data_file_name;
create_info->index_file_name=index_fi... | false | false | false | false | false | 0 |
gst_cdxa_parse_change_state (GstElement * element, GstStateChange transition)
{
GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
GstCDXAParse *cdxa = GST_CDXA_PARSE (element);
switch (transition) {
case GST_STATE_CHANGE_READY_TO_PAUSED:
cdxa->state = GST_CDXA_PARSE_START;
break;
default:
... | false | false | false | false | false | 0 |
message(const char *format, ...)
{
va_list val;
va_start(val, format);
verror(ERR_MESSAGE, String(), format, val);
va_end(val);
} | false | false | false | false | false | 0 |
etree_append_child(etree_t *tree, void *parent, void *child)
{
node_t *cn, *pn;
etree_check(tree);
g_assert(parent != NULL);
g_assert(child != NULL);
g_assert(etree_is_orphan(tree, child));
cn = ptr_add_offset(child, tree->offset);
pn = ptr_add_offset(parent, tree->offset);
if (etree_is_extended(tree)) {
... | false | false | false | false | false | 0 |
ladish_app_supervisor_proxy_create(
const char * service,
const char * object,
void * context,
void (* app_added)(void * context, uint64_t id, const char * name, bool running, bool terminal, const char * level),
void (* app_state_changed)(void * context, uint64_t id, const char * name, bool running, bool term... | false | false | false | false | false | 0 |
df_pattern_emit_before (struct df *df, rtx pattern, basic_block bb, rtx insn)
{
rtx ret_insn;
rtx prev_insn = PREV_INSN (insn);
/* We should not be inserting before the start of the block. */
if (insn == BB_HEAD (bb))
abort ();
ret_insn = emit_insn_before (pattern, insn);
if (ret_insn == insn)
ret... | false | false | false | false | false | 0 |
IntersectWithLine(double p1[3], double p2[3], double n[3],
double p0[3], double& t, double x[3])
{
double num, den, p21[3];
double fabsden, fabstolerance;
// Compute line vector
//
p21[0] = p2[0] - p1[0];
p21[1] = p2[1] - p1[1];
p21[2] = p2[2] - p1[2];
// Compute denom... | false | false | false | false | false | 0 |
nic_enable(nic_t *nic)
{
if (nic->flags & NIC_GOING_DOWN) {
LOG_INFO(PFX "%s: NIC device is going down, "
"flag: 0x%x state: 0x%x",
nic->log_name, nic->flags, nic->state);
return -EINVAL;
}
if (nic->state == NIC_STOPPED) {
struct timespec ts;
struct timeval tp;
int rc;
pthread_mutex_lock(&nic->n... | false | false | false | false | false | 0 |
apds9960_buffer_postenable(struct iio_dev *indio_dev)
{
struct apds9960_data *data = iio_priv(indio_dev);
int ret;
ret = regmap_field_write(data->reg_int_ges, 1);
if (ret)
return ret;
ret = regmap_field_write(data->reg_enable_ges, 1);
if (ret)
return ret;
pm_runtime_get_sync(&data->client->dev);
return ... | false | false | false | false | false | 0 |
event_seat_device_removed_copy (CkLogSeatDeviceRemovedEvent *event,
CkLogSeatDeviceRemovedEvent *event_copy)
{
g_assert (event != NULL);
g_assert (event_copy != NULL);
event_copy->seat_id = g_strdup (event->seat_id);
event_copy->device_id = g_strdup (even... | false | false | false | false | false | 0 |
remove_some_program_points_and_update_live_ranges (void)
{
unsigned i;
int n;
int *map;
ira_object_t obj;
ira_object_iterator oi;
live_range_t r, prev_r, next_r;
sbitmap born_or_dead, born, dead;
sbitmap_iterator sbi;
bool born_p, dead_p, prev_born_p, prev_dead_p;
born = sbitmap_alloc (ira_max_po... | false | false | false | false | false | 0 |
ReadString(FreeImageIO *io, fi_handle handle) {
if( !FindChar(io, handle,'"') )
return NULL;
BYTE c;
std::string s;
io->read_proc(&c, sizeof(BYTE), 1, handle);
while(c != '"') {
s += c;
if( io->read_proc(&c, sizeof(BYTE), 1, handle) != 1 )
return NULL;
}
char *cstr = (char *)malloc(s.length()+1);
strcp... | false | false | false | false | false | 0 |
merge_or_replace_data (DATASET *dset0, DATASET **pdset1,
gretlopt opt, PRN *prn)
{
int err = 0;
if (dset0->Z != NULL) {
/* we have an existing dataset into which the new data
should be merged */
err = merge_data(dset0, *pdset1, opt, prn);
destroy_dataset(*pdset1);
} else {
/* starting from sc... | false | false | false | false | false | 0 |
set_adapters_delsys(char *o)
{
int i, j, la, a_id, ds;
char buf[100], *arg[20], *sep;
adapter *ad;
strncpy(buf, o, sizeof(buf));
la = split(arg, buf, sizeof(arg), ',');
for (i = 0; i < la; i++)
{
a_id = map_intd(arg[i], NULL, -1);
if (a_id < 0 || a_id >= MAX_ADAPTERS)
continue;
sep = strchr(arg[i], ':'... | true | true | false | false | false | 1 |
rdac_bus_detach( struct scsi_device *sdev )
{
struct rdac_dh_data *h = sdev->handler_data;
if (h->ctlr && h->ctlr->ms_queued)
flush_workqueue(kmpath_rdacd);
spin_lock(&list_lock);
if (h->ctlr)
kref_put(&h->ctlr->kref, release_controller);
spin_unlock(&list_lock);
sdev->handler_data = NULL;
kfree(h);
} | false | false | false | false | false | 0 |
markReadOnly(void)
{
UT_return_if_fail (!m_bIsReadOnly);
m_bIsReadOnly = true;
_computeCheckSum();
} | false | false | false | false | false | 0 |
static_projection (gamgi_plane *plane,
gamgi_cell *cell, gamgi_enum model)
{
gamgi_plane *plane_new;
/**************************************************************
* Plane Create: plane is just a template, removed in the *
* end, used to copy data to plane_new, the real plane *
* ... | false | false | false | false | false | 0 |
action_write (Unit *unit, dpacket packet)
{
Key *k = lookup_key (unit, GET_PCK_ARG1 (packet));
uaecptr addr = GET_PCK_ARG2 (packet);
uae_u32 size = GET_PCK_ARG3 (packet);
uae_u32 actual;
uae_u8 *buf;
int i;
if (k == 0) {
PUT_PCK_RES1 (packet, DOS_FALSE);
/* PUT_PCK_RES2 (packet, EINVAL); */
return;
}
g... | false | false | false | false | false | 0 |
Dataset_write_path_data(Dataset *dataset, FILE *fp){
register gint i;
register CompoundFile_Element *cfe;
for(i = 0; i < dataset->fdb->cf->element_list->len; i++){
cfe = dataset->fdb->cf->element_list->pdata[i];
fprintf(fp, "%s\n", cfe->path);
}
return;
} | false | false | false | false | false | 0 |
relocate_entry_cpu(struct drm_i915_gem_object *obj,
struct drm_i915_gem_relocation_entry *reloc,
uint64_t target_offset)
{
struct drm_device *dev = obj->base.dev;
uint32_t page_offset = offset_in_page(reloc->offset);
uint64_t delta = reloc->delta + target_offset;
char *vaddr;
int ret;
ret = i915_gem_ob... | false | false | false | false | false | 0 |
bundle(int a, ...)
{
int i;
char **q;
va_list arg;
i = a;
va_start(arg, a);
q = bsp_nxt;
if(bdebug)
fprint(2, "bundle %d elements at %lx\n", i, q);
while(i-- > 0) {
if(bsp_nxt >= &bspace[bsp_max])
yyerror("bundling space exceeded");
*bsp_nxt++ = va_arg(arg, char*);
}
*bsp_nxt++ = 0;
va_end(arg);
... | false | false | false | false | false | 0 |
catalog_reader_alloc (abstract_catalog_reader_class_ty *method_table)
{
abstract_catalog_reader_ty *pop;
pop = (abstract_catalog_reader_ty *) xmalloc (method_table->size);
pop->methods = method_table;
if (method_table->constructor)
method_table->constructor (pop);
return pop;
} | false | false | false | false | false | 0 |
menu_tab(void *xd, char *sc[], int nsc, char *b, size_t l, size_t m)
{
int n, n2 = 0;
USE_VAR(xd);
for (n = 0; n < nsc; n++) { /* second tab? cycle. */
if ((!strcasecmp(b, sc[n])) && (n < nsc - 1) && !strncasecmp(b, sc[n + 1], l)) {
n2 = n + 1;
break;
}
}
fo... | false | true | false | false | false | 1 |
regTestCompareFiles(FILE *fp,
char **argv,
l_int32 index1,
l_int32 index2,
l_int32 *psuccess)
{
char *root, *name1, *name2;
char namebuf[64];
l_int32 n, error,same;
SARRAY *sa;
PROCNAME("regTestCompa... | false | false | false | false | false | 0 |
memblock_free(phys_addr_t base, phys_addr_t size)
{
memblock_dbg(" memblock_free: [%#016llx-%#016llx] %pF\n",
(unsigned long long)base,
(unsigned long long)base + size - 1,
(void *)_RET_IP_);
kmemleak_free_part(__va(base), size);
return memblock_remove_range(&memblock.reserved, base, size);
} | false | false | false | false | false | 0 |
ick_xselx(unsigned int x)
{
register unsigned int r=0;
if(ick_Base != 2) ick_lose(IE778, ick_lineno, (const char*) NULL);
while(x) {if(x&1) r=(r<<1)|1; x>>=1;}
return r;
} | false | false | false | false | false | 0 |
idle_proceed_addrinfo(gpointer user_data) {
threadinfo *info = (threadinfo *)user_data;
GmNet *net = info->net;
info->idle_id = 0;
pthread_join(net->priv->thread, NULL);
net->priv->thread = 0;
if (info->ret != 0) {
gm_debug_msg(DEBUG_DEFAULT, "GmNet.Connect: getaddrinfo failed: %s",
gai_strerror(info->... | false | false | false | false | false | 0 |
call_play()
{
switch ( info.type )
{
case 'B':
cpu_jsr( info.play_addr );
break;
case 'C':
cpu_jsr( info.play_addr + 6 );
break;
}
} | false | false | false | false | false | 0 |
pow_number(const RCP<const Number> &x, long n)
{
RCP<const Number> r, p;
long mask = 1;
r = one;
p = x;
while (mask > 0 && n >= mask) {
if (n & mask)
r = mulnum(r, p);
mask = mask << 1;
p = mulnum(p, p);
}
return r;
} | false | false | false | false | false | 0 |
gln_watchdog_has_timed_out (void)
{
/* If loop detection is off or the timeout is set to zero, do nothing. */
if (gln_loopcheck_enabled && gln_watchdog_timeout_secs > 0)
{
time_t now;
double delta_time;
/*
* Wait until we've seen enough calls to make a timeout check. If we
* ha... | 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.