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 |
|---|---|---|---|---|---|---|
__ecereMethod___ecereNameSpace__eda__IdList_OnSaveEdit(struct __ecereNameSpace__ecere__com__Class * class, struct __ecereNameSpace__ecere__com__Instance ** this, struct __ecereNameSpace__ecere__com__Instance * window, void * object)
{
struct __ecereNameSpace__eda__IdList * __ecerePointer___ecereNameSpace__eda__IdList =... | false | false | false | true | false | 1 |
c67x00_add_ctrl_urb(struct c67x00_hcd *c67x00, struct urb *urb)
{
int ret;
int pid;
switch (urb->interval) {
default:
case SETUP_STAGE:
ret = c67x00_create_td(c67x00, urb, urb->setup_packet,
8, USB_PID_SETUP, 0, SETUP_STAGE);
if (ret)
return ret;
urb->interval = SETUP_STAGE;
usb_settoggle(ur... | false | false | false | false | false | 0 |
fsendstr(char *s, FILE *fout) {
if (s == NULL) {
fputc(0, fout);
return;
}
fputc(strlen(s), fout);
fwrite(s, 1, strlen(s), fout);
} | false | false | false | false | false | 0 |
open(const char* name) {
FILE* file = fopen(name, "r+");
if (file == NULL) return NULL;
fseek(file, 0, SEEK_END);
int size = ftell(file);
void* memory =
mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fileno(file), 0);
return new PosixMemoryMappedFile(file, memory, size);
} | false | false | false | false | true | 1 |
addToLeaderTable(uint32_t N, Value *V, BasicBlock *BB) {
LeaderTableEntry &Curr = LeaderTable[N];
if (!Curr.Val) {
Curr.Val = V;
Curr.BB = BB;
return;
}
LeaderTableEntry *Node = TableAllocator.Allocate<LeaderTableEntry>();
Node->Val = V;
Node->BB = BB;
... | false | false | false | false | false | 0 |
on_contact_removed (EBookBackend *backend,
const gchar *uid)
{
EBookBackendGooglePrivate *priv;
GList *iter;
priv = E_BOOK_BACKEND_GOOGLE_GET_PRIVATE (backend);
for (iter = priv->bookviews; iter; iter = iter->next)
e_data_book_view_notify_remove (E_DATA_BOOK_VIEW (iter->data), g_strdup (uid)... | false | false | false | false | false | 0 |
hidePopup()
{
d->showDialogTimer.stop();
d->delayedShowTimer.stop();
Dialog *dialog = d->dialogPtr.data();
if (dialog && dialog->isVisible()) {
if (location() != Floating) {
dialog->animatedHide(locationToInverseDirection(location()));
} else {
dialog->hide();
... | false | false | false | false | false | 0 |
alloc_named_ct(int *limit, Bool do_allocate)
{
/* First thing in base array are colors probably already in the color map
because they have familiar names.
I pasted them into a xpm and spread them out so that similar colors are
spread out.
Toward the end are some colors to fill in the gaps.
Currently 61 ... | false | false | false | false | false | 0 |
file_info_rename(fileinfo_t *fi, const char *filename)
{
bool success = FALSE;
char *pathname;
file_info_check(fi);
g_return_val_if_fail(fi->hashed, FALSE);
g_return_val_if_fail(filename, FALSE);
g_return_val_if_fail(filepath_basename(filename) == filename, FALSE);
g_return_val_if_fail(!FILE_INFO_COMPLETE(fi),... | false | false | false | false | false | 0 |
_ds_get_nextuser (DSPAM_CTX * CTX)
{
struct _mysql_drv_storage *s = (struct _mysql_drv_storage *) CTX->storage;
#ifndef VIRTUAL_USERS
struct passwd *p;
#else
char *virtual_table, *virtual_username;
#endif
uid_t uid;
char query[512];
MYSQL_ROW row;
int query_rc = 0;
int query_errno = 0;
#ifdef VIRTUAL_U... | false | false | false | false | false | 0 |
skd_do_inq_page_da(struct skd_device *skdev,
volatile struct fit_completion_entry_v1 *skcomp,
volatile struct fit_comp_error_info *skerr,
uint8_t *cdb, uint8_t *buf)
{
struct pci_dev *pdev = skdev->pdev;
unsigned max_bytes;
struct driver_inquiry_data inq;
u16 val;
pr_debug("%s:%s:%d ... | false | true | false | false | false | 1 |
ario_tree_albums_add_next_albums (ArioTreeAlbums *tree,
const GSList *albums,
ArioServerCriteria *criteria)
{
ARIO_LOG_FUNCTION_START;
const GSList *tmp;
ArioServerAlbum *server_album;
GtkTreeIter album_iter;
gch... | false | false | false | false | false | 0 |
SinTable (Real fValue)
{
// Convert range to index values, wrap if required
int idx;
if (fValue >= 0)
{
idx = int(fValue * mTrigTableFactor) % mTrigTableSize;
}
else
{
idx = mTrigTableSize - (int(-fValue * mTrigTableFactor) % mTrigTable... | false | false | false | false | false | 0 |
uncore_pmu_to_box(struct intel_uncore_pmu *pmu, int cpu)
{
struct intel_uncore_box *box;
box = *per_cpu_ptr(pmu->box, cpu);
if (box)
return box;
raw_spin_lock(&uncore_box_lock);
/* Recheck in lock to handle races. */
if (*per_cpu_ptr(pmu->box, cpu))
goto out;
list_for_each_entry(box, &pmu->box_list, list) ... | false | false | false | false | false | 0 |
accept_listener_protocol(struct Listener *listener, char *protocol) {
if (listener->protocol == 0 && strcasecmp(protocol, "http") == 0)
listener->protocol = HTTP;
else
listener->protocol = TLS;
if (listener->addr.ss_family == AF_INET && ((struct sockaddr_in *)&listener->addr)->sin_port == 0... | false | false | false | false | false | 0 |
mddev_init(struct mddev *mddev)
{
mutex_init(&mddev->open_mutex);
mutex_init(&mddev->reconfig_mutex);
mutex_init(&mddev->bitmap_info.mutex);
INIT_LIST_HEAD(&mddev->disks);
INIT_LIST_HEAD(&mddev->all_mddevs);
setup_timer(&mddev->safemode_timer, md_safemode_timeout,
(unsigned long) mddev);
atomic_set(&mddev-... | false | false | false | false | false | 0 |
correct_viewpoint()
{
if (*curchar - *text < ofs) {
ofs = *curchar-*text;
} else {
if (*curchar - *text - (size.w-2)*size.h+1 > ofs) {
ofs = *curchar-*text-(size.w-2)*size.h+1;
}
}
} | false | false | false | false | false | 0 |
doc_remove(Doc *d)
{
GSview *a = d->app;
int code = 0;
Doc *dn;
app_lock(a);
dn = *app_docs(a);
if (dn == NULL) {
/* not in list */
char str[] = "App has no Doc\n";
/* Doc has already locked app */
app_msg_len_nolock(a, str, (int)strlen(str));
code = -1;
}
else if (dn == d) {
*app_... | false | false | false | false | false | 0 |
equiv_structs(PyTypeObject *a, PyTypeObject *b)
{
return a == b ||
(a != NULL &&
b != NULL &&
a->tp_basicsize == b->tp_basicsize &&
a->tp_itemsize == b->tp_itemsize &&
a->tp_dictoffset == b->tp_dictoffset &&
a->tp_weaklistoffset == b->tp_weaklistoffset &&
(... | false | false | false | false | false | 0 |
irmo_interface_bind_class(IrmoInterface *iface, char *class_name,
char *struct_name)
{
IrmoClass *klass;
irmo_return_if_fail(iface != NULL);
irmo_return_if_fail(class_name != NULL);
irmo_return_if_fail(struct_name != NULL);
// Get the class
... | false | false | false | false | false | 0 |
gsicc_read_serial_icc(gx_device *dev, int64_t icc_hashcode)
{
cmm_profile_t *profile;
int64_t position;
int size;
int code;
gx_device_clist_reader *pcrdev = (gx_device_clist_reader*) dev;
/* Create a new ICC profile structure */
profile = gsicc_profile_new(NULL, pcrdev->memory, NULL, 0);
... | false | false | false | false | false | 0 |
search_by_id(uint32_t id){
struct rqst_id *pid = ids;
while(pid != NULL){
if(id == pid->request_id)
return pid;
pid = pid->next;
}
return NULL;
} | false | false | false | false | false | 0 |
p_pixel_check_opaque(GimpPixelFetcher *pft, gint bpp, gdouble needx, gdouble needy)
{
guchar pixel[4][4];
gdouble alpha_val;
gint xi, yi;
gint alpha_idx;
if (needx >= 0.0)
xi = (int) needx;
else
xi = -((int) -needx + 1);
if (needy >= 0.0)
yi = (int) needy;
else
yi = -((int) -need... | false | false | false | false | false | 0 |
vtkSortDataArrayComponentCompare_VTK_VARIANT( const void* a, const void* b )
{
vtkVariantLessThan comp;
return comp(((vtkVariant*)a)[vtkSortDataArrayComp], ((vtkVariant*)b)[vtkSortDataArrayComp]) ? -1 :
(comp(((vtkVariant*)b)[vtkSortDataArrayComp], ((vtkVariant*)a)[vtkSortDataArrayComp]) ? 1 : 0);
} | false | false | false | false | false | 0 |
make_search_key(const char *filter, const char *lookupkey)
{
size_t l=strlen(filter)+1;
char *p, *q;
const char *cp;
for (cp=filter; *cp; cp++)
if (*cp == '@')
l += strlen(lookupkey);
p=malloc(l);
if (!p)
return NULL;
for (q=p, cp=filter; *cp; cp++)
{
if (*cp == '@')
{
const char *k=lookupkey;
... | false | false | false | false | false | 0 |
exitArchiveRecovery(TimeLineID endTLI, uint32 endLogId, uint32 endLogSeg)
{
char recoveryPath[MAXPGPATH];
char xlogpath[MAXPGPATH];
/*
* We are no longer in archive recovery state.
*/
InArchiveRecovery = false;
/*
* We should have the ending log segment currently open. Verify, and then
* close it (to ... | true | true | false | false | true | 1 |
mmc_read_track_information(int host_no, struct scsi_cmd *cmd)
{
struct mmc_info *mmc = dtype_priv(cmd->dev);
struct track_type *t;
unsigned char *data;
unsigned char buf[4096];
int type;
int lba;
if (mmc->current_profile == PROFILE_NO_PROFILE) {
scsi_set_in_resid_by_actual(cmd, 0);
sense_data_build(cmd, NOT... | false | false | false | false | false | 0 |
strToBuf(const char *str)
{
if (str == NULL) {
str = "";
}
ArTypes::UByte2 tempLen = strlen(str) + 1;
if (!hasWriteCapacity(tempLen)) {
return;
}
memcpy(myBuf+myLength, str, tempLen);
myLength += tempLen;
} | false | false | false | false | false | 0 |
client3_3_rename (call_frame_t *frame, xlator_t *this,
void *data)
{
clnt_conf_t *conf = NULL;
clnt_args_t *args = NULL;
gfs3_rename_req req = {{0,},};
int ret = 0;
int op_errno = ESTALE;
if (!frame |... | false | true | false | true | false | 1 |
_eraseFixup(Node* x)
{
while (x != m_pRoot && x->color == Node::black)
{
if (x == x->parent->left)
{
Node *tmp = x->parent->right;
if (tmp->color == Node::red)
{
tmp->color = Node::black;
x->parent->color = Node::red;
_leftRotate(x->parent);
tmp = x->parent->right;
}
if (tmp->left->... | false | false | false | false | false | 0 |
EmitFrames(bool usingCFI) {
if (!getNumFrameInfos())
return;
if (EmitEHFrame)
MCDwarfFrameEmitter::Emit(*this, usingCFI, true);
if (EmitDebugFrame)
MCDwarfFrameEmitter::Emit(*this, usingCFI, false);
} | false | false | false | false | false | 0 |
ins(UT_uint32 position, const UT_GrowBufElement * pValue, UT_uint32 length)
{
// insert the given buffer into the growbuf
if (!length)
{
UT_ASSERT(!pValue);
return true;
}
UT_ASSERT(pValue);
if (position > m_iSize)
{
// Situation here: We're inserting after the end of the
// buffer that we've previo... | false | false | false | false | false | 0 |
toElem (IRState *irs)
{
VarDeclaration *vd = declaration->isVarDeclaration();
if (vd != NULL)
{
if (!vd->isStatic() && !(vd->storage_class & STCmanifest)
&& !(vd->storage_class & (STCextern | STCtls | STCgshared)))
{
// Put variable on list of things needing destruction
if (vd->edtor && !vd->no... | false | false | false | false | false | 0 |
mdunlink(RelFileNodeBackend rnode, ForkNumber forkNum, bool isRedo)
{
char *path;
int ret;
/*
* We have to clean out any pending fsync requests for the doomed
* relation, else the next mdsync() will fail.
*/
ForgetRelationFsyncRequests(rnode, forkNum);
path = relpath(rnode, forkNum);
/*
* Delete o... | false | false | false | false | false | 0 |
afr_create_pending_matrix (int32_t child_count)
{
gf_boolean_t cleanup = _gf_false;
int32_t **pending_matrix = NULL;
int i = 0;
GF_ASSERT (child_count > 0);
pending_matrix = GF_CALLOC (sizeof (*pending_matrix), child_count,
... | false | false | false | false | false | 0 |
plugin_load_model_from_stream(G3DContext *context, G3DStream *stream,
G3DModel *model, gpointer user_data)
{
yyscan_t scanner;
YY_BUFFER_STATE bufstate;
G3DMaterial *material;
gchar line[MAX_LINE_SIZE + 1], *buffer, *bufp;
guint32 ver_maj, ver_min, filetype, buflen;
memset(line, 0, MAX_LINE_SIZE);
g3d_stream_r... | false | true | false | false | false | 1 |
setStringOptionFromMultiMap(const MultiMap& mm, const string& key, string& option) {
typedef MultiMap::const_iterator CI;
pair<CI,CI> entries = mm.equal_range(key);
if (entries.first != entries.second) option = entries.first->second;
} | false | false | false | false | false | 0 |
gst_dfbvideosink_get_caps_from_format (DFBSurfacePixelFormat format)
{
GstCaps *caps = NULL;
gboolean is_rgb = FALSE, is_yuv = FALSE;
gint bpp, depth;
guint32 fourcc;
g_return_val_if_fail (format != DSPF_UNKNOWN, NULL);
switch (format) {
case DSPF_RGB16:
is_rgb = TRUE;
bpp = 16;
dept... | false | false | false | false | false | 0 |
setDescriptiveValue(const char *d)
{
if (DEFAULT_VALUE_NEEDS_DELETING(this))
delete[] (char*)this->default_value;
this->default_value = DuplicateString(d);
this->descriptive_default = TRUE;
} | false | false | false | false | false | 0 |
OnCmbStatusSelect(wxCommandEvent&)
{
int status = cmbStatus->GetCurrentSelection();
if (status != 4)
{
cmbAbbreviation->SetSelection(status);
}
else
{
cmbAbbreviation->SetValue(_T(""));
cmbStatus->SetValue(_T(""));
}
} | false | false | false | false | false | 0 |
button_released(double x, double y)
{
x /= ui_scale;
y /= ui_scale;
Wdgt::Object *exposeObj = 0;
if (dragWdgt != 0) {
exposeObj = dragWdgt;
}
buttonPressWdgt = 0;
dragWdgt = 0;
hoverWdgt = 0;
if (exposeObj != 0) {
draw_wdgt(exposeObj);
}
return;
} | false | false | false | false | false | 0 |
cik_cp_compute_fini(struct radeon_device *rdev)
{
int i, idx, r;
cik_cp_compute_enable(rdev, false);
for (i = 0; i < 2; i++) {
if (i == 0)
idx = CAYMAN_RING_TYPE_CP1_INDEX;
else
idx = CAYMAN_RING_TYPE_CP2_INDEX;
if (rdev->ring[idx].mqd_obj) {
r = radeon_bo_reserve(rdev->ring[idx].mqd_obj, false);
... | false | false | false | false | false | 0 |
primitive_disable_gc_events() {
if (gc_events) {
growable_array result(this);
std::vector<gc_event>* gc_events = this->gc_events;
this->gc_events = NULL;
std::vector<gc_event>::const_iterator iter = gc_events->begin();
std::vector<gc_event>::const_iterator end = gc_events->end();
for (; ite... | false | false | false | false | false | 0 |
delPrefix(SPtr<TDUID> clntDuid,
unsigned long IAID, SPtr<TIPv6Addr> prefix,
bool quiet) {
Log(Debug) << "PD: Deleting prefix " << prefix->getPlain() << ", DUID=" << clntDuid->getPlain() << ", iaid=" << IAID << LogEnd;
// find this client
SPtr <TAddrClient> ptrClient;
this->firstClient();
... | false | false | false | false | false | 0 |
BufferQueueInit( int ncontrols )
{
Mutex::ScopedLock lock( mDataMutex );
mDataQueues.resize(0);
mDataQueues.reserve(ncontrols);
for (int j = 0; j < ncontrols ;j ++ )
{
mDataQueues.push_back( TQueue() );
}
} | false | false | false | false | false | 0 |
handle_interrupt (pixma_t * s, int timeout)
{
uint8_t buf[64]; /* check max. packet size with 'lsusb -v' for "EP 9 IN" */
int len;
len = pixma_wait_interrupt (s->io, buf, sizeof(buf), timeout);
if (len == PIXMA_ETIMEDOUT)
return 0;
if (len < 0)
return len;
if (len%16) /* len must be ... | false | false | false | false | false | 0 |
nssArena_Create
(
void
)
{
NSSArena *rv = (NSSArena *)NULL;
rv = nss_ZNEW((NSSArena *)NULL, NSSArena);
if( (NSSArena *)NULL == rv ) {
nss_SetError(NSS_ERROR_NO_MEMORY);
return (NSSArena *)NULL;
}
rv->lock = PR_NewLock();
if( (PRLock *)NULL == rv->lock ) {
(void)nss_ZFreeIf(rv);
nss_SetEr... | false | false | false | false | false | 0 |
prefix_length (char *s1, char *s2)
{
register char *start;
int limit = INT_MAX;
for (start = s1; *s1 == *s2 && *s1 != '\0'; s1++, s2++)
{
/* Don't emit a prefix length that will not fit into
* our return type.
*/
if (0 == --limit)
break;
}
return s1 - start;
} | false | false | false | false | false | 0 |
do_setval(Oid relid, int64 next, bool iscalled)
{
SeqTable elm;
Relation seqrel;
Buffer buf;
Form_pg_sequence seq;
/* open and AccessShareLock sequence */
init_sequence(relid, &elm, &seqrel);
if (pg_class_aclcheck(elm->relid, GetUserId(), ACL_UPDATE) != ACLCHECK_OK)
ereport(ERROR,
(errcode(ERRCODE_INSUF... | true | true | false | false | true | 1 |
crm_read_pidfile(const char *filename)
{
int fd;
long pid = -1;
char buf[LOCKSTRLEN + 1];
if ((fd = open(filename, O_RDONLY)) < 0) {
goto bail;
}
if (read(fd, buf, sizeof(buf)) < 1) {
goto bail;
}
if (sscanf(buf, "%lu", &pid) > 0) {
if (pid <= 0) {
... | false | false | false | false | false | 0 |
credssp_get_public_key(rdpCredssp* credssp)
{
int ret;
CryptoCert cert;
cert = tls_get_certificate(credssp->transport->tls);
if (cert == NULL)
{
printf("credssp_get_public_key: tls_get_certificate failed to return the server certificate.\n");
return 0;
}
ret = crypto_cert_get_public_key(cert, &credssp->pu... | false | false | false | false | false | 0 |
commSetTcpNoDelay(int fd)
{
int on = 1;
if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *) &on, sizeof(on)) < 0)
debug(5, 1) ("commSetTcpNoDelay: FD %d: %s\n", fd, xstrerror());
fd_table[fd].flags.nodelay = 1;
} | false | false | false | false | false | 0 |
inserted (int segnum, segment_t* seg, int whichpt)
{
if (whichpt == FIRSTPT)
return seg[seg[segnum].prev].is_inserted;
else
return seg[seg[segnum].next].is_inserted;
} | false | false | false | false | false | 0 |
FICOM_DWORD_INTEGER(bxInstruction_c *i)
{
#if BX_SUPPORT_FPU
BX_CPU_THIS_PTR prepareFPU(i);
int pop_stack = i->nnn() & 1;
RMAddr(i) = BX_CPU_CALL_METHODR(i->ResolveModrm, (i));
Bit32s load_reg = (Bit32s) read_virtual_dword(i->seg(), RMAddr(i));
BX_CPU_THIS_PTR FPU_update_last_instruction(i);
clear_C1();... | false | false | false | false | false | 0 |
gageShapeBoundingBox(double min[3], double max[3],
const gageShape *shape) {
/* static const char me[]="gageShapeBoundingBox"; */
double minIdx[3], maxIdx[3], cornerIdx[8][3], tmp[3];
unsigned int ii;
if (!( min && max && shape )) {
return;
}
if (nrrdCenterNode == shape->center) {
... | false | false | false | false | false | 0 |
m_Remove(Object *in, Object *out)
{
char *old;
int compname = 0;
out[0] = NULL;
if (!_dxfParmCheck(1, in[0], "input", NULL, NULL,
1, in[1], "component name", 0,
NULL, NULL, 0, 1))
return ERROR;
if (_dxfDXEmptyObject(in[0])) {
DXWarning("#4000", "input");
out[... | false | false | false | false | false | 0 |
gen_cond_trap (enum rtx_code code, rtx op1, rtx op2, rtx tcode)
{
enum machine_mode mode = GET_MODE (op1);
enum insn_code icode;
rtx insn;
rtx trap_rtx;
if (mode == VOIDmode)
return 0;
icode = optab_handler (ctrap_optab, mode);
if (icode == CODE_FOR_nothing)
return 0;
/* Some targets only acc... | false | false | false | false | false | 0 |
is_role_dupe(struct role_acl *role, const char *rolename, const u_int16_t type)
{
struct role_acl *tmp;
int id = 0;
int ret;
int i;
if ((type & GR_ROLE_ISID) || ((type & (GR_ROLE_USER | GR_ROLE_GROUP)) && !(type & GR_ROLE_DOMAIN))) {
ret = get_id_from_role_name(rolename, type, &id);
if (ret)
return 0;
}
... | false | false | false | false | false | 0 |
show_zoom_cuts(GtkWidget * window)
{
char buf[180];
GtkWidget *statuslabel, *dialog;
gpointer ret;
struct image_channel *i_channel;
struct map_geometry *geom;
void imadj_dialog_update(GtkWidget *dialog);
statuslabel = gtk_object_get_data(GTK_OBJECT(window), "statuslabel1");
if (statuslabel == NULL)
return;
... | false | false | false | false | false | 0 |
__wrap_puts(char *s, FILE *f)
{
int32 ll;
ll = strlen(s);
if (f == NULL)
{
if (__cur_sofs + ll >= __exprlinelen - 1) __chg_xprline_size(ll + 1);
strcpy(&(__exprline[__cur_sofs]), s);
__cur_sofs += ll;
return;
}
/* case 1: at beginning of line, just need statement indent */
if (__outlinpos ==... | false | false | false | false | false | 0 |
processLoopUses(LoopSplit &split) {
std::set<MachineInstr*> processed;
for (MachineRegisterInfo::reg_iterator
rItr = mri->reg_begin(split.getLI().reg),
rEnd = mri->reg_end();
rItr != rEnd; ++rItr) {
MachineInstr &instr = *rItr;
if (split.getLoop().contains(&instr) && pro... | false | false | false | false | false | 0 |
example_contact_list_dup_groups (TpBaseContactList *contact_list)
{
ExampleContactList *self = EXAMPLE_CONTACT_LIST (contact_list);
GPtrArray *tags = g_ptr_array_sized_new (
g_hash_table_size (self->priv->all_tags) + 1);
GHashTableIter iter;
gpointer tag;
g_hash_table_iter_init (&iter, self->priv->all_... | false | false | false | false | false | 0 |
TransparentListSet (solid_t solid_type)
{
transparent_list_t *p = transparent_list;
while (p != NULL)
{
p->ent->solid = solid_type;
gi.linkentity (p->ent);
p = p->next;
}
} | false | false | false | false | false | 0 |
debug_bankchange (int mode)
{
if (mode == -1) {
int v = deinitialize_memwatch ();
if (v < 0)
return -2;
return v;
}
if (mode >= 0)
initialize_memwatch (mode);
return -1;
} | false | false | false | false | false | 0 |
cb_options(const int isusers, const int wpage)
{
struct dialog_data ddata;
GtkWidget *dlg;
if (isusers && !getselectedusers(1))
return;
dlg = create_dialog(&ddata, wpage, isusers);
if (gtk_dialog_run(GTK_DIALOG(dlg)) == GTK_RESPONSE_OK) {
if (isusers)
extract_ddata_users(&ddata);
else
extract_... | false | false | false | false | false | 0 |
constraint_satisfied_p (rtx op, enum constraint_num c)
{
switch (c)
{
case CONSTRAINT_z: return satisfies_constraint_z (op);
case CONSTRAINT_I: return satisfies_constraint_I (op);
case CONSTRAINT_J: return satisfies_constraint_J (op);
case CONSTRAINT_K: return satisfies_constraint_K (op);
case... | false | false | false | false | false | 0 |
sql_fn_param_ref(ParseState *pstate, ParamRef *pref)
{
SQLFunctionParseInfoPtr pinfo = (SQLFunctionParseInfoPtr) pstate->p_ref_hook_state;
int paramno = pref->number;
Param *param;
/* Check parameter number is valid */
if (paramno <= 0 || paramno > pinfo->nargs)
return NULL; /* unknown parameter number *... | false | false | false | false | false | 0 |
p_reset_callback(GtkWidget *w, GapBlueboxGlobalParams *bbp)
{
gboolean radio_active;
if(bbp)
{
gap_bluebox_init_default_vals(bbp);
if(bbp->thres_r_adj)
{
gtk_adjustment_set_value (GTK_ADJUSTMENT (bbp->thres_r_adj), (gfloat)bbp->vals.thres_r);
}
if(bbp->thres_g_adj)
{
gtk_adju... | false | false | false | false | false | 0 |
invoke(reader_node_t *parent)
{
reader_node_t *prev = NULL, *start_node = NULL, *node;
while(stream_len) {
consume_whitespace();
while(consume_comment())
consume_whitespace();
if(!stream_len)
break;
consume_token();
node = create_node(parent, c... | false | false | false | false | false | 0 |
getCellUVString(BorderCellIndex idx) const
{
String ret = StringConverter::toString(mBorderUV[idx].u1) + " " +
StringConverter::toString(mBorderUV[idx].v1) + " " +
StringConverter::toString(mBorderUV[idx].u2) + " " +
StringConverter::toString(mBord... | false | false | false | false | false | 0 |
psw_begin_file(gx_device_pswrite *pdev, const gs_rect *pbbox)
{
int code;
FILE *f = pdev->file;
char const * const *p1;
char const * const *p2;
if (pdev->pswrite_common.LanguageLevel < 1.5) {
p1 = psw_1_x_procset;
p2 = psw_1_procset;
} else if (pdev->pswrite_common.LanguageLevel... | false | false | false | false | false | 0 |
prefs_actions_key_pressed(GtkWidget *widget, GdkEventKey *event,
gpointer data)
{
if (event && event->keyval == GDK_KEY_Escape)
prefs_actions_cancel(widget, data);
else {
GtkWidget *focused = gtkut_get_focused_child(
GTK_CONTAINER(widget));
if (focused && GTK_IS_EDITABLE(focused))
modified = TRUE;... | false | false | false | false | false | 0 |
gg_dcc_free(struct gg_dcc *d)
{
gg_debug(GG_DEBUG_FUNCTION, "** gg_dcc_free(%p);\n", d);
if (!d)
return;
if (d->fd != -1)
close(d->fd);
free(d->chunk_buf);
free(d);
} | false | false | false | false | false | 0 |
acct_gather_infiniband_init(void)
{
int retval = SLURM_SUCCESS;
char *plugin_type = "acct_gather_infiniband";
char *type = NULL;
if (init_run && g_context)
return retval;
slurm_mutex_lock(&g_context_lock);
if (g_context)
goto done;
type = slurm_get_acct_gather_infiniband_type();
g_context = plugin_cont... | false | false | false | false | false | 0 |
query_to_oid_list(const char *query)
{
int i;
List *list = NIL;
SPI_execute(query, true, 0);
for (i = 0; i < SPI_processed; i++)
{
Datum oid;
bool isnull;
oid = SPI_getbinval(SPI_tuptable->vals[i],
SPI_tuptable->tupdesc,
1,
&isnull);
if (!isnull)
list = lappend_oid(list, D... | false | false | false | false | false | 0 |
qt2160_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct qt2160_data *qt2160;
struct input_dev *input;
int i;
int error;
/* Check functionality */
error = i2c_check_functionality(client->adapter,
I2C_FUNC_SMBUS_BYTE);
if (!error) {
dev_err(&client->dev, "%s adapter not supported\... | false | false | false | false | false | 0 |
df_simulate_fixup_sets (basic_block bb, bitmap live)
{
/* These regs are considered always live so if they end up dying
because of some def, we need to bring the back again. */
if (bb_has_eh_pred (bb))
bitmap_ior_into (live, &df->eh_block_artificial_uses);
else
bitmap_ior_into (live, &df->regular_bl... | false | false | false | false | false | 0 |
hid_retry_timeout(unsigned long _hid)
{
struct hid_device *hid = (struct hid_device *) _hid;
struct usbhid_device *usbhid = hid->driver_data;
dev_dbg(&usbhid->intf->dev, "retrying intr urb\n");
if (hid_start_in(hid))
hid_io_error(hid);
} | false | false | false | false | false | 0 |
pk_plugin_sqlite_add_filename (PkPlugin *plugin,
const gchar *filename,
const gchar *md5_opt)
{
gchar *md5 = NULL;
gint rc = -1;
PkPackage *package;
GError *error = NULL;
/* if we've got it, use old data */
if (md5_opt != NULL)
md5 = g_strdup (md5_opt);
else
md5 = pk_plugin_get_filename_... | false | false | false | false | false | 0 |
cgi_multiple(const char *arg, const char *sep)
{
struct cgi_arglist *argp;
size_t l=1;
char *buf;
for (argp=cgi_arglist; argp; argp=argp->next)
if (strcmp(argp->argname, arg) == 0)
l += strlen(argp->argvalue)+strlen(sep);
buf=malloc(l);
if (!buf) return(0);
*buf=0;
/*
** Because the cgi list is build from... | false | false | false | false | false | 0 |
acpi_db_dump_namespace(char *start_arg, char *depth_arg)
{
acpi_handle subtree_entry = acpi_gbl_root_node;
u32 max_depth = ACPI_UINT32_MAX;
/* No argument given, just start at the root and dump entire namespace */
if (start_arg) {
subtree_entry = acpi_db_convert_to_node(start_arg);
if (!subtree_entry) {
re... | false | false | false | false | false | 0 |
main(int argc, char *argv[])
{
prog_mode_t mode;
u_int ret = 1;
progname = argv[0];
mode = parse_args(argc, argv);
switch(mode) {
case mode_version:
printf("arm-fdisk v"VERSION"\n");
break;
case mode_help:
printf("Usage: %s [OPTION] [DEVICE]...\n", progname);
printf("Display or edit partition tables o... | true | true | false | false | true | 1 |
rtl28xxu_tuner_detach(struct dvb_usb_adapter *adap)
{
struct dvb_usb_device *d = adap_to_d(adap);
struct rtl28xxu_dev *dev = d_to_priv(d);
struct i2c_client *client;
struct platform_device *pdev;
dev_dbg(&d->intf->dev, "\n");
/* remove platform SDR */
pdev = dev->platform_device_sdr;
if (pdev)
platform_devi... | false | false | false | false | false | 0 |
gt_reads2twobit_encode_unpaired_fasta_library(
GtReads2TwobitEncodeState *state, GtReadsLibraryInfo *rli, FILE *file,
char *line)
{
char *fgetsretval = NULL;
do {
if (line[0] == '>')
{
if (state->current.nofseqs > rli->first_seqnum && !state->invalid_mode)
{
gt_reads2twobit_proce... | false | false | false | false | false | 0 |
g_daemon_vfs_local_file_removed (GVfs *vfs,
const char *filename)
{
MetaLookupCache *cache;
const char *metatreefile;
MetaTree *tree;
char *tree_path;
GVfsMetadata *proxy;
cache = meta_lookup_cache_new ();
tree = meta_lookup_cache_lookup_path (cache,
filename,
0,
FALSE,
&tr... | false | false | false | false | false | 0 |
i915_gem_execbuffer_relocate_vma(struct i915_vma *vma,
struct eb_vmas *eb)
{
#define N_RELOC(x) ((x) / sizeof(struct drm_i915_gem_relocation_entry))
struct drm_i915_gem_relocation_entry stack_reloc[N_RELOC(512)];
struct drm_i915_gem_relocation_entry __user *user_relocs;
struct drm_i915_gem_exec_object2 *entry =... | false | false | false | false | false | 0 |
panTilt_i(double pdeg, double tdeg)
{
if (pdeg > getMaxPosPan_i())
myPanDesired = getMaxPosPan_i();
else if (pdeg < getMaxNegPan_i())
myPanDesired = getMaxNegPan_i();
else
myPanDesired = pdeg;
if (tdeg > getMaxPosTilt_i())
myTiltDesired = getMaxPosTilt_i();
else if (tdeg < getMaxNegTilt_i())
... | false | false | false | false | false | 0 |
UpdateFrame(boolean txtupdate) {
FrameIdrawView *views = (FrameIdrawView*)GetViewer()->GetGraphicView();
views->UpdateFrame(_currframe, _prevframe,
_curr_others, _num_curr_others,
_prev_others, _num_prev_others);
delete _prev_others;
_num_prev_others = _num_curr_others;
_prev_oth... | false | false | false | false | false | 0 |
_variable_list_index(GList *variables, GncSxVariable *variable)
{
gint index = 0;
for (; variables != NULL; variables = variables->next)
{
GncSxVariable *var = (GncSxVariable*)variables->data;
if (!var->editable)
continue;
if (variable == var)
return index;
... | false | false | false | false | false | 0 |
tagNumber(const std::string& tagName, IfdId ifdId)
{
const TagInfo* ti = tagInfo(tagName, ifdId);
if (ti != 0 && ti->tag_ != 0xffff) return ti->tag_;
if (!isHex(tagName, 4, "0x")) throw Error(7, tagName, ifdId);
std::istringstream is(tagName);
uint16_t tag;
is >> std:... | false | false | false | false | false | 0 |
space(int cnt)
{
#define SPACES 40
static char spacebuf[SPACES+1] = { 0 };
int i;
char *bigspace;
if (cnt > SPACES) {
bigspace = GETBUF(cnt);
for (i = 0; i < cnt; i++)
bigspace[i] = ' ';
bigspace[i] = NULLCHAR;
return bigspace;
}
if (!strlen(spacebuf)) {
for (i = 0; i < SPACES; i++)
spacebuf[i] ... | true | true | false | false | false | 1 |
Parse()
{
if (check_for_string("#") && !check_for_string("#End")) {
char buf[NAME_LENGTH];
//Find the name of the thing we're parsing
parse_advance(1);
stuff_string(buf, F_NAME, sizeof(buf));
Name = buf;
//Parse all objects for this screen
ObjectClassInfoEntry temp_ocie;
while (temp_ocie.Parse()) {
... | false | false | false | false | false | 0 |
adv7842_log_status(struct v4l2_subdev *sd)
{
struct adv7842_state *state = to_state(sd);
if (state->mode == ADV7842_MODE_SDP)
return adv7842_sdp_log_status(sd);
return adv7842_cp_log_status(sd);
} | false | false | false | false | false | 0 |
ibus_prop_list_destroy (IBusPropList *prop_list)
{
IBusProperty **p;
gint i;
p = (IBusProperty **) g_array_free (prop_list->properties, FALSE);
for (i = 0; p[i] != NULL; i++) {
g_object_unref (p[i]);
}
g_free (p);
IBUS_OBJECT_CLASS (ibus_prop_list_parent_class)->destroy ((IBusObje... | false | false | false | false | false | 0 |
GDrawDrawBiText8(GWindow gw, int32 x, int32 y,
const char *text, int32 cnt, FontMods *mods, Color col) {
int ret;
struct tf_arg arg;
#ifndef _NO_LIBPANGO
if ( gw->usepango )
return( _GXPDraw_DoText8(gw,x,y,text,cnt,mods,col,tf_drawit,&arg));
else
#endif
if (( ret = GDrawIsAllLeftToRight8(text,cnt)... | false | false | false | false | false | 0 |
connman_technology_finalize(void)
{
if (tech_if == NULL)
return;
__connman_manager_register_technology_signals(NULL, NULL);
dbus_connection_unref(tech_if->dbus_cnx);
g_hash_table_destroy(tech_if->techs);
g_free(tech_if);
tech_if = NULL;
} | false | false | false | false | false | 0 |
gconf_clear_cache(GConfEngine* conf, GError** err)
{
g_return_if_fail(conf != NULL);
g_return_if_fail(err == NULL || *err == NULL);
/* don't disallow non-owner use here since you can't do this
* via GConfClient API and calling this function won't break
* GConfClient anyway
*/
if (gconf_engine_is_lo... | false | false | false | false | false | 0 |
__fscache_disable_cookie(struct fscache_cookie *cookie, bool invalidate)
{
struct fscache_object *object;
bool awaken = false;
_enter("%p,%u", cookie, invalidate);
ASSERTCMP(atomic_read(&cookie->n_active), >, 0);
if (atomic_read(&cookie->n_children) != 0) {
pr_err("Cookie '%s' still has children\n",
... | false | false | false | false | false | 0 |
str_search(JSContext *cx, uintN argc, jsval *vp)
{
JSString *str;
NORMALIZE_THIS(cx, vp, str);
RegExpGuard g(cx);
if (!g.init(argc, vp))
return false;
if (g.tryFlatMatch(str, false, 1, argc)) {
*vp = INT_TO_JSVAL(g.match);
return true;
}
if (!g.normalizeRegExp(false,... | false | false | false | false | false | 0 |
hist_each(VALUE self)
{
HIST_ENTRY *entry;
int i;
RETURN_ENUMERATOR(self, 0, 0);
rb_secure(4);
for (i = 0; i < history_length; i++) {
entry = history_get(history_get_offset_func(i));
if (entry == NULL)
break;
rb_yield(rb_locale_str_new_cstr(entry->line));
}
ret... | 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.