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 |
|---|---|---|---|---|---|---|
rtl92ee_dm_watchdog(struct ieee80211_hw *hw)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
bool fw_current_inpsmode = false;
bool fw_ps_awake = true;
rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_FW_PSMODE_STATUS,
(u8 *)(&fw_current_inpsmode));
rtlpriv->cfg->ops... | false | false | false | false | false | 0 |
Unregister(AudioIn& in)
{
if (in.mpDevice != this)
{
throw(Err("AudioDevice::Unregister(): I am not this AudioIn object's device."));
}
std::vector<AudioIn*>::iterator it = std::find(mInputs.begin(),mInputs.end(),&in);
if (it == mInputs.end())
{
throw(Err("AudioDevice::Unregister(): AudioIn object not registe... | false | false | false | false | false | 0 |
initFdd()
{
host_t * p_q;
u_short cidport;
char mapid[MAP_LEN];
int status;
if (gethostlist(dacport, &host_list, &host_end, &clist_cnt)) {
p_q = host_list;
while (p_q != NULL) {
sprintf(mapid,"sng$cid$%s",p_q->login);
if (!(cidport = pmd_getmap(mapid,p_q->hostid,(u_short)PMD_PROT_TCP)))
{
... | true | true | false | false | false | 1 |
commandReceived(const Task &task)
{
//kDebug() << this << "Command " << task.cmd << " added to the queue";
if (!suspended && incomingTasks.isEmpty())
QMetaObject::invokeMethod(q, "dequeue", Qt::QueuedConnection);
incomingTasks.enqueue(task);
} | false | false | false | false | false | 0 |
assign_to_matrix_mod (parser *p)
{
user_var *uvar;
gretl_matrix *m = NULL;
gretl_matrix *a, *b;
uvar = get_user_var_of_type_by_name(p->lh.name, GRETL_TYPE_MATRIX);
if (uvar == NULL) {
p->err = E_DATA;
} else {
a = user_var_get_value(uvar);
if (a == NULL) {
p->err = E_DATA;
}
}
... | false | false | false | false | false | 0 |
slotSaveCopy()
{
if (!m_doc) {
return;
}
QString fileName = QFileDialog::getSaveFileName(this, tr("Save Copy"), QDir::homePath(), tr("PDF Documents (*.pdf)"));
if (fileName.isEmpty()) {
return;
}
Poppler::PDFConverter *converter = m_doc->pdfConverter();
converter->setOutput... | false | false | false | false | false | 0 |
test_rand_corrupt(unsigned steps)
{
unsigned lup;
tosend_t tosend;
for (lup=0;lup<steps;lup++)
{
tosend.type = rand() % CORRUPT_SIZE;
tosend.step = lup % MAX_STEPS;
tosend.client_callbacks = NULL;
printf("RANDOM TEST: (%s in step %d) (%d of %d)\n",corrupt_types[tosend.type],tosend.step,lup+1,... | false | false | false | false | false | 0 |
allocate_ulq_item(lookup_type_t type, const kuid_t *kuid,
lookup_cb_start_t start, lookup_cb_err_t err, void *arg)
{
struct ulq_item *ui;
WALLOC(ui);
ui->magic = ULQ_ITEM_MAGIC;
ui->type = type;
ui->kuid = kuid_get_atom(kuid);
ui->start = start;
ui->err = err;
ui->arg = arg;
return ui;
} | false | false | false | false | false | 0 |
test2(int argc, char **argv) {
FXApp application("libtest","Martin Preuss");
FOX16_Gui *gui;
int rv;
uint32_t id1;
uint32_t id2;
uint64_t i1;
uint64_t i2;
application.init(argc,argv);
application.create();
gui=new FOX16_Gui(&application);
GWEN_Gui_SetGui(gui->getCInterface());
id1=GWEN_Gui_P... | false | false | false | false | false | 0 |
virtio_gpu_alloc_object(struct drm_device *dev,
size_t size, bool kernel,
bool pinned)
{
struct virtio_gpu_device *vgdev = dev->dev_private;
struct virtio_gpu_object *obj;
int ret;
ret = virtio_gpu_object_create(vgdev, size, kernel, pinned, &obj);
if (ret)
return ERR_PTR(ret);
return obj;
} | false | false | false | false | false | 0 |
bnx2x_mcast_validate_e2(struct bnx2x *bp,
struct bnx2x_mcast_ramrod_params *p,
enum bnx2x_mcast_cmd cmd)
{
struct bnx2x_mcast_obj *o = p->mcast_obj;
int reg_sz = o->get_registry_size(o);
switch (cmd) {
/* DEL command deletes all currently configured MACs */
case BNX2X_MCAST_CMD_DEL:
o->set_registr... | false | false | false | false | false | 0 |
_textview_yes (GtkButton *button,
gpointer user_data)
{
user_param_type *params= (user_param_type *) user_data;
gchar *key = params->key;
GcomprisTextCallback validate = params->callback;
GtkLabel *label = params->feedback;
GtkTextBuffer *text_buffer = params->TextBuffer;
GtkTextIter start_iter;
... | false | false | false | false | false | 0 |
nsslowcert_DestroyGlobalLocks(void)
{
if (dbLock) {
SKIP_AFTER_FORK(PZ_DestroyLock(dbLock));
dbLock = NULL;
}
if (certRefCountLock) {
SKIP_AFTER_FORK(PZ_DestroyLock(certRefCountLock));
certRefCountLock = NULL;
}
if (certTrustLock) {
SKIP_AFTER_FORK(PZ_DestroyLock(certTrustLock));
certTrustLock... | false | false | false | false | false | 0 |
fmakeword(FILE *f, char stop, int *cl) {
int wsize;
char *word;
int ll;
wsize = 102400;
ll=0;
word = (char *) malloc(sizeof(char) * (wsize + 1));
while(1) {
word[ll] = (char)fgetc(f);
if(ll==wsize) {
word[ll+1] = '\0';
wsize+=102400;
word... | false | false | false | false | false | 0 |
chip_intel_82093AA_n_reset_set(void *_css, unsigned int n_val)
{
struct cpssp *css = (struct cpssp *) _css;
unsigned int irq;
css->id = 8; /* FIXME */
css->arbitration = 0x0;
for (irq = 0; irq < 24; irq++) {
css->ioredtbl[irq].destination = 0x00;
css->ioredtbl[irq].mask = 1;
css->ioredtbl[irq].trigger_mode ... | false | false | false | false | false | 0 |
e_border_act_resize_begin(E_Border *bd,
Ecore_Event_Mouse_Button *ev)
{
E_OBJECT_CHECK(bd);
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
if (bd->lock_user_size) return;
if ((bd->resize_mode != RESIZE_NONE) || (bd->moving)) return;
if (!_e_border_resize_begin(bd))
return;
if (... | false | false | false | false | false | 0 |
inc_for_reload (reloadreg, in, value, inc_amount)
rtx reloadreg;
rtx in, value;
int inc_amount;
{
/* REG or MEM to be copied and incremented. */
rtx incloc = XEXP (value, 0);
/* Nonzero if increment after copying. */
int post = (GET_CODE (value) == POST_DEC || GET_CODE (value) == POST_INC);
r... | false | false | false | false | false | 0 |
mailimap_quota_quota_response_parse(mailstream * fd, MMAPString *buffer,
size_t * indx, struct mailimap_quota_quota_data ** result,
size_t progr_rate, progress_function * progr_fun)
{
size_t cur_token;
char * quotaroot;
clist * quota_list;
struct mailimap_quota_quota_data * quota_data;
int r;
int re... | false | false | false | false | false | 0 |
ap_show_directives(void)
{
const command_rec *pc;
int n;
for (n = 0; ap_loaded_modules[n]; ++n) {
for (pc = ap_loaded_modules[n]->cmds; pc && pc->name; ++pc) {
printf("%s (%s)\n", pc->name, ap_loaded_modules[n]->name);
if (pc->errmsg)
printf("\t%s\n", pc->er... | false | false | false | false | false | 0 |
createArrowMesh(const u32 tesselationCylinder,
const u32 tesselationCone,
const f32 height,
const f32 cylinderHeight,
const f32 width0,
const f32 width1,
const video::SColor vtxColor0,
const video::SColor vtxColor1) const
{
SMesh* mesh = (SMesh*)createCylinderMesh(wid... | false | false | false | false | false | 0 |
readApplePartitionMap(AbstractFile* file, ResourceKey* resources, unsigned int BlockSize) {
AbstractFile* bufferFile;
BLKXTable* blkx;
Partition* partition;
int i;
blkx = (BLKXTable*) (getDataByID(getResourceByKey(resources, "blkx"), 0)->data);
partition = (Partition*) malloc(512);
bufferFile = create... | false | false | false | false | false | 0 |
crmf_create_cert_extension(PLArenaPool *poolp,
SECOidTag id,
PRBool isCritical,
SECItem *data)
{
CRMFCertExtension *newExt;
SECOidData *oidData;
SECStatus rv;
newExt = (poolp == NULL) ? PORT_ZNew(CRMFCertExtension) :
PORT_Are... | false | false | false | false | false | 0 |
get_remote_server_info(client_data* client) {
struct addrinfo hints;
struct addrinfo *server_info;
int status = 0;
char port_string[5];
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_PASSIVE;
sprintf(port_string, "%d... | false | false | false | false | false | 0 |
write_pid_stack_stats(int prev, int curr, int dis, int disp_avg,
char *prev_string, char *curr_string,
unsigned long long itv)
{
struct pid_stats *pstc, *pstp;
unsigned int p;
int rc, again = 0;
if (dis) {
PRINT_ID_HDR(prev_string, pidflag);
printf(" StkSize StkRef Command\n");
}
for (p = 0; p ... | false | false | false | false | false | 0 |
RequestData(
vtkInformation*,
vtkInformationVector** inputVector,
vtkInformationVector* outputVector)
{
vtkInformation* info = outputVector->GetInformationObject(0);
vtkDataSet *output = vtkDataSet::SafeDownCast(
info->Get(vtkDataObject::DATA_OBJECT()));
vtkInformation* inInfo = inputVector[0]->GetInfo... | false | false | false | false | false | 0 |
file_notify(httrackp * opt, const char *adr, const char *fil,
const char *save, int create, int modify, int not_updated) {
RUN_CALLBACK6(opt, filesave2, adr, fil, save, create, modify, not_updated);
} | false | false | false | true | false | 1 |
metainformationkeyIsSpecieskey(const AjPStr key)
{
register ajuint i = 0U;
AjBool result = AJTRUE;
if (!key)
return ajFalse;
for (i = 0U; metainformationKNonSpeciesKeys[i]; i++)
if (ajStrMatchCaseC(key, metainformationKNonSpeciesKeys[i]))
{
result = AJFALSE;
... | false | false | false | false | false | 0 |
find_oldest_entry()
{
int i, j = -1;
unsigned age = 0, a;
struct timeval now;
gettime(&now, NULL);
for(i = 0; i < numentries; i++) {
if(entries[i].id == NULL)
continue;
a = now.tv_sec - entries[i].lease_end_m;
if(a > age) {
age = a;
j = i... | false | false | false | false | false | 0 |
X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name,
X509_OBJECT *ret)
{
if ((ctx->method == NULL) || (ctx->method->get_by_subject == NULL))
return X509_LU_FAIL;
if (ctx->skip) return 0;
return ctx->method->get_by_subject(ctx,type,name,ret);
} | false | false | false | false | false | 0 |
deleteFragNoUpdate(pf_Frag * pf)
{
UT_DEBUGMSG(("SEVIOR: deleting frag no update %p \n",pf));
getFragments().unlinkFrag(pf);
delete pf;
return true;
} | false | false | false | false | false | 0 |
invert(void) {
register unsigned int i, j, wh = (width * height) - 1;
unsigned char tmp;
for (i = 0, j = wh; j > i; j--, i++) {
tmp = *(red + j);
*(red + j) = *(red + i);
*(red + i) = tmp;
tmp = *(green + j);
*(green + j) = *(green + i);
*(green + i) = tmp;
tmp = *(blue + j)... | false | false | false | false | false | 0 |
buf_read(int fd, con c) {
if (c && c->len <= 0) {
int n = read(fd, c->data, sizeof c->data);
if (n > 0) {
c->len = n;
ssl_write(c);
} else if (!n || errno != EINTR && errno != EAGAIN) {
return 0;
}
}
return 1;
} | false | false | false | false | false | 0 |
do_bonus (struct state *st)
{
st->bonus_bright = 20;
if (st->jamming > 0) {
st->jamming--;
st->nearest -= 2; MODULO(st->nearest, TERRAIN_LENGTH);
return;
}
if (st->psychedelic_flag) change_colors(st);
switch (random() % 7) {
case 0: /* switch to or from wireframe */
st->wire_bonus = (st->wire_bonus?0:3... | false | false | false | false | true | 1 |
cu_copyn(const unichar_t *pt,int len) {
char *res, *rpt;
if(!pt)
return(NULL);
#ifdef MEMORY_MASK
if ( (len+1)>=MEMORY_MASK )
len = MEMORY_MASK-1;
#endif
res = galloc(len+1);
for ( rpt=res; --len>=0 ; *rpt++ = *pt++ );
*rpt = '\0';
return(res);
} | false | false | false | false | false | 0 |
translucent_initialize() {
int rc;
Debug(LDAP_DEBUG_TRACE, "==> translucent_initialize\n", 0, 0, 0);
translucent.on_bi.bi_type = "translucent";
translucent.on_bi.bi_db_init = translucent_db_init;
translucent.on_bi.bi_db_config = translucent_db_config;
translucent.on_bi.bi_db_open = translucent_db_open;
transl... | false | false | false | false | false | 0 |
segmentClickedHandler(const EventArgs& e)
{
// double-check we allow this action
if (d_sortingEnabled)
{
ListHeaderSegment* seg = ((ListHeaderSegment*)((WindowEventArgs&)e).window);
// is this a new sort column?
if (d_sortSegment != seg)
{
d_sortDir = ListHeaderSegment::Descending;
setSortSegment(*seg... | false | false | false | false | false | 0 |
abraca_cover_art_manager_on_bindata_add (AbracaCoverArtManager* self, xmmsv_t* value) {
gboolean result = FALSE;
gchar* hash = NULL;
xmmsv_t* _tmp0_;
const gchar* _tmp1_ = NULL;
gboolean _tmp2_ = FALSE;
gchar* _tmp3_;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (value != NULL, FALSE);
_tmp... | false | false | false | false | false | 0 |
arcmsr_hbaC_flush_cache(struct AdapterControlBlock *pACB)
{
struct MessageUnit_C __iomem *reg = pACB->pmuC;
int retry_count = 30;/* enlarge wait flush adapter cache time: 10 minute */
writel(ARCMSR_INBOUND_MESG0_FLUSH_CACHE, ®->inbound_msgaddr0);
writel(ARCMSR_HBCMU_DRV2IOP_MESSAGE_CMD_DONE, ®->inbound_doorbe... | false | false | false | false | false | 0 |
gsf_zip_vdir_free (GsfZipVDir *vdir, gboolean free_dirent)
{
GSList *l;
if (!vdir)
return;
for (l = vdir->children; l; l = l->next)
gsf_zip_vdir_free ((GsfZipVDir *)l->data, free_dirent);
g_slist_free (vdir->children);
g_free (vdir->name);
if (free_dirent && vdir->dirent)
gsf_zip_dirent_free (vdir->diren... | false | false | false | false | false | 0 |
new_basic_block (void)
{
int i;
next_qty = 0;
/* Invalidate cse_reg_info_table. */
cse_reg_info_timestamp++;
/* Clear out hash table state for this pass. */
CLEAR_HARD_REG_SET (hard_regs_in_table);
/* The per-quantity values used to be initialized here, but it is
much faster to initialize each ... | false | false | false | false | false | 0 |
insertRowToSelected(int i,
QMap<int, QVariant> const & itemData)
{
if (i <= -1)
i = 0;
if (i > selectedModel->rowCount())
i = selectedModel->rowCount();
if (!selectedModel->insertRow(i))
return false;
return selectedModel->setItemData(selectedModel->index(i), itemData);
} | false | false | false | false | false | 0 |
cx24117_set_voltage(struct dvb_frontend *fe,
enum fe_sec_voltage voltage)
{
struct cx24117_state *state = fe->demodulator_priv;
struct cx24117_cmd cmd;
int ret;
u8 reg = (state->demod == 0) ? 0x10 : 0x20;
dev_dbg(&state->priv->i2c->dev, "%s() demod%d %s\n",
__func__, state->demod,
voltage == SEC_VOL... | false | false | false | false | false | 0 |
manage_window_unmap(GtkWidget *widget, GdkEventAny *event, gpointer data)
{
/* const gchar *title = gtk_window_get_title(GTK_WINDOW(widget));
debug_print("Unmap event: window: %p - %s\n", widget,
title ? title : "no title"); */
if (focus_window == widget)
focus_window = NULL;
return FALSE;
} | false | false | false | false | false | 0 |
httpFilterChunkData(HttpQueue *q, HttpPacket *packet)
{
HttpConn *conn;
HttpRx *rx;
MprBuf *buf;
ssize chunkSize;
char *start, *cp;
int bad;
conn = q->conn;
rx = conn->rx;
mprAssert(packet);
buf = packet->content;
mprAssert(buf);
switch... | false | false | false | true | false | 1 |
err_print (int errnoflag, const char *fmt, va_list ap) {
int errno_save;
size_t n;
char buf[MAXLINE];
errno_save=errno;
vsnprintf(buf, MAXLINE, fmt, ap);
n=strlen(buf);
if (errnoflag)
snprintf(buf+n, MAXLINE-n, ": %s", strerror(errno_save));
strlcat(buf, "\n", sizeof(buf));
fflush(std... | true | true | false | false | true | 1 |
otoBigNum(const char *s)
{
this->resize(0); sign = 1; // Reset number to 0.
while (*s == ' ' || *s == '\t' || *s == '\n' || *s == '\r') ++s; // skip whitespace
Counter size = Counter(std::strlen(s));
Counter len = 0; // No chars converted yet
while (len < size) { ... | false | false | false | false | false | 0 |
convertAddressToRVA(Address *addr, RVA *r)
{
if (addr->getObjectID()==ATOM_ADDRESS_X86_FLAT_32) {
*r = ((AddressX86Flat32*)addr)->addr;
} else if (addr->getObjectID()==ATOM_ADDRESS_FLAT_32) {
*r = ((AddressFlat32*)addr)->addr;
} else {
return false;
}
return true;
} | false | false | false | false | false | 0 |
event_cache_add_for_players(const struct packet_chat_msg *packet,
struct event_cache_players *players)
{
if (0 < game.server.event_cache.turns
&& NULL != players
&& BV_ISSET_ANY(players->vector)
&& (server_state() > S_S_INITIAL || !game.info.is_new_game)) {
(void... | false | false | false | false | false | 0 |
asv2_encode_block(ASV1Context *a, DCTELEM block[64]){
int i;
int count=0;
for(count=63; count>3; count--){
const int index= scantab[count];
if( (block[index]*a->q_intra_matrix[index] + (1<<15))>>16 )
break;
}
count >>= 2;
asv2_put_bits(&a->pb, 4, count);
asv2_... | false | false | false | false | false | 0 |
__pyx_f_9lightning_4impl_14primal_cd_fast_12LossFunction__lipschitz_constant(CYTHON_UNUSED struct __pyx_obj_9lightning_4impl_14primal_cd_fast_LossFunction *__pyx_v_self, struct __pyx_obj_9lightning_4impl_12dataset_fast_ColumnDataset *__pyx_v_X, double __pyx_v_scale, double *__pyx_v_out) {
CYTHON_UNUSED int __pyx_v_n_... | false | false | false | false | false | 0 |
elm_widget_focus_direction_go(Evas_Object *obj, double degree)
{
Evas_Object *target = NULL;
Evas_Object *current_focused = NULL;
double weight = 0.0;
if (!_elm_widget_is(obj)) return EINA_FALSE;
if (!elm_widget_focus_get(obj)) return EINA_FALSE;
current_focused = elm_widget_focused_object_get(obj);... | false | false | false | false | false | 0 |
kanjito(k1, k2, code)
char_u *k1, *k2;
int code;
{
int_u kanji;
char_u ss3;
switch(code) {
case JP_JIS:
kanji = sjistojis(*k1, *k2);
*k1 = (kanji & 0xff00) >> 8;
*k2 = kanji & 0xff;
break;
case JP_EUC:
kanji = sjistoeuc(*k1, *k2, &ss3);
*k1 = (kanji & 0xff00) >> 8;
*k2 = kanji & 0xff;
brea... | false | false | false | false | false | 0 |
set_last_cursor(win)
win_T *win;
{
if (win->w_buffer != NULL)
win->w_buffer->b_last_cursor = win->w_cursor;
} | false | false | false | false | false | 0 |
substitute(formTree* source, map<string, vector<string> > valuation) {
if(source == NULL) return NULL;
int pathsel, oper;
vectr* elmts = NULL;
char* varbname = NULL;;
if(source->path_selector == NONEPARA) { //boolean operations
pathsel = source->path_selector;
oper = source->opertr;... | false | false | false | false | false | 0 |
clutter_stage_set_user_resizable (ClutterStage *stage,
gboolean resizable)
{
ClutterStagePrivate *priv;
g_return_if_fail (CLUTTER_IS_STAGE (stage));
priv = stage->priv;
if (clutter_feature_available (CLUTTER_FEATURE_STAGE_USER_RESIZE)
&& priv->is_user_resizable !=... | false | false | false | false | false | 0 |
check_status(void)
{
int i = inb_p(HD_STATUS);
if (!OK_STATUS(i)) {
dump_status("check_status", i);
bad_rw_intr();
}
} | false | false | false | false | false | 0 |
alloclrsaves(void)
{
long i,j;
lrsaves = Malloc(NLRSAVES * sizeof(node*));
for ( i = 0 ; i < NLRSAVES ; i++ ) {
lrsaves[i] = Malloc(sizeof(node));
lrsaves[i]->x = (phenotype)Malloc(endsite*sizeof(ratelike));
lrsaves[i]->underflows = Malloc(endsite * sizeof (double));
for (j = 0; j < endsite; j++)... | false | false | false | false | false | 0 |
update(scene::IMeshSceneNode* sceneNode, scene::IMeshSceneNode* sceneNode2T, scene::IMeshSceneNode* sceneNodeTangents)
{
if ( !Initialized )
return;
video::SMaterial & material = sceneNode->getMaterial(0);
video::SMaterial & material2T = sceneNode2T->getMaterial(0);
video::SMaterial & materialTangents = s... | false | false | false | false | false | 0 |
attack_frag(u_char *pkt, int len)
{
ELEM *f, *frag = NULL;
if (attack_num == 1) {
frag = ip_frag_make(pkt, len, 8);
}
else if (attack_num == 2) {
frag = ip_frag_make(pkt, len, 24);
}
else if (attack_num == 3) {
frag = ip_frag_make(pkt, len, 8);
if ((f = list_last(frag)) != NULL)
list_... | false | false | false | false | false | 0 |
add_pid(int pid)
{
int pos;
extern int find_position(int);
extern void gc();
// if pid is already in array pids
if (FUC_FAILURE != find_position(pid)) return FUC_SUCCESS;
if (n_pid_count < MAX_CLIENT_NUM)
{
if (FUC_FAILURE == (pos = find_position(EMPTY)))
{
//gc();
//if (FUC_FAILURE == (pos = find_po... | false | false | false | false | false | 0 |
insert_results(GList *list)
{
GList *entry;
struct latency_line *line;
GtkTreeIter iter;
gchar *reasonstr;
int l;
entry = g_list_first(list);
while(entry) {
char maxstr[32];
char percentstr[32];
line = entry->data;
entry = g_list_next(entry);
/* Skip too small values */
if (line->max * 0.001 < 0.1... | false | false | false | false | false | 0 |
new_pipeline_op (GObject *player, GstElement *fixture, GstElement *element)
{
RBGstPipelineOp *op;
op = g_new0 (RBGstPipelineOp, 1);
op->player = g_object_ref (player);
op->fixture = gst_object_ref (fixture);
op->element = gst_object_ref (element);
return op;
} | false | false | false | false | false | 0 |
_dxf_ExPrintTask (EXTask t)
{
DXMessage ("%08x: [%08x] (* %08x) (%08x) = [%08x ...] %g",
t, t->tg, t->func,
t->arg ? t->arg : t->data,
t->arg ? * ((int *) t->arg) : * ((int *) t->data),
t->work);
} | false | false | false | false | false | 0 |
libmpq__huffman_call_1500E820(struct huffman_tree_s *ht, struct huffman_tree_item_s *p_item) {
/* EDI */
struct huffman_tree_item_s *p_item1;
/* EAX */
struct huffman_tree_item_s *p_item2 = NULL;
/* EDX */
struct huffman_tree_item_s *p_item3;
/* EBX */
struct huffman_tree_item_s *p_prev;
/* loop through p... | false | false | false | false | false | 0 |
do_recursive_unset (GConfEngine* conf, const gchar** args)
{
if (args == NULL)
{
g_printerr (_("Must specify one or more keys to recursively unset.\n"));
return 1;
}
while (*args)
{
GError *err;
err = NULL;
gconf_engine_recursive_unset (conf, *args,
... | false | false | false | false | false | 0 |
strengthenOverflowingOperation(BinaryOperator *BO,
Value *IVOperand) {
// Fastpath: we don't have any work to do if `BO` is `nuw` and `nsw`.
if (BO->hasNoUnsignedWrap() && BO->hasNoSignedWrap())
return false;
const SCEV *(ScalarEvolution::*GetExprForBO)(co... | false | false | false | false | false | 0 |
sconf_get_schedule_interval(void) {
u_long32 uval = _SCHEDULE_TIME;
const char *time = NULL;
sge_mutex_lock("Sched_Conf_Lock", "", __LINE__, &pos.mutex);
time = get_schedule_interval_str();
if (!extended_parse_ulong_val(NULL, &uval, TYPE_TIM, time, NULL, 0, 0, true) ) {
uval = _SCHEDU... | false | false | false | false | false | 0 |
uci_send_ucinewgame(uci_t * uci) {
ASSERT(uci!=NULL);
if (option_get_int("UCIVersion") >= 2) {
engine_send(uci->engine,"ucinewgame");
}
} | false | false | false | false | false | 0 |
pp_post_recv(struct pingpong_context *ctx, int n)
{
struct ibv_sge list = {
.addr = (uintptr_t) ctx->buf,
.length = ctx->size + 40,
.lkey = ctx->mr->lkey
};
struct ibv_recv_wr wr = {
.wr_id = PINGPONG_RECV_WRID,
.sg_list = &list,
.num_sge = 1,
};
struct ibv_recv_wr *bad_wr;
int i;
for (i =... | false | false | false | false | false | 0 |
warning(char* s, char* t) /* print warning message */
{
fprint(2, "%s: %s", progname, s);
if (t)
fprint(2, " %s", t);
if (infile)
fprint(2, " in %s", infile);
fprint(2, " near line %d\n", lineno);
while (c != '\n' && c != Beof)
if((c = Bgetc(bin)) == '\n') /* flush rest of input line */
lineno++;
} | false | false | false | false | false | 0 |
Connect(const Arguments& args) {
HandleScope scope;
if (args.Length() < 2) {
return ThrowException(Exception::TypeError(
String::New("Must have at least two args")));
}
FD_ARG(args[0])
Handle<Value> error = ParseAddressArgs(args[1], args[2], false);
if (!error.IsEmpty()) return ThrowExcepti... | false | false | false | false | false | 0 |
_free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
if (cfdata->default_system_menu)
eina_stringshare_del(cfdata->default_system_menu);
E_FREE(cfdata);
} | false | false | false | false | false | 0 |
fftrec(char *card, /* I - keyword card to test */
int *status) /* IO - error status */
/*
Test that the keyword card conforms to the FITS standard. Must contain
only printable ASCII characters;
*/
{
size_t ii, maxchr;
char msg[81];
if (*status > 0) /* inherit input sta... | false | false | false | false | false | 0 |
fl_setpup_submenu( int m,
int i,
int subm )
{
MenuItem *item;
if ( ( item = requested_item_is_valid( "fl_setpup_submenu", m, i ) ) )
{
menu_rec[ m ].rpad = PADW + 16;
item->subm = subm;
}
} | false | false | false | false | false | 0 |
imp_is_frozen(PyObject *self, PyObject *args)
{
char *name;
struct _frozen *p;
if (!PyArg_ParseTuple(args, "s:is_frozen", &name))
return NULL;
p = find_frozen(name);
return PyBool_FromLong((long) (p == NULL ? 0 : p->size));
} | false | false | false | false | false | 0 |
JimParseStr(struct JimParserCtx *pc)
{
if (pc->tt == JIM_TT_SEP || pc->tt == JIM_TT_EOL ||
pc->tt == JIM_TT_NONE || pc->tt == JIM_TT_STR) {
/* Starting a new word */
if (*pc->p == '{') {
return JimParseBrace(pc);
}
if (*pc->p == '"') {
pc->state = JIM_... | false | false | false | false | false | 0 |
TTYget()
{
ECHAR c;
int s;
TTYflush();
if (el_Pushed) {
el_Pushed = 0;
return el_PushBack;
}
if (*el_Input)
return *el_Input++;
s = read(0, &c, (ESIZE_T)1) == 1 ? c : EOF;
return s;
} | false | false | false | false | false | 0 |
write_register( int addr, int data )
{
if ( addr == 0 )
{
period = dmc_period_table [pal_mode] [data & 15];
irq_enabled = (data & 0xC0) == 0x80; // enabled only if loop disabled
irq_flag &= irq_enabled;
recalc_irq();
}
else if ( addr == 1 )
{
int old_dac = dac;
dac = data & 0x7F;
// adjust last_amp ... | false | false | false | false | false | 0 |
gt_ulongabs(unsigned long nr1, unsigned long nr2)
{
if (nr1 == nr2) return 0UL;
if (nr1 > nr2) {
return nr1 - nr2;
} else {
return nr2 - nr1;
}
} | false | false | false | false | false | 0 |
nvbios_M0209Te(struct nvkm_bios *bios,
u8 *ver, u8 *hdr, u8 *cnt, u8 *len, u8 *snr, u8 *ssz)
{
struct bit_entry bit_M;
u32 data = 0x00000000;
if (!bit_entry(bios, 'M', &bit_M)) {
if (bit_M.version == 2 && bit_M.length > 0x0c)
data = nvbios_rd32(bios, bit_M.offset + 0x09);
if (data) {
*ver = nvbios... | false | false | false | false | false | 0 |
status_trigger (struct status_output *so)
{
if (so)
{
struct timeval null;
CLEAR (null);
return event_timeout_trigger (&so->et, &null, ETT_DEFAULT);
}
else
return false;
} | false | false | false | false | false | 0 |
sge_setup_sge_execd(sge_gdi_ctx_class_t *ctx, const char* tmp_err_file_name)
{
char err_str[1024];
int allowed_get_conf_errors = 5;
char* spool_dir = NULL;
const char *unqualified_hostname = ctx->get_unqualified_hostname(ctx);
const char *admin_user = ctx->get_admin_user(ctx);
DENTER(TOP_LAYER, "... | false | false | false | false | false | 0 |
cmd_lst(int dev_id, int argc, char **argv)
{
struct hci_conn_info_req *cr;
bdaddr_t bdaddr;
uint16_t timeout;
int opt, dd;
for_each_opt(opt, lst_options, NULL) {
switch (opt) {
default:
printf("%s", lst_help);
return;
}
}
helper_arg(1, 2, &argc, &argv, lst_help);
str2ba(argv[0], &bdaddr);
if (de... | false | false | false | false | false | 0 |
dmatest_init_dsts(u8 **bufs, unsigned int start, unsigned int len,
unsigned int buf_size)
{
unsigned int i;
u8 *buf;
for (; (buf = *bufs); bufs++) {
for (i = 0; i < start; i++)
buf[i] = PATTERN_DST | (~i & PATTERN_COUNT_MASK);
for ( ; i < start + len; i++)
buf[i] = PATTERN_DST | PATTERN_OVERWRITE
| ... | false | false | false | false | false | 0 |
ves_icall_System_Reflection_Module_GetPEKind (MonoImage *image, gint32 *pe_kind, gint32 *machine)
{
if (image_is_dynamic (image)) {
MonoDynamicImage *dyn = (MonoDynamicImage*)image;
*pe_kind = dyn->pe_kind;
*machine = dyn->machine;
}
else {
*pe_kind = ((MonoCLIImageInfo*)(image->image_info))->cli_cli_header.... | false | false | false | false | false | 0 |
time_cmp(PG_FUNCTION_ARGS)
{
TimeADT time1 = PG_GETARG_TIMEADT(0);
TimeADT time2 = PG_GETARG_TIMEADT(1);
if (time1 < time2)
PG_RETURN_INT32(-1);
if (time1 > time2)
PG_RETURN_INT32(1);
PG_RETURN_INT32(0);
} | false | false | false | false | false | 0 |
createSub(MachineBasicBlock *BB1,
MachineBasicBlock *BB2,
MCSymbolRefExpr::VariantKind Kind) const {
const MCSymbolRefExpr *Sym1 = MCSymbolRefExpr::create(BB1->getSymbol(), *Ctx);
const MCSymbolRefExpr *Sym2 = MCSymbolRefExpr::create(BB2->get... | false | false | false | false | false | 0 |
doit(struct sockaddr *who, int who_len)
{
int level;
int ptynum;
char user_name[256];
int error;
/*
* Find an available pty to use.
*/
ourpty = getpty(&ptynum);
if (ourpty < 0)
fatal(net, "All network ports in use");
#ifdef _SC_CRAY_SECURE_SYS
/*
* set ttyp line securit... | false | false | false | false | false | 0 |
icd_vpp(void)
{
unsigned int vpp=0;
if(icd_fd<0) return 0.0;
icd_cmd("$$7000\r"); // enable Vpp
vpp=icd_cmd("$$701D\r") & 0xFF; // What the heck does the high byte contain ?
icd_cmd("$$7001\r"); // disable Vpp
return ((double)vpp) / 11.25;
} | false | false | false | false | false | 0 |
mmc_test_check_broken_result(struct mmc_test_card *test,
struct mmc_request *mrq)
{
int ret;
BUG_ON(!mrq || !mrq->cmd || !mrq->data);
ret = 0;
if (!ret && mrq->cmd->error)
ret = mrq->cmd->error;
if (!ret && mrq->data->error == 0)
ret = RESULT_FAIL;
if (!ret && mrq->data->error != -ETIMEDOUT)
ret = mrq->... | false | false | false | false | false | 0 |
test_notes_notes__can_insert_a_note_with_a_custom_namespace(void)
{
git_oid note_oid, target_oid;
git_note *note;
cl_git_pass(git_oid_fromstr(&target_oid, "08b041783f40edfe12bb406c9c9a8a040177c125"));
create_note(¬e_oid, "refs/notes/some/namespace", "08b041783f40edfe12bb406c9c9a8a040177c125", "hello world on a... | false | false | false | false | false | 0 |
do_set(uschar *p)
{
int length;
tree_node *t;
uschar *porig = p;
uschar buffer[INBUFFSIZE];
uschar *name = misc_readitem(p, NULL, &length, buffer, INBUFFSIZE);
p += length;
while (isspace(*p)) p++;
t = misc_malloc(sizeof(tree_node) + Ustrlen(name));
Ustrcpy(t->name, name);
t->data = misc_readitem(p, NULL, &length, N... | false | false | false | false | false | 0 |
file_replace(struct magic_set *ms, const char *pat, const char *rep)
{
zval *patt;
int opts = 0;
pcre_cache_entry *pce;
char *res;
zval *repl;
int res_len, rep_cnt = 0;
TSRMLS_FETCH();
MAKE_STD_ZVAL(patt);
ZVAL_STRINGL(patt, pat, strlen(pat), 0);
opts |= PCRE_MULTILINE;
convert_libmagic_pattern(patt, opts);... | false | true | false | false | false | 1 |
readDataLine(char* line_buf, char* data_buf)
{
readFileLine(infile, line_buf);
char* tmp = line_buf;
int i = 0;
// Copy data-part into data_buf. Don't copy data-end
// separator character (normally ';')
while (i < DATA_PART_LEN && *tmp != DATA_END)
data_buf[i++] = *tmp++;
data_buf[i] = '\0';
// I... | false | false | false | false | false | 0 |
script(const int type, const QString &lang) const
{
ScriptsBook *s = d->getLanguage(lang);
if (!s) {
s = d->getLanguage(Trans::Constants::ALL_LANGUAGE);
if (!s) {
s = d->getLanguage("en");
if (!s)
return QString::null;
}
}
return s->m_Scrip... | false | false | false | false | false | 0 |
get_city_dialog_illness_text(const struct city *pcity,
char *buf, size_t bufsz)
{
int illness, ill_base, ill_size, ill_trade, ill_pollution;
struct effect_list *plist;
buf[0] = '\0';
if (!game.info.illness_on) {
cat_snprintf(buf, bufsz, _("Illness deactivated in ruleset."... | true | true | false | false | false | 1 |
pixSeedfillGrayBasin(PIX *pixb,
PIX *pixm,
l_int32 delta,
l_int32 connectivity)
{
PIX *pixbi, *pixmi, *pixsd;
PROCNAME("pixSeedfillGrayBasin");
if (!pixb || pixGetDepth(pixb) != 1)
return (PIX *)ERROR_PTR("pixb undefined or not ... | false | false | false | false | false | 0 |
push_ref_static(const char *name, int index)
{
fprintf(out, " ; push_ref_static(%s, %d)\n", name, index);
if (reg < REG_MAX)
{
fprintf(out, " mov %s, _%s\n", REG_STACK(reg++), name);
}
else
{
fprintf(out, " push _%s\n", name);
stack++;
}
return 0;
} | false | false | false | false | false | 0 |
canvas_unrealize (GtkWidget *widget)
{
ECanvas * ecanvas = E_CANVAS (widget);
if (ecanvas->idle_id) {
g_source_remove (ecanvas->idle_id);
ecanvas->idle_id = 0;
}
gtk_im_context_set_client_window (ecanvas->im_context, NULL);
/* Chain up to parent's unrealize() method. */
GTK_WIDGET_CLASS (e_canvas_parent_cl... | false | false | false | false | false | 0 |
installed(mail::imap &imapAccount)
{
if (hasStringArg)
{
string::iterator b=stringArg.begin(), e=stringArg.end();
while (b != e)
{
if (*b < ' ' || *b >= 127)
break;
b++;
}
if (b == e)
searchCmd += mail::imap::quoteSimple(stringArg);
else
{
ostringstream o;
o << "{" << stringArg.siz... | 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.