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 |
|---|---|---|---|---|---|---|
_narrow(CORBA::Object_ptr obj)
{
if( CORBA::is_nil(obj) || !obj->_NP_is_pseudo() ) return _nil();
Current_ptr p = (Current_ptr) obj->_ptrToObjRef(_PD_repoId);
if( p ) p->_NP_incrRefCount();
return p ? p : _nil();
} | false | false | false | false | false | 0 |
ExecuteSQL( const char *pszSQLCommand,
OGRGeometry *poSpatialFilter,
const char *pszDialect )
{
/* -------------------------------------------------------------------- */
/* Use generic imlplementation for OGRSQL dialect. ... | false | false | false | false | false | 0 |
_ufc_mk_keytab_r(key, __data)
const char *key;
struct crypt_data * __restrict __data;
{
ufc_long v1, v2, *k1;
int i;
#ifdef _UFC_32_
long32 v, *k2;
k2 = (long32*)__data->keysched;
#endif
#ifdef _UFC_64_
long64 v, *k2;
k2 = (long64*)__data->keysched;
#endif
v1 = v2 = 0; k1 = &do_pc1[0][0][0];
... | false | false | false | false | false | 0 |
edac_device_remove_sysfs(struct edac_device_ctl_info *edac_dev)
{
edac_dbg(0, "\n");
/* remove any main attributes for this device */
edac_device_remove_main_sysfs_attributes(edac_dev);
/* remove the device sym link */
sysfs_remove_link(&edac_dev->kobj, EDAC_DEVICE_SYMLINK);
/* walk the instance/block kobject ... | false | false | false | false | false | 0 |
win_init(newp, oldp, flags)
win_T *newp;
win_T *oldp;
int flags UNUSED;
{
int i;
newp->w_buffer = oldp->w_buffer;
#ifdef FEAT_SYN_HL
newp->w_s = &(oldp->w_buffer->b_s);
#endif
oldp->w_buffer->b_nwindows++;
newp->w_cursor = oldp->w_cursor;
newp->w_valid = 0;
newp->w_curswant =... | false | false | false | false | false | 0 |
event_join(IRC_SERVER_REC *server, const char *data, const char *nick, const char *address)
{
char *params, *channel, *tmp, *shortchan;
IRC_CHANNEL_REC *chanrec;
g_return_if_fail(data != NULL);
if (g_strcasecmp(nick, server->nick) != 0) {
/* someone else joined channel, no need to do anything */
return;
}
... | false | false | false | false | false | 0 |
asym_add(struct asym_name **lst, char const *name) {
struct asym_name *asn;
for (asn = *lst; asn != NULL; asn = asn->next)
if (strcmp(asn->name, name) == 0)
return 1;
if ((asn = (struct asym_name *) malloc(sizeof(struct asym_name))) == NULL)
return -1;
asn->name = strdup(name);
asn->next = *lst;
*lst = as... | false | false | false | false | false | 0 |
store_pid(const char *path)
{
FILE *f = fopen(path, "w");
if (!f)
die("cannot open pid file %s: %s", path, strerror(errno));
if (fprintf(f, "%"PRIuMAX"\n", (uintmax_t) getpid()) < 0 || fclose(f) != 0)
die("failed to write pid file %s: %s", path, strerror(errno));
} | false | false | false | false | true | 1 |
do_whole_lib_group(Workqueue* workqueue)
{
const Input_file_lib* lib_group = this->input_argument_->lib();
++Lib_group::total_lib_groups;
Task_token* this_blocker = this->this_blocker_;
for (Input_file_lib::const_iterator i = lib_group->begin();
i != lib_group->end();
++i)
{
++Lib_grou... | false | false | false | false | false | 0 |
decodeCachedValue(unsigned int &value,
unsigned int numBits,
IntCache &cache,
unsigned int blockSize,
int endOkay)
{
unsigned int index;
DBG("decodeIntCac... | false | false | false | false | false | 0 |
cstr2ctypes(unsigned char *tables, const unsigned char *cstr,
unsigned char bit) {
unsigned char *ctypes_table=tables+ctypes_offset;
ctypes_table[0]=bit;
for(; *cstr; cstr++) {
unsigned char c=*cstr;
ctypes_table[c]|=bit;
}
} | false | false | false | false | false | 0 |
nouveau_connector_ddc_detect(struct drm_connector *connector)
{
struct drm_device *dev = connector->dev;
struct nouveau_connector *nv_connector = nouveau_connector(connector);
struct nouveau_drm *drm = nouveau_drm(dev);
struct nvkm_gpio *gpio = nvxx_gpio(&drm->device);
struct nouveau_encoder *nv_encoder;
struct d... | false | false | false | false | false | 0 |
get_resource_id_quoted (WinResource *wr)
{
static char tmp[WINRES_ID_MAXLEN+2];
if (wr->numeric_id || wr->id[0] == '\0')
return wr->id;
sprintf(tmp, "'%s'", wr->id);
return tmp;
} | false | false | false | false | false | 0 |
__pyx_f_9lightning_4impl_8sgd_fast_22MulticlassLossFunction_update(CYTHON_UNUSED struct __pyx_obj_9lightning_4impl_8sgd_fast_MulticlassLossFunction *__pyx_v_self, CYTHON_UNUSED double *__pyx_v_scores, CYTHON_UNUSED int __pyx_v_y, CYTHON_UNUSED double *__pyx_v_data, CYTHON_UNUSED int *__pyx_v_indices, CYTHON_UNUSED int ... | false | false | false | false | false | 0 |
APar_EvalFrame_for_Field(int frametype, int fieldtype) {
uint8_t frametype_idx = GetFrameCompositionDescription(frametype);
for (uint8_t fld_i = 0; fld_i < FrameTypeConstructionList[frametype_idx].ID3_FieldCount; fld_i++) {
if (FrameTypeConstructionList[frametype_idx].ID3_FieldComponents[fld_i] == fieldtype) {
... | false | false | false | false | false | 0 |
xen_vcpuop_set_next_event(unsigned long delta,
struct clock_event_device *evt)
{
int cpu = smp_processor_id();
struct vcpu_set_singleshot_timer single;
int ret;
WARN_ON(!clockevent_state_oneshot(evt));
single.timeout_abs_ns = get_abs_timeout(delta);
/* Get an event anyway, even if the timeout is alread... | true | true | false | false | false | 1 |
logger_entry_match(logger_entry_t *this, char *target, bool *file)
{
return this->file == *file && streq(this->target, target);
} | false | false | false | false | false | 0 |
constructor (GType type,
guint n_construct_params,
GObjectConstructParam *construct_params)
{
GObject *object;
NMModemPrivate *priv;
nm_log_dbg (LOGD_MB, "in %s", __func__);
object = G_OBJECT_CLASS (nm_modem_parent_class)->constructor (type,
n... | false | false | false | false | false | 0 |
add_dir (const char *line)
{
unsigned int i;
struct dir_entry *entry = xmalloc (sizeof (struct dir_entry));
entry->next = NULL;
/* Search for an '=' sign. */
entry->path = xstrdup (line);
char *equal_sign = strchr (entry->path, '=');
if (equal_sign)
{
*equal_sign = '\0';
++equal_sign;
... | false | false | false | false | true | 1 |
call_memory_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
return (GET_CODE (op) == MEM) && ((
#line 186 "../../src/gcc/config/arm/predicates.md"
(GET_RTX_CLASS (GET_CODE (XEXP (op, 0)))
!= RTX_AUTOINC)) && (memory_operand (op, mode)));
} | false | false | false | false | false | 0 |
EXEC_public_desc(CLASS *class, void *object, CLASS_DESC_METHOD *desc, int nparam)
{
EXEC.object = object;
EXEC.nparam = nparam; /*desc->npmin;*/
if (FUNCTION_is_native(desc))
{
EXEC.class = class; // EXEC_native() does not need the real class, except the GB.GetClass(NULL) API used by Form.Main.
EXEC.nati... | false | false | false | false | false | 0 |
ath5k_drain_tx_buffs(struct ath5k_hw *ah)
{
struct ath5k_txq *txq;
struct ath5k_buf *bf, *bf0;
int i;
for (i = 0; i < ARRAY_SIZE(ah->txqs); i++) {
if (ah->txqs[i].setup) {
txq = &ah->txqs[i];
spin_lock_bh(&txq->lock);
list_for_each_entry_safe(bf, bf0, &txq->q, list) {
ath5k_debug_printtxbuf(ah, bf);... | false | false | false | false | false | 0 |
totem_playlist_set_at_end (TotemPlaylist *playlist)
{
int indice;
g_return_if_fail (TOTEM_IS_PLAYLIST (playlist));
totem_playlist_unset_playing (playlist);
if (playlist->priv->current != NULL)
{
gtk_tree_path_free (playlist->priv->current);
playlist->priv->current = NULL;
}
if (PL_LEN)
{
if (playlist-... | false | false | false | false | false | 0 |
main(int argc, char **argv)
{
ESL_GETOPTS *go = p7_CreateDefaultApp(options, 0, argc, argv, banner, usage);
ESL_RANDOMNESS *r = esl_randomness_CreateFast(esl_opt_GetInteger(go, "-s"));
ESL_ALPHABET *abc = NULL;
P7_BG *bg = NULL;
int M = esl_opt_GetInteger(go, "-M");
int ... | true | true | false | false | false | 1 |
main_loop( const bool loose )
{
extern jmp_buf jmp_state;
const char * ibufp; /* pointer to command buffer */
volatile int err_status = 0; /* program exit status */
volatile int linenum = 0; /* script line number */
int len, status;
disable_interrupts();
set_signals();
status = setjmp( jmp_state ... | false | false | false | false | false | 0 |
ctl_zdef(FILE *gdp, int vlistID, int *zrev)
{
int i, j, index;
int zaxisIDmax = -1, nlevmax;
int nzaxis, zaxisID, nlev;
int lplev = FALSE;
double *levels, level0, levinc = 0;
*zrev = FALSE;
nzaxis = vlistNzaxis(vlistID);
nlevmax = 0;
for ( index = 0; index < nzaxis; index++ )
{
zaxisID = ... | false | false | false | false | false | 0 |
check_rec(Node *n, int level,
void (*checker)(Leaf*, ScmObj), ScmObj obj)
{
int direct_leaves = 0, total_leaves = 0, i, off;
for (i=0, off=0; i<MAX_NODE_SIZE; i++) {
if (NODE_HAS_ARC(n, i)) {
if (NODE_ARC_IS_LEAF(n, i)) {
direct_leaves++;
... | false | false | false | false | true | 1 |
unity_webapps_application_repository_install_application (UnityWebappsApplicationRepository *repository, const gchar *name,
UnityWebappsApplicationRepositoryInstallCallback callback, gpointer user_data)
{
webapp_repository_install_data *data;
UnityWebappsAvailableApplication *app;
app = g_hash_table_l... | false | false | false | false | false | 0 |
prune_link_array(void) {
void **p,**pe,**n,**ne;
if (sLAlink_arrayA->s.s_dbind==Cnil)
return;
ne=n=p=(void *)sLAlink_arrayA->s.s_dbind->v.v_self;
pe=(void *)p+sLAlink_arrayA->s.s_dbind->v.v_fillp;
while (p<pe) {
if (*p) {
*ne++=*p++;
*ne++=*p++;
} else
p+=2;
}
sLAlink_ar... | false | false | false | false | false | 0 |
ParseIT8(cmsIT8* it8, cmsBool nosheet)
{
char* SheetTypePtr = it8 ->Tab[0].SheetType;
if (nosheet == 0) {
ReadType(it8, SheetTypePtr);
}
InSymbol(it8);
SkipEOLN(it8);
while (it8-> sy != SEOF &&
it8-> sy != SSYNERROR) {
switch (it8 -> sy) {
case SB... | false | false | false | false | false | 0 |
f_dupfd(unsigned int from, struct file *file, unsigned flags)
{
int err;
if (from >= rlimit(RLIMIT_NOFILE))
return -EINVAL;
err = alloc_fd(from, flags);
if (err >= 0) {
get_file(file);
fd_install(err, file);
}
return err;
} | false | false | false | false | false | 0 |
message_parse_rfc822space(s)
char **s;
{
char *p = *s;
int commentlevel = 0;
if (!p) return;
while (*p && (Uisspace(*p) || *p == '(')) {
if (*p == '\n') {
p++;
if (*p != ' ' && *p != '\t') {
*s = 0;
return;
}
}
else if (*p == '(') {
p++;
commentlevel++;
while (comme... | false | false | false | false | false | 0 |
pass_msg (void)
{
return strdup("Passed");
} | false | false | false | false | false | 0 |
slapi_attr_value_cmp( const Slapi_Attr *a, const struct berval *v1, const struct berval *v2 )
{
Slapi_Attr a2 = *a;
struct ava ava;
Slapi_Value *cvals[2];
Slapi_Value tmpcval;
if ( a->a_flags == 0 && a->a_plugin == NULL ) {
slapi_attr_init_syntax ((Slapi_Attr *)a);
}
cvals[0] = &tmp... | false | false | false | false | false | 0 |
do_local_reply(xmlNode * notify_src, const char *client_id, gboolean sync_reply, gboolean from_peer)
{
/* send callback to originating child */
crm_client_t *client_obj = NULL;
int local_rc = pcmk_ok;
crm_trace("Sending response");
client_obj = crm_client_get_by_id(client_id);
crm_trace("Sendi... | false | false | false | false | false | 0 |
qib_7220_set_loopback(struct qib_pportdata *ppd, const char *what)
{
int ret = 0;
u64 val, ddr;
if (!strncmp(what, "ibc", 3)) {
ppd->cpspec->ibcctrl |= SYM_MASK(IBCCtrl, Loopback);
val = 0; /* disable heart beat, so link will come up */
qib_devinfo(ppd->dd->pcidev, "Enabling IB%u:%u IBC loopback\n",
ppd->... | false | false | false | false | false | 0 |
DVDDiscID( dvd_reader_t *dvd, unsigned char *discid )
{
struct md5_ctx ctx;
int title;
int nr_of_files = 0;
/* Check arguments. */
if( dvd == NULL || discid == NULL )
return 0;
/* Go through the first 10 IFO:s, in order,
* and md5sum them, i.e VIDEO_TS.IFO and VTS_0?_0.IFO */
md5_init_ctx( &ctx ... | false | false | false | false | false | 0 |
cpia2_s_ctrl(struct v4l2_ctrl *ctrl)
{
struct camera_data *cam =
container_of(ctrl->handler, struct camera_data, hdl);
static const int flicker_table[] = {
NEVER_FLICKER,
FLICKER_50,
FLICKER_60,
};
DBG("Set control id:%d, value:%d\n", ctrl->id, ctrl->val);
switch (ctrl->id) {
case V4L2_CID_BRIGHTNESS:
... | false | false | false | false | false | 0 |
archive_read_support_format_7zip(struct archive *_a)
{
struct archive_read *a = (struct archive_read *)_a;
struct _7zip *zip;
int r;
archive_check_magic(_a, ARCHIVE_READ_MAGIC,
ARCHIVE_STATE_NEW, "archive_read_support_format_7zip");
zip = calloc(1, sizeof(*zip));
if (zip == NULL) {
archive_set_error(&a->... | false | false | false | false | false | 0 |
CuSuiteDetails(CuSuite* testSuite, CuString* details)
{
int i;
int failCount = 0;
if (testSuite->failCount == 0)
{
int passCount = testSuite->count - testSuite->failCount;
const char* testWord = passCount == 1 ? "test" : "tests";
CuStringAppendFormat(details, "OK (%d %s)\n", passCount, testWord);
}
else
{... | false | false | false | false | false | 0 |
search_group(GBT_TREE *node,GB_HASH *hash, long *groupcnt,char *groupname, DI_ENTRY **groups){
if (node->is_leaf) {
if (!node->name) return 0;
DI_ENTRY *phentry = (DI_ENTRY *)GBS_read_hash(hash,node->name);
if (!phentry) { // Species is not a member of tree
return 0;
... | false | false | false | false | false | 0 |
orte_rml_base_recv(int status, orte_process_name_t* sender,
opal_buffer_t* buffer, orte_rml_tag_t tag,
void* cbdata)
{
orte_rml_cmd_flag_t command;
orte_std_cntr_t count;
opal_buffer_t *buf;
int rc;
OPAL_OUTPUT_VERBOSE((5, orte_rml_base_framework.framework... | false | false | false | false | false | 0 |
quota_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *preparent,
struct iatt *postparent, dict_t *xdata)
{
quota_local_t *local = NULL;
quota_inode_ctx_t *ctx = NULL;
uint64_t value ... | false | false | false | false | false | 0 |
drawImage(ElementImpl* image, float dx, float dy, int& exceptionCode)
{
exceptionCode = 0;
bool unsafe;
QImage img = extractImage(image, exceptionCode, unsafe);
if (unsafe)
canvas()->markUnsafe();
if (exceptionCode)
return;
QPainter* p = acquirePainter();
drawImage(p, QRectF... | false | false | false | false | false | 0 |
applix_sheetref_parse (char const *start, Sheet **sheet, Workbook const *wb)
{
char const *end, *begin;
char *name;
begin = end = (*start == '$') ? start + 1 : start;
while (*end && g_ascii_isalnum (*end))
end++;
if (*end != ':') {
*sheet = NULL;
return start;
}
name = g_alloca (1 + end - begin);
strnc... | false | false | false | false | false | 0 |
static_type (GtkWidget *widget, void *data)
{
gamgi_window *window = GAMGI_CAST_WINDOW data;
GtkWidget *dialog = window->dialog0;
GtkWidget *vbox_scope, *vbox_view;
GtkWidget *button;
GtkWidget *label;
GtkWidget *entry;
/************
* get data *
************/
vbox_scope = (GtkWidget *) g_object_get_data (G_OBJECT ... | false | false | false | false | false | 0 |
gifti_convert_to_float(gifti_image * gim)
{
giiDataArray * da;
void * olddata;
int oldtype, newtype = NIFTI_TYPE_FLOAT32; /* for future? */
int c, nbyper, oldnbyper;
if( !gim ) return 1;
if( !gim->darray || gim->numDA <= 0 ) {
if( G.verb > 1 ) fprintf(stde... | false | false | false | false | false | 0 |
cx_list_reverse(cx_list *list)
{
cx_assert(list != NULL);
/*
* Nothing to be done if the list has length 0 or 1
*/
if (list->head.next != &list->head &&
list->head.next->next != &list->head) {
cx_lnode *first = _cx_list_begin(list);
first = _cx_list_next(list, first);... | false | false | false | false | false | 0 |
setLinkDestination( Link *link )
{
Q_D( LinkAnnotation );
delete d->linkDestination;
d->linkDestination = link;
} | false | false | false | false | false | 0 |
get_current_times (GstRtpBin * bin, GstClockTime * running_time,
guint64 * ntpnstime)
{
guint64 ntpns;
GstClock *clock;
GstClockTime base_time, rt, clock_time;
GST_OBJECT_LOCK (bin);
if ((clock = GST_ELEMENT_CLOCK (bin))) {
base_time = GST_ELEMENT_CAST (bin)->base_time;
gst_object_ref (clock);
... | false | false | false | false | false | 0 |
hwloc_parse_node_distance(const char *distancepath, unsigned nbnodes, float *distances, int fsroot_fd)
{
char string[4096]; /* enough for hundreds of nodes */
char *tmp, *next;
FILE * fd;
fd = hwloc_fopen(distancepath, "r", fsroot_fd);
if (!fd)
return;
if (!fgets(string, sizeof(string), fd)) {
fcl... | false | false | false | false | false | 0 |
FillCommandLineFlagInfo(
CommandLineFlagInfo* result) {
result->name = name();
result->type = type_name();
result->description = help();
result->current_value = current_value();
result->default_value = default_value();
result->filename = CleanFileName();
UpdateModifiedBit();
result->is_default = !mo... | false | false | false | false | false | 0 |
GetScriptCommandObject(const ObjectGuid guid, bool includeItem, Object*& resultObject)
{
resultObject = NULL;
if (!guid)
return true;
switch (guid.GetHigh())
{
case HIGHGUID_UNIT:
case HIGHGUID_VEHICLE:
resultObject = m_map->GetCreature(guid);
break;
... | false | false | false | false | false | 0 |
bnxt_free_ring(struct bnxt *bp, struct bnxt_ring_struct *ring)
{
struct pci_dev *pdev = bp->pdev;
int i;
for (i = 0; i < ring->nr_pages; i++) {
if (!ring->pg_arr[i])
continue;
dma_free_coherent(&pdev->dev, ring->page_size,
ring->pg_arr[i], ring->dma_arr[i]);
ring->pg_arr[i] = NULL;
}
if (ring->pg... | false | false | false | false | false | 0 |
gedit_tab_label_constructed (GObject *object)
{
GeditTabLabel *tab_label = GEDIT_TAB_LABEL (object);
if (!tab_label->priv->tab)
{
g_critical ("The tab label was not properly constructed");
return;
}
sync_name (tab_label->priv->tab, NULL, tab_label);
sync_state (tab_label->priv->tab, NULL, tab_label);
g_si... | false | false | false | false | false | 0 |
issamearch(ap1, ap2)
CONST archive_t *ap1, *ap2;
{
if (!(ap1 -> p_comm)) {
if (ap2 -> p_comm) return(0);
}
else if (!(ap2 -> p_comm)) return(0);
else if (strcommcmp(ap1 -> p_comm, ap2 -> p_comm)) return(0);
if (strcommcmp(ap1 -> u_comm, ap2 -> u_comm)) return(0);
return(1);
} | false | false | false | false | false | 0 |
amd_ntb_init_pci(struct amd_ntb_dev *ndev,
struct pci_dev *pdev)
{
int rc;
pci_set_drvdata(pdev, ndev);
rc = pci_enable_device(pdev);
if (rc)
goto err_pci_enable;
rc = pci_request_regions(pdev, NTB_NAME);
if (rc)
goto err_pci_regions;
pci_set_master(pdev);
rc = pci_set_dma_mask(pdev, DMA_BIT_MAS... | false | false | false | false | false | 0 |
rsa_private_key_import(hx509_context context,
const AlgorithmIdentifier *keyai,
const void *data,
size_t len,
hx509_key_format_t format,
hx509_private_key private_key)
{
switch (format) {
case HX509_KEY_FORMAT_DER: {
const unsigned char *p = data;
private_key->pri... | false | false | false | false | false | 0 |
saa7164_cmd_dequeue(struct saa7164_dev *dev)
{
int loop = 1;
int ret;
u32 timeout;
wait_queue_head_t *q = NULL;
u8 tmp[512];
dprintk(DBGLVL_CMD, "%s()\n", __func__);
while (loop) {
struct tmComResInfo tRsp = { 0, 0, 0, 0, 0, 0 };
ret = saa7164_bus_get(dev, &tRsp, NULL, 1);
if (ret == SAA_ERR_EMPTY)
re... | false | false | false | false | false | 0 |
visorchipset_file_init(dev_t major_dev, struct visorchannel **controlvm_channel)
{
int rc = 0;
file_controlvm_channel = controlvm_channel;
cdev_init(&file_cdev, &visorchipset_fops);
file_cdev.owner = THIS_MODULE;
if (MAJOR(major_dev) == 0) {
rc = alloc_chrdev_region(&major_dev, 0, 1, "visorchipset");
/* dynam... | false | false | false | false | false | 0 |
__save_stack_address(void *data, unsigned long addr, bool reliable, bool nosched)
{
struct stack_trace *trace = data;
#ifdef CONFIG_FRAME_POINTER
if (!reliable)
return;
#endif
if (nosched && in_sched_functions(addr))
return;
if (trace->skip > 0) {
trace->skip--;
return;
}
if (trace->nr_entries < trace->ma... | false | false | false | false | false | 0 |
G3d_maskTile(G3D_Map * map, int tileIndex, void *tile, int type)
{
int nofNum, rows, cols, depths, xRedundant, yRedundant, zRedundant;
int x, y, z, xLength, yLength, dx, dy, dz, length;
if (!G3d_maskMapExistsVar)
return;
nofNum = G3d_computeClippedTileDimensions(map, tileIndex,
&rows, &col... | false | false | false | false | false | 0 |
apply_r2hc(const plan *ego_, R *r0, R *r1, R *cr, R *ci)
{
const P *ego = (const P *) ego_;
plan_rdft *cld = (plan_rdft *) ego->cld;
INT i, j, vl = ego->vl, nbuf = ego->nbuf, bufdist = ego->bufdist;
INT n = ego->n;
INT ivs = ego->ivs, ovs = ego->ovs, os = ego->cs;
R *bufs = (R *)MALLOC(siz... | false | false | false | false | false | 0 |
restart_main_window()
{
LOG(LOG_DEBUG, "IN : restart_main_window()");
calculate_font_size();
create_text_buffer();
gtk_text_view_set_buffer(GTK_TEXT_VIEW(main_view), text_buffer);
#if 0
// Save current size and position
gdk_window_get_root_origin(main_window->window, &window_x, &window_y);
window_width = mai... | false | false | false | false | false | 0 |
next_row(EW * ewptr, EW * boundary, /* row boundary of map in search direction */
SHORT * new, SHORT south /* search proceeds southward if == 1 */
)
{
if (ewptr->next)
if (ewptr->next == ewptr) /* signals end of this search */
return (NULL);
else
return (ewptr->next);
else if (ewptr != bou... | false | false | false | false | false | 0 |
mpi_send_packet (struct net_device *dev)
{
struct sk_buff *skb;
unsigned char *buffer;
s16 len;
__le16 *payloadLen;
struct airo_info *ai = dev->ml_priv;
u8 *sendbuf;
/* get a packet to send */
if ((skb = skb_dequeue(&ai->txq)) == NULL) {
airo_print_err(dev->name,
"%s: Dequeue'd zero in send_packet()",
... | false | true | false | false | false | 1 |
MkInt(i) /* Push an Int onto the stack */
Int i;
{
#ifndef NO_DYNAMIC_TYPES
Cell d = getTypeableDict(typeInt);
protect(push(ap(ap(nameToDyn,d),mkInt(i))));
#else
protect(push(mkInt(i)));
#endif
} | false | false | false | false | false | 0 |
unload() {
if(textureid!=0) glDeleteTextures(1, &textureid);
textureid=0;
} | false | false | false | false | false | 0 |
amdgpu_ttm_gtt_read(struct file *f, char __user *buf,
size_t size, loff_t *pos)
{
struct amdgpu_device *adev = f->f_inode->i_private;
ssize_t result = 0;
int r;
while (size) {
loff_t p = *pos / PAGE_SIZE;
unsigned off = *pos & ~PAGE_MASK;
size_t cur_size = min_t(size_t, size, PAGE_SIZE - off);
struc... | false | false | false | false | false | 0 |
netsnmp_cache_timer_start(netsnmp_cache *cache)
{
if(NULL == cache)
return 0;
DEBUGMSGTL(( "cache_timer:start", "OID: "));
DEBUGMSGOID(("cache_timer:start", cache->rootoid, cache->rootoid_len));
DEBUGMSG(( "cache_timer:start", "\n"));
if(0 != cache->timer_id) {
snmp_log(LOG_WARNI... | false | false | false | false | false | 0 |
sendPacket(int playerid, NetPacket *pkt)
{
if ( (playerid < JNB_MAX_PLAYERS) && (playerid >= 0)) {
if ((player[playerid].enabled) && (playerid != client_player_num)) {
sendPacketToSock(net_info[playerid].sock, pkt);
}
}
} | false | false | false | false | false | 0 |
gs_fpgaboot(void)
{
int err;
struct fpgaimage *fimage;
fimage = kmalloc(sizeof(struct fpgaimage), GFP_KERNEL);
if (!fimage)
return -ENOMEM;
err = gs_load_image(fimage, file);
if (err) {
pr_err("gs_load_image error\n");
goto err_out1;
}
err = gs_read_image(fimage);
if (err) {
pr_err("gs_read_image er... | false | false | false | false | false | 0 |
gst_asf_payload_queue_for_stream (GstASFDemux * demux, AsfPayload * payload,
AsfStream * stream)
{
GST_DEBUG_OBJECT (demux, "Got payload for stream %d ts:%" GST_TIME_FORMAT,
stream->id, GST_TIME_ARGS (payload->ts));
/* remember the first timestamp in the stream */
if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALI... | false | false | false | false | false | 0 |
restartpivots (lrs_dic * P, lrs_dat * Q)
/* facet contains a list of the inequalities in the cobasis for the restart */
/* inequality contains the relabelled inequalities after initialization */
{
long i, j, k;
long *Cobasic; /* when restarting, Cobasic[j]=1 if j is in cobasis */
/* assign local variables to s... | false | false | false | false | false | 0 |
setup_xdiff_options(
const git_diff_options *opts, xdemitconf_t *cfg, xpparam_t *param)
{
memset(cfg, 0, sizeof(xdemitconf_t));
memset(param, 0, sizeof(xpparam_t));
cfg->ctxlen =
(!opts || !opts->context_lines) ? 3 : opts->context_lines;
cfg->interhunkctxlen =
(!opts) ? 0 : opts->interhunk_lines;
if (!opts)... | false | false | false | false | false | 0 |
Oct6100ApiCpuRegisterBistReadCap(
IN tPOCT6100_INSTANCE_API f_pApiInstance,
IN tPOCT6100_API_GET_CAPACITY_PINS f_pGetCapacityPins
)
{
tOCT6100_WRITE_PARAMS WriteParams;
tOCT6100_READ_PARAMS ReadParams;
UINT32 ulResult;
UINT16 i;
UINT16 usReadData;
/* Set the process context and user chip ID paramet... | false | false | false | false | false | 0 |
convertVertices(const std::vector<float*> & vertexAttributes, float *& vertices, const GeometryInfo & info)
{
vertices = (float*)new char[info.numberVertices * info.vertexSize];
uint32_t vertexFloats = info.vertexSize / sizeof(float);
for (uint32_t i=0; i<info.numberVertices; ++i)
{
uint32_t offset = 0;
uint32... | false | false | false | false | false | 0 |
DumpPNGChunk ( LFA_FileRef file, XMP_Uns32 pngLen, XMP_Uns32 chunkOffset )
{
// A PNG chunk contains:
// A big endian UInt32 length for the data portion. Zero is OK.
// A 4 byte chunk type, should be 4 ASCII letters, lower or upper case.
// The chunk data.
// A big endian UInt32 CRC.
// There are no align... | false | false | false | false | false | 0 |
sync_object (GladeEPropAttrs *eprop_attrs,
gboolean use_command)
{
GList *attributes = NULL;
GladeAttribute *gattr;
GtkTreeIter iter;
PangoAttrType type;
AttrEditType edit_type;
gchar *strval = NULL;
gboolean valid;
valid = gtk_tree_model_iter_children (eprop_at... | false | false | false | false | false | 0 |
isectRaySeg(const float* ap, const float* u,
const float* bp, const float* bq,
float& t)
{
float v[3], w[3];
dtVsub(v,bq,bp);
dtVsub(w,ap,bp);
float d = dtVperp2D(u,v);
if (fabsf(d) < 1e-6f) return 0;
d = 1.0f/d;
t = dtVperp2D(v,w) * d;
if (t... | false | false | false | false | false | 0 |
GRstart(int32 hdf_file_id)
{
CONSTR(FUNC, "GRstart"); /* for HERROR */
gr_info_t *gr_ptr; /* ptr to the new GR information for a file */
int32 ret_value = SUCCEED;
/* clear error stack and check validity of file id */
HEclear();
/* Perform global, one-time initialization */
if... | false | false | false | false | false | 0 |
stop_streaming(struct cx231xx_dvb *dvb)
{
struct cx231xx *dev = dvb->adapter.priv;
if (dev->USE_ISO)
cx231xx_uninit_isoc(dev);
else
cx231xx_uninit_bulk(dev);
cx231xx_set_mode(dev, CX231XX_SUSPEND);
return 0;
} | false | false | false | false | false | 0 |
HandleEvent(uint32 eventId, GameObject* go)
{
// If we are not using the Halaa banner return
if (go->GetEntry() != GO_HALAA_BANNER)
return false;
bool eventHandled = true;
switch (eventId)
{
case EVENT_HALAA_BANNER_WIN_ALLIANCE:
ProcessCaptureEvent(go, ALLIANCE);
... | false | false | false | false | false | 0 |
smp_fetch_connslots(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp, const char *kw)
{
struct server *iterator;
smp->flags = SMP_F_VOL_TEST;
smp->type = SMP_T_UINT;
smp->data.uint = 0;
for (iterator = args->data.prx->srv; iterator; ... | false | false | false | false | false | 0 |
GdipGetFontCollectionFamilyList (GpFontCollection *font_collection, int num_sought, GpFontFamily *gpfamilies[], int *num_found)
{
int i;
if (!font_collection || !gpfamilies || !num_found)
return InvalidParameter;
if (font_collection->config)
gdip_createPrivateFontSet (font_collection);
for (i = 0; i < font_c... | false | false | false | true | false | 1 |
trie_node_alloc(apr_pool_t *p,
filter_trie_node *parent, char c)
{
filter_trie_node *new_node;
if (parent) {
int i;
for (i = 0; i < parent->nchildren; i++) {
if (c == parent->children[i].c) {
return parent->children[i].child;
... | false | false | false | false | false | 0 |
bgav_rmff_header_destroy(bgav_rmff_header_t * h)
{
int i;
if(h->streams)
{
for(i = 0; i < h->num_streams; i++)
{
bgav_rmff_indx_free(&h->streams[i].indx);
bgav_rmff_mdpr_free(&h->streams[i].mdpr);
}
free(h->streams);
}
bgav_rmff_cont_free(&h->cont);
free(h);
} | false | false | false | false | false | 0 |
ttflsh(void)
{
/* Flush output */
if (obufp) {
unsigned long usec = obufp * upc; /* No. usecs this write should take */
#ifdef HAVE_SETITIMER
if (usec >= 50000 && baud < 9600) {
struct itimerval a, b;
a.it_value.tv_sec = usec / 1000000;
a.it_value.tv_usec = usec % 1000000;
a.it_interval.tv_usec = 0;... | false | true | false | false | true | 1 |
append(const Value &value) { return (*this)[size()] = value; } | false | false | false | false | false | 0 |
cancel (void)
{
ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->mutex_, -1));
if ((flags_ & SF_STREAM_OPEN) == 0) // not open
{
return 1; // AIO_ALLDONE
}
// attempt to cancel internal, i.e. user's read/write
int rc_r_int = bio_istream_.cancel();
int rc_w_int = bio_ostream_.cance... | false | false | false | false | false | 0 |
do_mount_autofs_offset(struct autofs_point *ap,
struct mapent *oe, const char *root,
char *offset)
{
int mounted = 0;
int ret;
debug(ap->logopt, "mount offset %s at %s", oe->key, root);
ret = mount_autofs_offset(ap, oe, root, offset);
if (ret >= MOUNT_OFFSET_OK)
mounted++;
else {
if (ret != MOU... | false | false | false | false | false | 0 |
begin(FXDrawable *drawable){
#ifdef HAVE_GL_H
if(!drawable){ fxerror("FXGLContext::begin: NULL drawable.\n"); }
if(!drawable->id()){ fxerror("FXGLContext::begin: drawable not created yet.\n"); }
if(visual!=drawable->getVisual()){ fxerror("FXGLContext::begin: visuals do not match.\n"); }
if(xid){
#ifndef WIN32
... | false | false | false | true | false | 1 |
setWidth( int width )
{
if ( d->width == width )
return;
d->width = width;
foreach ( QWidget* spacer, d->spacers )
spacer->resize( width, spacer->height() );
} | false | false | false | false | false | 0 |
xdl_get_hunk(xdchange_t *xscr, xdemitconf_t const *xecfg) {
xdchange_t *xch, *xchp;
for (xchp = xscr, xch = xscr->next; xch; xchp = xch, xch = xch->next)
if (xch->i1 - (xchp->i1 + xchp->chg1) > 2 * xecfg->ctxlen)
break;
return xchp;
} | false | false | false | false | false | 0 |
take_down_cache(hid_t fid)
{
const char * fcn_name = "take_down_cache()";
hbool_t success = FALSE; /* will set to TRUE if appropriate. */
/* close the file and delete it */
if ( H5Fclose(fid) < 0 ) {
nerrors++;
if ( verbose ) {
HDfprintf(stdout, "%d:%s: H5Fclose() failed.\... | false | false | false | false | false | 0 |
findRangeDevice(const char *name,
bool ignoreCase) const
{
std::list<ArRangeDevice *>::const_iterator it;
ArRangeDevice *device;
for (it = myRangeDeviceList.begin(); it != myRangeDeviceList.end(); ++it)
{
device = (*it);
if ((ignoreCase && strcasecmp(name, device->getName()) == 0) ||
(!i... | false | false | false | false | false | 0 |
post_run_process(bool result_ok, const char* procname, const string& cmdline, const string& output) {
if (!result_ok || g_verbosity() >= 5) {
ostringstream msg;
if (!result_ok) {
if (procname != NULL) {
msg << "Error running " << procname << ":" << endl;
if (g_verbosity() < 5) {
// If verbosity hig... | false | false | false | false | false | 0 |
create_win_gtab()
{
if (gwin_gtab)
return;
gwin_gtab = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_has_resize_grip(GTK_WINDOW(gwin_gtab), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (gwin_gtab), 0);
gtk_widget_realize (gwin_gtab);
set_no_focus(gwin_gtab);
if (use_tsin_sel_win())
... | false | false | false | false | false | 0 |
RemoveLayer(LookedAhead)
int *LookedAhead;
{
int i,Layer;
extern char *MenuRMOVE;
ShowPrompt("Point to the layers which you want removed.");
loop {
MenuSelect(MenuRMOVE);
if (get_layer(LookedAhead)) {
Layer = Parameters.kpLayer;
for (i = Layer; i < NumLayerTable... | false | false | false | false | false | 0 |
read_one_entry(const unsigned char *sha1, const char *base, int baselen, const char *pathname, unsigned mode, int stage)
{
int len;
unsigned int size;
struct cache_entry *ce;
if (S_ISDIR(mode))
return READ_TREE_RECURSIVE;
len = strlen(pathname);
size = cache_entry_size(baselen + len);
ce = xcalloc(1, size);
... | 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.