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 |
|---|---|---|---|---|---|---|
intel_get_param(__DRIscreen *psp, int param, int *value)
{
int ret;
struct drm_i915_getparam gp;
memset(&gp, 0, sizeof(gp));
gp.param = param;
gp.value = value;
ret = drmCommandWriteRead(psp->fd, DRM_I915_GETPARAM, &gp, sizeof(gp));
if (ret) {
if (ret != -EINVAL)
_mesa_warning(NULL, "drm_... | false | false | false | false | false | 0 |
ocfs2_meta_lvb_is_trustable(struct inode *inode,
struct ocfs2_lock_res *lockres)
{
struct ocfs2_meta_lvb *lvb = ocfs2_dlm_lvb(&lockres->l_lksb);
if (ocfs2_dlm_lvb_valid(&lockres->l_lksb)
&& lvb->lvb_version == OCFS2_LVB_VERSION
&& be32_to_cpu(lvb->lvb_igeneration) == inode->i_generation)
retur... | false | false | false | false | false | 0 |
rcpath(const char * file) {
static char path[4096] = { 0 };
memset(path, 0, sizeof(path));
if(getenv("SHELL_FM_HOME") != NULL) {
snprintf(path, sizeof(path), "%s/%s", getenv("SHELL_FM_HOME"), file);
}
else {
snprintf(path, sizeof(path), "%s/.shell-fm/%s", getenv("HOME"), file);
}
return path;
} | false | false | false | false | false | 0 |
frame_mrs_hide_unhide_parent(
FvwmWindow *fw, mr_args_internal *mra)
{
XSetWindowAttributes xswa;
if (mra->step_flags.do_unhide_parent)
{
Window w[2];
/* update the hidden position of the client */
frame_update_hidden_window_pos(fw, mra, True);
w[0] = hide_wins.w[3];
w[1] = FW_W_PARENT(fw);
XRestackWi... | false | false | false | false | false | 0 |
print_mpeg12(struct mpeg_codec_cap *mpeg)
{
DBG("Media Codec: MPEG12"
" Channel Modes: %s%s%s%s"
" Frequencies: %s%s%s%s%s%s"
" Layers: %s%s%s"
" CRC: %s",
mpeg->channel_mode & MPEG_CHANNEL_MODE_MONO ? "Mono " : "",
mpeg->channel_mode & MPEG_CHANNEL_MODE_DUAL_CHANNEL ?
"DualChannel " : "",
mpeg->channe... | false | false | false | false | false | 0 |
tab_left()
{
#ifdef _DEBUG
std::cout << "MessageViewBase::tab_left\n";
#endif
int page = m_notebook.get_current_page();
if( page == PAGE_MESSAGE ) m_notebook.set_current_page( PAGE_PREVIEW );
else m_notebook.set_current_page( PAGE_MESSAGE );
focus_view();
} | false | false | false | false | false | 0 |
mct_encode_custom(
// MCT data
OPJ_BYTE * pCodingdata,
// size of components
OPJ_UINT32 n,
// components
OPJ_BYTE ** pData,
// nb of components (i.e. size of pData)
OPJ_UINT32 pNbComp,
// tells if the da... | false | false | false | false | true | 1 |
validateForeignKeyConstraint(FkConstraint *fkconstraint,
Relation rel,
Relation pkrel)
{
HeapScanDesc scan;
HeapTuple tuple;
Trigger trig;
ListCell *list;
int count;
/*
* See if we can do it with a single LEFT JOIN query. A FALSE result
* indicates we must proceed with the fire-the-trig... | false | false | false | false | false | 0 |
settings_free(rdpSettings* settings)
{
if (settings != NULL)
{
freerdp_uniconv_free(settings->uniconv);
xfree(settings->hostname);
xfree(settings->username);
xfree(settings->password);
xfree(settings->domain);
xfree(settings->shell);
xfree(settings->directory);
xfree(settings->client_dir);
xfree(set... | false | false | false | false | false | 0 |
L17()
{register object *base=vs_base;
register object *sup=base+VM17; VC17
vs_check;
vs_top=sup;
goto TTL;
TTL:;
{frame_ptr fr;
fr=frs_sch_catch(((object)VV[69]));
if(fr==NULL) FEerror("The tag ~s is undefined.",1,((object)VV[69]));
base[0]= Cnil;
vs_top=(vs_base=base+0)+1;
unwind(fr,((object)VV[69]));}
} | false | false | false | false | false | 0 |
Read_Next_Char(StmInf *pstm, Bool convert)
{
c_orig = c = Stream_Getc(pstm);
if (c == EOF)
c_type = 0;
else
{
if (convert)
c = Char_Conversion(c);
c_type = char_type[c];
}
return c;
} | false | false | false | false | false | 0 |
signal_handler(int signo)
{
gotsig[signo - 1] = 1;
if (signo == SIGINT && !trap[SIGINT]) {
if (!suppress_int) {
pending_sig = 0;
raise_interrupt(); /* does not return */
}
pending_int = 1;
} else {
pending_sig = signo;
}
} | false | false | false | false | false | 0 |
max8660_pdata_from_dt(struct device *dev,
struct device_node **of_node,
struct max8660_platform_data *pdata)
{
int matched, i;
struct device_node *np;
struct max8660_subdev_data *sub;
struct of_regulator_match rmatch[ARRAY_SIZE(max8660_reg)] = { };
np = of_get_child_by_name(dev->of_node, "regulators");
... | false | false | false | false | false | 0 |
uih_printmenu(struct uih_context *c, const char *name, int recursive)
{
const char *fullname;
int i = 0;
const menuitem *item;
if ((fullname = menu_fullname(name)) == NULL) {
printf("Menu not found\n");
return;
}
printf("\n\nmenu \"%s\" \"%s\"\n", fullname, name);
for (i = 0; (item = menu_... | false | false | false | false | false | 0 |
of_overlay_create(struct device_node *tree)
{
struct of_overlay *ov;
int err, id;
/* allocate the overlay structure */
ov = kzalloc(sizeof(*ov), GFP_KERNEL);
if (ov == NULL)
return -ENOMEM;
ov->id = -1;
INIT_LIST_HEAD(&ov->node);
of_changeset_init(&ov->cset);
mutex_lock(&of_mutex);
id = idr_alloc(&ov_i... | false | false | false | false | false | 0 |
parse_int(int *opt, const char *arg, int min, int max)
{
int value = atoi(arg);
if (min <= value && value <= max) {
*opt = value;
return OPT_OK;
}
return OPT_ERR_INTEGER_VALUE_OUT_OF_BOUND;
} | false | false | false | false | false | 0 |
xmlSecKeyDataBinaryValueDuplicate(xmlSecKeyDataPtr dst, xmlSecKeyDataPtr src) {
xmlSecBufferPtr buffer;
int ret;
xmlSecAssert2(xmlSecKeyDataIsValid(dst), -1);
xmlSecAssert2(xmlSecKeyDataCheckSize(dst, xmlSecKeyDataBinarySize), -1);
xmlSecAssert2(xmlSecKeyDataIsValid(src), -1);
xmlSecAssert2(xml... | false | false | false | false | false | 0 |
rosGetColLbls( void )
{
static wxString osColLbls;
CmdNgSpicePR oCmdPR;
wxString osNodePair;
size_t sz1, sz2;
// Get a working copy of the PRINT command object to modify
oCmdPR = m_oCmdPR;
// Check if anything can be done
if( !m_oCmdPR.m_osaCpnts.IsEmpty( ) && !NetList::m_oaCpnts.IsEmpt... | false | false | false | false | false | 0 |
refine_copper(const struct pkg *pkg_copper, struct inst *copper,
enum allow_overlap allow)
{
const struct pkg *pkg;
struct inst *other;
for (pkg = pkgs; pkg; pkg = pkg->next) {
/*
* Pads in distinct packages can happily coexist.
*/
if (pkg != pkgs && pkg_copper != pkgs && pkg_copper != pkg)
continu... | false | false | false | false | false | 0 |
nemo_icon_container_accessible_initialize (AtkObject *accessible,
gpointer data)
{
NemoIconContainer *container;
NemoIconContainerAccessiblePrivate *priv;
if (ATK_OBJECT_CLASS (accessible_parent_class)->initialize) {
ATK_OBJECT_CLASS (accessible_parent_class)->initialize (accessible, data);
}
priv... | false | false | false | false | false | 0 |
appendShortStringElement(const char *src, int32_t len, char *result, int32_t *resultSize, int32_t capacity, char arg)
{
if(len) {
if(*resultSize) {
if(*resultSize < capacity) {
uprv_strcat(result, "_");
}
(*resultSize)++;
}
*resultSize += l... | false | false | false | false | false | 0 |
text_name(PG_FUNCTION_ARGS)
{
text *s = PG_GETARG_TEXT_P(0);
Name result;
int len;
len = VARSIZE(s) - VARHDRSZ;
/* Truncate oversize input */
if (len >= NAMEDATALEN)
len = NAMEDATALEN - 1;
#ifdef STRINGDEBUG
printf("text- convert string length %d (%d) ->%d\n",
VARSIZE(s) - VARHDRSZ, VARSIZE(s), l... | false | false | false | false | true | 1 |
mono_security_manager_get_methods (void)
{
/* Already initialized ? */
if (secman.securitymanager)
return &secman;
/* Initialize */
secman.securitymanager = mono_class_from_name (mono_defaults.corlib,
"System.Security", "SecurityManager");
g_assert (secman.securitymanager);
if (!secman.securitymanager->init... | false | false | false | false | false | 0 |
bgav_mms_close(bgav_mms_t * mms)
{
FREE(mms->server_version);
FREE(mms->tool_version);
FREE(mms->update_url);
FREE(mms->password_encryption_type);
FREE(mms->packet_buffer);
FREE(mms->header);
if(mms->fd >= 0)
closesocket(mms->fd);
FREE(mms);
} | false | false | false | false | false | 0 |
ff_logv(const char * file, const char * func, int line, ft_log_level level, int err, const char * fmt, va_list vargs)
{
/*
* note 1.1)
* log subsystem is automatically initialized upon first call to
* ff_log(), ff_vlog(), ff_log_register() or ff_log_set_threshold().
*/
ft_log_event event = {... | false | false | false | false | false | 0 |
construct_DME_tree(DME_NODE * l, int lnum, DME_TREE_NODE **Troot){
if ( (*Troot) == NULL ){
(*Troot) = (DME_TREE_NODE *) malloc ( sizeof(DME_TREE_NODE)) ;
if ( (*Troot) == NULL){
printf(" mallock Error 1 \n");
exit(1);
}
}
(*Troot) -> capacitance = l -> capacitance ;
(*Troot) -> delay = l->... | false | false | false | false | false | 0 |
explorer_update_gui(Explorer *self) {
/* If the GUI needs updating, update it. This includes limiting the maximum
* update rate, updating the iteration count display, and actually rendering
* frames to the drawing area.
*/
/* If we have rendering changes we're trying to push through as quickly
... | false | false | false | false | false | 0 |
rpgo(nodeid, loadtag, rtf, argvtag, pid, idx)
int4 nodeid;
int4 loadtag;
int4 rtf;
int4 argvtag;
int4 *pid;
int4 *idx;
{
char *cwd = 0;
int r;
if (rtf & RTF_CWD) {
if ((cwd = getworkdir()) == 0)
return(LAMERROR);
}
r = rpgov(nodeid, loadtag, rtf, argvtag, 0, cwd, -1, pid, id... | false | false | false | false | false | 0 |
add_objc_string (tree ident, string_section section)
{
tree *chain, decl, type;
char buf[BUFSIZE];
switch (section)
{
case class_names:
chain = &class_names_chain;
snprintf (buf, BUFSIZE, "_OBJC_ClassName_%s", IDENTIFIER_POINTER (ident));
break;
case meth_var_names:
chain = &m... | true | true | false | false | false | 1 |
smallestInAbsValue(double x1,double x2,double x3,double x4) const
{
double x=x1;
double xabs=fabs(x);
if(fabs(x2)<xabs) {
x=x2;
xabs=fabs(x2);
}
if(fabs(x3)<xabs) {
x=x3;
xabs=fabs(x3);
}
if(fabs(x4)<xabs) {
x=x4;
}
return x;
} | false | false | false | false | false | 0 |
mini_gc_init_gc_map (MonoCompile *cfg)
{
if (COMPILE_LLVM (cfg))
return;
if (!mono_gc_is_moving ())
return;
if (cfg->compile_aot) {
if (!enable_gc_maps_for_aot)
return;
} else if (!mono_gc_precise_stack_mark_enabled ())
return;
#if 1
/* Debugging support */
{
static int precise_count;
precise_c... | false | false | false | false | true | 1 |
mv_u3d_build_trb_chain(struct mv_u3d_req *req, unsigned *length,
struct mv_u3d_trb *trb, int *is_last)
{
u32 temp;
unsigned int direction;
struct mv_u3d *u3d;
/* how big will this transfer be? */
*length = min(req->req.length - req->req.actual,
(unsigned)MV_U3D_EP_MAX_LENGTH_TRANSFER);
u3d = req->ep->u3d;
... | false | false | false | false | false | 0 |
gst_frei0r_src_do_seek (GstBaseSrc * bsrc, GstSegment * segment)
{
GstClockTime time;
GstFrei0rSrc *self = GST_FREI0R_SRC (bsrc);
segment->time = segment->start;
time = segment->last_stop;
/* now move to the time indicated */
if (self->fps_n) {
self->n_frames = gst_util_uint64_scale (time,
sel... | false | false | false | false | false | 0 |
append_dns(DBusMessageIter *iter, void *user_data)
{
struct vpn_provider *provider = user_data;
if (provider->nameservers != NULL)
append_nameservers(iter, provider->nameservers);
} | false | false | false | false | false | 0 |
GetAsString () const
{
if (str.length () == 0) {
char *buf = gcu_value_get_string (&val);
const_cast<SimpleValue*> (this)->str = buf;
g_free (buf);
}
return str.c_str ();
} | false | false | false | false | false | 0 |
__lambda40_ (Block4Data* _data4_) {
ClocksAlarmMainPanel * self;
GtkWidget* _tmp0_ = NULL;
GtkWidget* _tmp1_ = NULL;
ClocksContentView* _tmp2_ = NULL;
self = _data4_->self;
_tmp0_ = gtk_stack_get_visible_child ((GtkStack*) self);
_tmp1_ = _tmp0_;
_tmp2_ = self->priv->content_view;
if (_tmp1_ == G_TYPE_CHECK_IN... | false | false | false | false | false | 0 |
strip_array_types (tree type)
{
while (TREE_CODE (type) == ARRAY_TYPE)
type = TREE_TYPE (type);
return type;
} | false | false | false | false | false | 0 |
remove_extent_backref(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct btrfs_path *path,
struct btrfs_extent_inline_ref *iref,
int refs_to_drop, int is_data, int *last_ref)
{
int ret = 0;
BUG_ON(!is_data && refs_to_drop != 1);
if (iref) {
update_inline_extent_backref(root, pat... | false | false | false | false | false | 0 |
obj_free(void *p)
{
ei_reg_obj *obj = p;
if (obj) {
switch (ei_reg_typeof(obj)) {
case EI_STR:
free(obj->val.s);
break;
case EI_BIN:
free(obj->val.p);
break;
}
/* really remove the inode (don't use freelist here) */
free(obj);
}
return;
} | false | false | false | false | false | 0 |
makeMasters(QString & message) {
QList<ViewLayer::ViewLayerPlacement> layerSpecs;
layerSpecs << ViewLayer::NewBottom;
if (m_bothSidesNow) layerSpecs << ViewLayer::NewTop;
foreach (ViewLayer::ViewLayerPlacement viewLayerPlacement, layerSpecs) {
LayerList viewLayerIDs = m_sketchWidget->routingLaye... | false | false | false | false | false | 0 |
__kmod_module_fill_softdep(struct kmod_module *mod,
struct kmod_list **list)
{
struct kmod_list *pre = NULL, *post = NULL, *l;
int err;
err = kmod_module_get_softdeps(mod, &pre, &post);
if (err < 0) {
ERR(mod->ctx, "could not get softdep: %s\n",
strerror(-err));
goto fail;
}
kmod_list_foreach(l... | false | false | false | false | false | 0 |
max6642_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct device *dev = &client->dev;
struct max6642_data *data;
struct device *hwmon_dev;
data = devm_kzalloc(dev, sizeof(struct max6642_data), GFP_KERNEL);
if (!data)
return -ENOMEM;
data->client = client;
mutex_init(&data->update_... | false | false | false | false | false | 0 |
folderview_select_next_marked(FolderView *folderview)
{
GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
GtkCMCTreeNode *node = NULL;
EntryAction last_summary_select_prio = prefs_common.summary_select_prio[0];
gboolean last_open = prefs_common.always_show_msg;
prefs_common.summary_select_prio[0] = ACTION_MARK... | false | false | false | false | false | 0 |
proxy_authproc(sasl_conn_t *conn,
void *context __attribute__((unused)),
const char *requested_user,
unsigned rlen __attribute__((unused)),
const char *auth_identity,
unsigned alen __attribute__((unused)),
const char *def_realm __attribute__((unused)),
unsigned urlen __attribut... | true | true | false | false | false | 1 |
GetLCDStructPtr661(struct SiS_Private *SiS_Pr)
{
unsigned char *ROMAddr = SiS_Pr->VirtualRomBase;
unsigned char *myptr = NULL;
unsigned short romindex = 0, reg = 0, idx = 0;
/* Use the BIOS tables only for LVDS panels; TMDS is unreliable
* due to the variaty of panels the BIOS doesn't know about.
... | false | false | false | false | false | 0 |
httpHeaderDelByName(HttpHeader * hdr, const char *name)
{
int count = 0;
HttpHeaderPos pos = HttpHeaderInitPos;
HttpHeaderEntry *e;
httpHeaderMaskInit(&hdr->mask, 0); /* temporal inconsistency */
debug(55, 7) ("deleting '%s' fields in hdr %p\n", name, hdr);
while ((e = httpHeaderGetEntry(hdr, &p... | false | false | false | false | false | 0 |
e_bindings_mapping_change_enable(Eina_Bool enable)
{
if (enable)
_e_bindings_mapping_change_enabled++;
else
_e_bindings_mapping_change_enabled--;
if (_e_bindings_mapping_change_enabled < 0)
_e_bindings_mapping_change_enabled = 0;
} | false | false | false | false | false | 0 |
nv01_gr_mthd_bind_clip(struct nvkm_device *device, u32 inst, u32 data)
{
switch (nv04_gr_mthd_bind_class(device, data)) {
case 0x30:
nv04_gr_set_ctx1(device, inst, 0x2000, 0);
return true;
case 0x19:
nv04_gr_set_ctx1(device, inst, 0x2000, 0x2000);
return true;
}
return false;
} | false | false | false | false | false | 0 |
ikrt_fl_less_or_equal(ikptr x, ikptr y){
if(flonum_data(x) <= flonum_data(y)){
return true_object;
} else {
return false_object;
}
} | false | false | false | false | false | 0 |
un_rpwfile(void)
{
unsigned cnt;
struct uhash *hp, *np;
if (!doneit) /* Nothing to undo */
return;
for (cnt = 0; cnt < HASHMOD; cnt++) {
for (hp = uhash[cnt]; hp; hp = np) {
np = hp->pwh_next;
if (hp->pwh_homed)
free(hp->pwh_homed);
free((char *) hp);
}
uhash[cnt] = unhash[cnt] = ... | false | false | false | false | false | 0 |
iwl_sta_alloc_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
u8 sta_id)
{
struct iwl_link_quality_cmd *link_cmd;
link_cmd = kzalloc(sizeof(struct iwl_link_quality_cmd), GFP_KERNEL);
if (!link_cmd) {
IWL_ERR(priv, "Unable to allocate memory for LQ cmd.\n");
return NULL;
}
iwl_sta_fill_lq(priv, ctx... | false | false | false | false | false | 0 |
parseDtor()
{
DtorDeclaration *f;
Loc loc = token.loc;
nextToken();
check(TOKthis);
check(TOKlparen);
check(TOKrparen);
StorageClass stc = parsePostfix();
f = new DtorDeclaration(loc, Loc(), stc, Id::dtor);
parseContracts(f);
return f;
} | false | false | false | false | false | 0 |
num_cached_ip(cmd_parms *parms, void *dummy,
const char *arg)
{
mod_config *cfg = (mod_config *)dummy;
ap_get_module_config(parms->server->module_config, &spamhaus_module);
int nInCache = atoi(arg);
cfg->nip_incache = nInCache;
if (cfg->nip_incache > MAX_CACHE_SIZE) cfg->nip_incache = MAX_CACHE_SIZE;
... | false | false | false | false | false | 0 |
echoMatterTextureSet(echoScene *scene, echoObject *obj, Nrrd *ntext) {
if (scene && obj && ntext && echoObjectHasMatter[obj->type] &&
3 == ntext->dim &&
nrrdTypeUChar == ntext->type &&
4 == ntext->axis[0].size) {
obj->ntext = ntext;
_echoSceneNrrdAdd(scene, ntext);
}
} | false | false | false | false | false | 0 |
camel_imapx_command_queue_insert_sorted (CamelIMAPXCommandQueue *queue,
CamelIMAPXCommand *ic)
{
g_return_if_fail (queue != NULL);
g_return_if_fail (CAMEL_IS_IMAPX_COMMAND (ic));
camel_imapx_command_ref (ic);
g_queue_insert_sorted (
(GQueue *) queue, ic, (GCompareDataFun... | false | false | false | false | false | 0 |
InsertCell(const int& partType, const int& cellType,
const vtkIdType& npts, vtkIdType conn[8])
{
//get the correct iterator from the array of iterations
if(this->CellInsertionIterators[partType].pIt->part)
{
//only insert the cell if the part is turned on
this->CellInsertio... | false | false | false | false | false | 0 |
icon_dir_list_append(GList **list, icon_dir_t *dir)
{
g_assert(list != NULL && dir != NULL);
*list = g_list_insert_sorted(*list, dir, (GCompareFunc) icon_dir_compare);
} | false | false | false | false | false | 0 |
br_hidden_alloc (GGobiData * d)
{
gint i, nprev = d->hidden.nels;
vectorb_realloc (&d->hidden, d->nrows);
vectorb_realloc (&d->hidden_now, d->nrows);
vectorb_realloc (&d->hidden_prev, d->nrows);
/* initialize to not hidden */
for (i = nprev; i < d->nrows; i++)
d->hidden.els[i] = d->hidden_now.els[i] =... | false | false | false | false | false | 0 |
bnx2i_process_login_resp(struct iscsi_session *session,
struct bnx2i_conn *bnx2i_conn,
struct cqe *cqe)
{
struct iscsi_conn *conn = bnx2i_conn->cls_conn->dd_data;
struct iscsi_task *task;
struct bnx2i_login_response *login;
struct iscsi_login_rsp *resp_hdr;
int pld_len;
int pad_len;
login = (str... | false | true | false | false | false | 1 |
getSint32(Sint32 &sintVal,
const unsigned long pos)
{
/* get integer string value */
OFString str;
OFCondition l_error = getOFString(str, pos, OFTrue);
if (l_error.good())
{
/* convert string to integer value */
#if SIZEOF_LONG == 8
if (sscanf(... | false | false | false | false | false | 0 |
decode_switches (int argc, char **argv)
{
int c;
/* If DEFAULT_PRINT is still true after processing all the options,
that means the default printing options should be used. */
bool default_print = true;
while ((c = getopt_long (argc, argv, "hip:v", long_options, NULL)) != -1) {
switch (c) {
case ... | false | false | false | false | false | 0 |
netlink_bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen)
{
libc_func(bind, int, int, const struct sockaddr *, socklen_t);
struct sockaddr_un sa;
const char *path = getenv("UMOCKDEV_DIR");
if (fd_map_get(&wrapped_netlink_sockets, sockfd, NULL) && path != NULL) {
DBG("testbed wrapped bi... | false | false | false | false | true | 1 |
notify_uninit (void)
{
GList *l;
if (!_initted) {
return;
}
if (_app_name != NULL) {
g_free (_app_name);
_app_name = NULL;
}
for (l = _active_notifications; l != NULL; l = l->next) {
NotifyNotification *n ... | false | false | false | false | false | 0 |
vzt_wr_init(const char *name)
{
struct vzt_wr_trace *lt=(struct vzt_wr_trace *)calloc(1, sizeof(struct vzt_wr_trace));
if((!name)||(!(lt->handle=fopen(name, "wb"))))
{
free(lt);
lt=NULL;
}
else
{
lt->vztname = strdup(name);
vzt_wr_emit_u16(lt, VZT_WR_HDRID);
vzt_wr_emit_u16(lt, VZT_WR_VERSION);
vzt_wr_emit_... | false | false | false | false | false | 0 |
init_agent_snmp_session(netsnmp_session * session, netsnmp_pdu *pdu)
{
netsnmp_agent_session *asp = (netsnmp_agent_session *)
calloc(1, sizeof(netsnmp_agent_session));
if (asp == NULL) {
return NULL;
}
DEBUGMSGTL(("snmp_agent","agent_sesion %8p created\n", asp));
asp->session = ses... | false | false | false | false | false | 0 |
read_rats_db (const char *fname, FILE *fp)
{
dbwrapper *dw;
long forward = 0;
int i, err = 0;
gretl_error_clear();
/* get into position */
fseek(fp, 30L, SEEK_SET); /* skip unneeded fields */
if (fread(&forward, sizeof forward, 1, fp) == 1) {
fseek(fp, 4L, SEEK_CUR);
}
/* ba... | false | false | false | false | false | 0 |
add_1(uint64_t dest[], uint64_t x[], unsigned len, uint64_t y) {
for (unsigned i = 0; i < len; ++i) {
dest[i] = y + x[i];
if (dest[i] < y)
y = 1; // Carry one to next digit.
else {
y = 0; // No need to carry so exit early
break;
}
}
return y;
} | false | false | false | false | false | 0 |
dma_get_slave_channel(struct dma_chan *chan)
{
int err = -EBUSY;
/* lock against __dma_request_channel */
mutex_lock(&dma_list_mutex);
if (chan->client_count == 0) {
struct dma_device *device = chan->device;
dma_cap_set(DMA_PRIVATE, device->cap_mask);
device->privatecnt++;
err = dma_chan_get(chan);
if ... | false | false | false | false | false | 0 |
reset_city_dialogs(void)
{
if (!city_dialogs_have_been_initialised) {
return;
}
init_citydlg_dimensions();
dialog_list_iterate(dialog_list, pdialog) {
/* There's no reasonable way to resize a GtkPixcomm, so we don't try.
Instead we just redraw the overview within the existing area. The
... | false | false | false | false | false | 0 |
on_treeview_row_collapsed(GtkWidget *widget, GtkTreeIter *iter, GtkTreePath *path, gpointer user_data)
{
gchar *uri;
gtk_tree_model_get(GTK_TREE_MODEL(treestore), iter, TREEBROWSER_COLUMN_URI, &uri, -1);
if (uri == NULL)
return;
if (CONFIG_SHOW_ICONS)
{
GdkPixbuf *icon = utils_pixbuf_from_stock(GTK_STOCK_DIREC... | false | false | false | false | false | 0 |
ss_init(ss_context *ctx, FILE *handle)
{
if (NULL == ctx)
return TRUE;
ctx->ret = (char *)malloc(sizeof(char) * FUZZY_MAX_RESULT);
if (ctx->ret == NULL)
return TRUE;
if (handle != NULL)
ctx->total_chars = find_file_size(handle);
ctx->block_size = MIN_BLOCKSIZE;
while (ctx->block_size * SPAMSU... | false | false | false | false | false | 0 |
__ecereNameSpace__ecere__gfx3D__models__ReadCamera(struct __ecereNameSpace__ecere__gfx3D__models__FileInfo * info, struct __ecereNameSpace__ecere__com__Instance * object)
{
struct __ecereNameSpace__ecere__gfx3D__Mesh * mesh = __ecereProp___ecereNameSpace__ecere__gfx3D__Object_Get_mesh(object);
switch((*info).chunkId)
... | false | false | false | false | false | 0 |
enable_random(PyObject *self, PyObject *args)
{
char *name;
int failnum;
PyObject *failinfo;
unsigned int flags;
double probability;
if (!PyArg_ParseTuple(args, "siOId:enable_random", &name, &failnum,
&failinfo, &flags, &probability))
return NULL;
/* See failinfo()'s comment regarding failinfo's RC */
r... | false | false | false | false | false | 0 |
lrpo(Term s, Term t, BOOL lex_order_vars)
{
if (VARIABLE(s)) {
if (lex_order_vars)
return VARIABLE(t) && VARNUM(s) > VARNUM(t);
else
return FALSE;
}
else if (VARIABLE(t)) {
if (lex_order_vars)
return TRUE;
else
return occurs_in(t, s); /* s > var iff s properly contains th... | false | false | false | false | false | 0 |
fso_framework_serial_transport_real_open (FsoFrameworkTransport* base) {
FsoFrameworkSerialTransport * self;
gboolean result = FALSE;
const gchar* _tmp0_ = NULL;
gint _tmp1_ = 0;
gint _tmp2_ = 0;
gboolean _tmp9_ = FALSE;
gboolean _tmp10_ = FALSE;
self = (FsoFrameworkSerialTransport*) base;
_tmp0_ = ((FsoFramew... | false | false | false | false | false | 0 |
gsicc_get_gscs_profile(gs_color_space *gs_colorspace,
gsicc_manager_t *icc_manager)
{
cmm_profile_t *profile = gs_colorspace->cmm_icc_profile_data;
gs_color_space_index color_space_index =
gs_color_space_get_index(gs_colorspace);
int code;
bool islab;
if (p... | false | false | false | false | false | 0 |
printOneChildRepr(raw_ostream &OS, const void *Ptr,
NodeKind Kind) const {
switch (Kind) {
case Twine::NullKind:
OS << "null"; break;
case Twine::EmptyKind:
OS << "empty"; break;
case Twine::TwineKind:
OS << "rope:";
static_cast<const Twine*>(Ptr)->printRepr(OS);
... | false | false | false | false | false | 0 |
printing_page_setup(GtkWindow *parent)
{
GtkPageSetup *new_page_setup;
char *keyfile;
keyfile = NULL;
printing_get_settings();
printing_get_page_setup();
new_page_setup = gtk_print_run_page_setup_dialog(parent,page_setup,settings);
if (page_setup)
g_object_unref(page_setup);
page_setup = new_page_setup;
... | false | false | false | false | false | 0 |
set_article_to_buffer()
{
std::list< Gtk::TreeModel::iterator > list_it = m_treeview.get_selected_iterators();
if( list_it.size() ){
CORE::DATA_INFO_LIST list_info;
Gtk::TreePath path( "0" );
std::list< Gtk::TreeModel::iterator >::iterator it = list_it.begin();
for( ; it != list... | false | false | false | false | false | 0 |
gfs2_ail1_empty(struct gfs2_sbd *sdp)
{
struct gfs2_trans *tr, *s;
int oldest_tr = 1;
int ret;
spin_lock(&sdp->sd_ail_lock);
list_for_each_entry_safe_reverse(tr, s, &sdp->sd_ail1_list, tr_list) {
gfs2_ail1_empty_one(sdp, tr);
if (list_empty(&tr->tr_ail1_list) && oldest_tr)
list_move(&tr->tr_list, &sdp->sd_... | false | false | false | false | false | 0 |
power_var_int(NumericVar *base, int exp, NumericVar *result, int rscale)
{
bool neg;
NumericVar base_prod;
int local_rscale;
switch (exp)
{
case 0:
/*
* While 0 ^ 0 can be either 1 or indeterminate (error), we treat
* it as 1 because most programming languages do this. SQL:2003
* also require... | false | false | false | false | false | 0 |
print_insn_with_notes (pretty_printer *pp, const_rtx x)
{
pp_string (pp, print_rtx_head);
print_insn (pp, x, 1);
pp_newline (pp);
if (INSN_P (x) && REG_NOTES (x))
for (rtx note = REG_NOTES (x); note; note = XEXP (note, 1))
{
pp_printf (pp, "%s %s ", print_rtx_head,
GET_REG_NOTE_NAME (REG_NO... | false | false | false | false | false | 0 |
find_simplerepeats(ESL_GETOPTS *go, FILE *ofp, P7_HMM *hmm)
{
int i, j;
int status;
int max_repeat_len = 5;
int min_repeat_cnt = 4;
int min_rep_len = 25;
int min_tot_len = 50;
float relent_thresh = 1.5;
P7_HMM_WINDOWLIST *windowlist;
ESL_ALLOC(windowlist, sizeof(P7_HMM_WINDOWLIST));
p7_hmmwindow_ini... | false | false | false | false | false | 0 |
APar_FlagMovieHeader() {
if (movie_header_atom == NULL) movie_header_atom = APar_FindAtom("moov.mvhd", false, VERSIONED_ATOM, 0);
if (movie_header_atom == NULL) return;
if (movie_header_atom != NULL) movie_header_atom->ancillary_data = 0x666C6167;
return;
} | false | false | false | false | false | 0 |
save_locale(struct augeas *aug) {
if (aug->c_locale == NULL) {
aug->c_locale = newlocale(LC_ALL_MASK, "C", NULL);
ERR_NOMEM(aug->c_locale == NULL, aug);
}
aug->user_locale = uselocale(aug->c_locale);
error:
return;
} | false | false | false | false | false | 0 |
write_PCSNumber(icc *icp, icColorSpaceSignature csig, double pcs[3], char *p) {
double v[3];
int j;
if (csig == icmSigPCSData)
csig = icp->header->pcs;
if (csig == icSigLabData) {
if (icp->ver != 0)
csig = icmSigLabV4Data;
else
csig = icmSigLabV2Data;
}
switch (csig) {
case icSigXYZData:
Lut_XY... | false | false | false | false | false | 0 |
gkrellm_plugin_cancel_label(GkrellmMonitor *mon_plugin, gint id)
{
GList *list;
ExportLabel *el;
if (!mon_plugin || id < 1)
return;
for (list = export_label_list; list; list = list->next)
{
el = (ExportLabel *) list->data;
if (el->id == id)
{
export_label_list = g_list_remove(export_label_list, el)... | false | false | false | false | false | 0 |
DumpDebug(const Proto* f, DumpState* D)
{
int i,n;
DumpString((D->strip) ? NULL : f->source,D);
n= (D->strip) ? 0 : f->sizelineinfo;
DumpVector(f->lineinfo,n,sizeof(int),D);
n= (D->strip) ? 0 : f->sizelocvars;
DumpInt(n,D);
for (i=0; i<n; i++)
{
DumpString(f->locvars[i].varname,D);
DumpInt(f->locvars[i].sta... | false | false | false | false | false | 0 |
cmd_and(void)
{
double tmpnum = popnum();
top()->num = top()->num && tmpnum;
} | false | false | false | false | false | 0 |
e_web_view_new_activity (EWebView *web_view)
{
EActivity *activity;
EAlertSink *alert_sink;
GCancellable *cancellable;
g_return_val_if_fail (E_IS_WEB_VIEW (web_view), NULL);
activity = e_activity_new ();
alert_sink = E_ALERT_SINK (web_view);
e_activity_set_alert_sink (activity, alert_sink);
cancellable = g_... | false | false | false | false | false | 0 |
cluster_generic(struct Client *source_p, const char *command, int cltype, const char *format, ...)
{
char buffer[BUFSIZE];
struct remote_conf *shared_p;
va_list args;
rb_dlink_node *ptr;
va_start(args, format);
rb_vsnprintf(buffer, sizeof(buffer), format, args);
va_end(args);
RB_DLINK_FOREACH(ptr, cluster_con... | true | true | false | false | false | 1 |
mytunetsvc_config_file()
{
if(strcmp(szConfigFile, "NULL") == 0)
return NULL;
#ifdef _WIN32
if(szConfigFile[0] == 0)
{
GetWindowsDirectory(szConfigFile, sizeof(szConfigFile));
lstrcat(szConfigFile, "\\mytunetsvc.ini");
}
#endif
#ifde... | false | false | false | false | false | 0 |
alloc_group_attrs(ssize_t (*show)(struct ib_port *,
struct port_attribute *, char *buf),
int len)
{
struct attribute **tab_attr;
struct port_table_attribute *element;
int i;
tab_attr = kcalloc(1 + len, sizeof(struct attribute *), GFP_KERNEL);
if (!tab_attr)
return NULL;
for (i = 0; i < len; i++) {
... | false | false | false | false | false | 0 |
operator()(int m, int n)
{
REPORT
if (n<=0 || m!=n || m>nrows_val || n>ncols_val)
Throw(IndexException(m,n,*this));
return store[n-1];
} | false | false | false | false | false | 0 |
considerSupr(const AttributeList &atts,
const AttributeList *linkAtts,
unsigned &thisSuppressFlags,
unsigned &newSuppressFlags,
Boolean &inhibitCache,
unsigned &arcSuprIndex)
{
arcSuprIndex = invalidAtt;
if (thisSuppressFlags & suppressSupr)
return;
if (!supportAtts_[rArcSuprA].size())
... | false | false | false | false | false | 0 |
initiate_automaton_gen (argc, argv)
int argc;
char **argv;
{
const char *base_name;
int i;
ndfa_flag = 0;
split_argument = 0; /* default value */
no_minimization_flag = 0;
time_flag = 0;
v_flag = 0;
w_flag = 0;
for (i = 2; i < argc; i++)
if (strcmp (argv [i], NO_MINIMIZATION_OPTION) ==... | false | false | false | false | false | 0 |
inputbyte(byte a)
{
if (setbyte(a)) {
(*curchar)++;
correct_viewpoint();
is_virgin = false;
return true;
}
return false;
} | false | false | false | false | false | 0 |
_internal_get_from_bb_string_alloc (xmmsv_t *bb, char **buf,
unsigned int *len)
{
char *str;
int32_t l;
if (!_internal_get_from_bb_int32_positive (bb, &l)) {
return false;
}
str = x_malloc (l + 1);
if (!str) {
return false;
}
if (!_internal_get_from_bb_data (bb, str, l... | false | false | false | false | false | 0 |
ccbaWriteSVGString(const char *filename,
CCBORDA *ccba)
{
char *svgstr;
char smallbuf[256];
char line0[] = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>";
char line1[] = "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 20000303 Stylable//EN\" \"http://www.w3.org/TR/2000/03/WD-SVG-200003... | true | true | false | false | false | 1 |
Perl_get_db_sub(pTHX_ SV **svp, CV *cv)
{
dVAR;
SV * const dbsv = GvSVn(PL_DBsub);
const bool save_taint = TAINT_get;
/* When we are called from pp_goto (svp is null),
* we do not care about using dbsv to call CV;
* it's for informational purposes only.
*/
PERL_ARGS_ASSERT_GET_DB_SU... | 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.