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 |
|---|---|---|---|---|---|---|
main(int argc, char **argv)
{
int show_absolute_syms, show_absolute_relocs, show_reloc_info;
int as_text, use_real_mode;
const char *fname;
FILE *fp;
int i;
unsigned char e_ident[EI_NIDENT];
show_absolute_syms = 0;
show_absolute_relocs = 0;
show_reloc_info = 0;
as_text = 0;
use_real_mode = 0;
fname = NULL;... | false | false | true | false | true | 1 |
getDeallocationType(const Token *tok, unsigned int varid) const
{
if (Token::Match(tok, "delete %varid% ;", varid))
return New;
if (Token::Match(tok, "delete [ ] %varid% ;", varid))
return NewArray;
if (Token::Match(tok, "delete ( %varid% ) ;", varid))
return New;
if (Token::M... | false | false | false | false | false | 0 |
raw_filename(char *filename)
{
int i, len;
len = strlen(filename);
if (len < 4)
return 1;
for (i = 0; raw_formats[i].ext; i++) {
if (strcasecmp(filename + len - 4, raw_formats[i].ext) == 0)
return 0;
}
return try_dcraw(filename);
} | false | false | false | false | false | 0 |
print_trail(FILE *fp,
struct trail *t)
{
struct trail *t2;
fprintf(fp, "Trail:");
t2 = t;
while (t2 != NULL) {
fprintf(fp, " <%d,%p>", t2->varnum, (void *) t2->context);
t2 = t2->next;
}
fprintf(fp, ".\n");
} | false | false | false | false | false | 0 |
dav_fixups(request_rec *r)
{
dav_dir_conf *conf;
/* quickly ignore any HTTP/0.9 requests which aren't subreqs. */
if (r->assbackwards && !r->main) {
return DECLINED;
}
conf = (dav_dir_conf *)ap_get_module_config(r->per_dir_config,
&dav_module... | false | false | false | false | false | 0 |
qib_get_pkey(struct qib_ibport *ibp, unsigned index)
{
struct qib_pportdata *ppd = ppd_from_ibp(ibp);
struct qib_devdata *dd = ppd->dd;
unsigned ctxt = ppd->hw_pidx;
unsigned ret;
/* dd->rcd null if mini_init or some init failures */
if (!dd->rcd || index >= ARRAY_SIZE(dd->rcd[ctxt]->pkeys))
ret = 0;
else
r... | false | false | false | false | false | 0 |
hhtrcols(MAT *M, unsigned int i0, unsigned int j0,
const VEC *hh, double beta)
#endif
{
STATIC VEC *w = VNULL;
if ( M == MNULL || hh == VNULL || w == VNULL )
error(E_NULL,"hhtrcols");
if ( M->m != hh->dim )
error(E_SIZES,"hhtrcols");
if ( i0 > M->m || j0 > M->n )
error(E_BOUNDS,"hhtrcols");
... | false | false | false | true | false | 1 |
main (int argc, char *argv[])
{
mpz_t n, f;
int res;
double B1;
if (argc != 3)
{
fprintf (stderr, "Usage: ecmfactor <number> <B1>\n");
exit (1);
}
mpz_init (n);
/* read number on command line */
if (mpz_set_str (n, argv[1], 10))
{
fprintf (stderr, "Invalid number: %s\n", a... | false | false | false | false | false | 0 |
bigmul1_normal(VALUE x, VALUE y)
{
long xl = RBIGNUM_LEN(x), yl = RBIGNUM_LEN(y), i, j = xl + yl + 1;
BDIGIT_DBL n = 0;
VALUE z = bignew(j, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
BDIGIT *xds, *yds, *zds;
xds = BDIGITS(x);
yds = BDIGITS(y);
zds = BDIGITS(z);
while (j--) zds[j] = 0;
for (... | false | false | false | false | false | 0 |
gnm_x_request_clipboard (WBCGtk *wbcg, GnmPasteTarget const *pt)
{
GnmGtkClipboardCtxt *ctxt;
GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET (wbcg_toplevel (wbcg)));
GtkClipboard *clipboard =
gtk_clipboard_get_for_display
(display,
gnm_conf_get_cut_and_paste_prefer_clipboard ()
? GDK_SELECTION_CL... | false | false | false | false | false | 0 |
ccss_cairo_border_clamp_radii (double x,
double y,
double width,
double height,
double *left_top,
double *top_right,
double *right_bottom,
double *bottom_left)
{
if (height > 0 && *left_top > height / 2.) *left_top = ... | false | false | false | false | false | 0 |
count_types(GtFeatureNode *fn, void *data, GT_UNUSED GtError *err)
{
int had_err = 0;
GtTypeTraverseInfo *traverseinfo = (GtTypeTraverseInfo*) data;
gt_error_check(err);
if (strcmp(traverseinfo->type, gt_feature_node_get_type(fn)) == 0)
traverseinfo->number++;
return had_err;
} | false | false | false | false | false | 0 |
default_unprepare (GstRTSPMedia * media)
{
if (media->eos_shutdown) {
GST_DEBUG ("sending EOS for shutdown");
/* ref so that we don't disappear */
g_object_ref (media);
media->eos_pending = TRUE;
gst_element_send_event (media->pipeline, gst_event_new_eos ());
/* we need to go to playing again ... | false | false | false | false | false | 0 |
clk_rcg_pixel_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{
struct clk_rcg *rcg = to_clk_rcg(hw);
int delta = 100000;
const struct frac_entry *frac = pixel_table;
unsigned long request;
struct freq_tbl f = { 0 };
u32 ns, src;
int i, ret, num_parents = clk_hw_get_num_parents(hw)... | false | false | false | false | false | 0 |
s_new_sprite(s_container_t *c, unsigned bank, unsigned frame)
{
if(bank > c->max)
return NULL;
if(!c->banks[bank])
return NULL;
return s_new_sprite_b(c->banks[bank], frame);
} | false | false | false | false | false | 0 |
revo_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate)
{
unsigned char old, tmp, dfs;
int reg, shift;
if (rate == 0) /* no hint - S/PDIF input is master, simply return */
return;
/* adjust DFS on codecs */
if (rate > 96000)
dfs = 2;
else if (rate > 48000)
dfs = 1;
else
dfs = 0;
if (ak->type == ... | false | false | false | false | false | 0 |
cmmf_get_owf(CMMFPOPODecKeyChallContent *inChalCont,
int inIndex)
{
int i;
for (i=inIndex; i >= 0; i--) {
if (inChalCont->challenges[i]->owf != NULL) {
return inChalCont->challenges[i]->owf;
}
}
return NULL;
} | false | false | false | false | false | 0 |
do_umount(mount_list_t * mount)
{
fprintf(stderr, "Unmounting: %s\n", mount->root_name);
run_template(user_options.unmount_command_template,
mount->mount_point, mount->root_name);
/* Still unmount anyway */
if (rmdir(mount->mount_point) == -1)
fprintf(stderr, "Failed to remove mount point dir: %s (%s)",
... | false | false | false | false | false | 0 |
getDefaultParent(request_t * request)
{
peer *p = NULL;
for (p = Config.peers; p; p = p->next) {
if (neighborType(p, request) != PEER_PARENT)
continue;
if (!p->options.default_parent)
continue;
if (!peerHTTPOkay(p, request))
continue;
debug(15, 3) ("getDefaultParent: returning %s\n", p->name)... | false | false | false | false | false | 0 |
usm_secmod_rgenerate_out_msg(struct snmp_secmod_outgoing_params *parms)
{
if (!parms)
return SNMPERR_GENERR;
return usm_rgenerate_out_msg(parms->msgProcModel,
parms->globalData, parms->globalDataLen,
parms->maxMsgSize, parms->secModel,
... | false | false | false | false | false | 0 |
stralloc_starts(stralloc *sa,const char *in) {
register size_t len=str_len(in);
return (len<=sa->len && !byte_diff(sa->s,len,in));
} | false | false | false | false | false | 0 |
afr_setattr_unwind (call_frame_t *frame, xlator_t *this)
{
afr_local_t * local = NULL;
call_frame_t *main_frame = NULL;
local = frame->local;
LOCK (&frame->lock);
{
if (local->transaction.main_frame)
main_frame = local->transaction.ma... | false | false | false | false | false | 0 |
fraction_free_LDU(const DenseMatrix &A, DenseMatrix &L, DenseMatrix &D,
DenseMatrix &U)
{
CSYMPY_ASSERT(A.row_ == L.row_ && A.row_ == U.row_);
CSYMPY_ASSERT(A.col_ == L.col_ && A.col_ == U.col_);
unsigned row = A.row_, col = A.col_;
unsigned i, j, k;
RCP<const Basic> old = integer(1);
... | false | false | false | false | false | 0 |
server_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, inode_t *inode,
struct iatt *stbuf, struct iatt *preparent,
struct iatt *postparent, dict_t *xdata)
{
gfs3_link_rsp rsp = {0,};
server_state... | false | false | false | false | false | 0 |
display_chassis(struct writer* w, lldpctl_atom_t* neighbor, int details)
{
lldpctl_atom_t *mgmts, *mgmt;
tag_start(w, "chassis", "Chassis");
tag_start(w, "id", "ChassisID");
tag_attr (w, "type", "",
lldpctl_atom_get_str(neighbor,
lldpctl_k_chassis_id_subtype));
tag_data(w, lldpctl_atom_get_str(neighbor,
... | false | false | false | false | false | 0 |
wait_i2c_busy(struct snd_ice1712 *ice)
{
int t = 0x10000;
while ((inb(ICEREG1724(ice, I2C_CTRL)) & VT1724_I2C_BUSY) && t--)
;
if (t == -1)
dev_err(ice->card->dev, "i2c busy timeout\n");
} | false | false | false | false | false | 0 |
nsldapi_next_line_tokens( char **bufp, long *blenp, char ***toksp )
{
char *p, *line, *token, **toks;
int rc, tokcnt;
*toksp = NULL;
if (( rc = next_line( bufp, blenp, &line )) <= 0 ) {
return( rc );
}
if (( toks = (char **)dsgw_ch_calloc( 1, sizeof( char * ))) == NULL ) {
free( line );
r... | false | false | false | false | false | 0 |
match_construct (GType object_type, Tile* tile0, Tile* tile1) {
Match* self = NULL;
Tile* _tmp0_ = NULL;
Tile* _tmp1_ = NULL;
Tile* _tmp2_ = NULL;
Tile* _tmp3_ = NULL;
g_return_val_if_fail (tile0 != NULL, NULL);
g_return_val_if_fail (tile1 != NULL, NULL);
self = (Match*) g_type_create_instance (object_type);
_... | false | false | false | false | false | 0 |
pop3driver_initialize(mailsession * session)
{
struct pop3_session_state_data * data;
mailpop3 * pop3;
pop3 = mailpop3_new(0, NULL);
if (session == NULL)
goto err;
data = malloc(sizeof(* data));
if (data == NULL)
goto free;
data->pop3_session = pop3;
data->pop3_auth_type = POP3DRIVER_AUTH_TYP... | false | false | false | false | false | 0 |
is_under(const struct kbucket *kb, const struct kbucket *parent)
{
if (parent->depth >= kb->depth)
return FALSE;
return kuid_match_nth(&kb->prefix, &parent->prefix, parent->depth);
} | false | false | false | false | false | 0 |
SetModified(bool modified)
{
if (modified != m_Modified)
{
m_Modified = modified;
if (!m_Modified)
{
m_pControl->SetSavePoint();
}
SetEditorTitle(m_Shortname);
NotifyPlugins(cbEVT_EDITOR_MODIFIED);
// visual state
if (m_pProjectFile)
... | false | false | false | false | false | 0 |
Tk_DisableAnimation (ClientData clientData,
Tcl_Interp *interp,
int objc,
Tcl_Obj *CONST objv[])
{
CxImage image;
char *ImageName = NULL;
Tk_PhotoHandle Photo;
GifInfo* item = NULL;
// We verify the arguments, we must have two args, not more
if( objc != 2) {
Tcl_AppendResult (interp,... | false | false | false | false | false | 0 |
hash_get_eval (byte *pos, int poslen, int num_moves, int depth, float *evalp)
/* get the eval of a pos if it is there in the hash table
retval = was it found
eval = answer*/
{
uint idx = get_hash (pos, poslen) % hash_table_size;
uint check = get_check (pos, poslen);
for (; hash_table[idx].free == 0; idx = ... | false | false | false | false | false | 0 |
delimiterVector(const MSIndexVector &delimiterVector_,int selectedDelimiter_)
{
_delimiterVector=delimiterVector_;
_delimiterVector.sortUp();
// Make sure none of the values of the new vector is out of bound
int max=actualNumColumns();
for (unsigned i=0;i<delimiterVector().length();i++)
{
if (delimite... | false | false | false | false | false | 0 |
cat_one_file(int opt, const char *exp_type, const char *obj_name)
{
unsigned char sha1[20];
enum object_type type;
char *buf;
unsigned long size;
struct object_context obj_context;
if (get_sha1_with_context(obj_name, sha1, &obj_context))
die("Not a valid object name %s", obj_name);
buf = NULL;
switch (opt) ... | true | true | false | false | false | 1 |
Rect(
Canvas* c, IntCoord x1, IntCoord y1, IntCoord x2, IntCoord y2
) {
if (c == nil) {
return;
}
CanvasRep* cr = c->rep();
if (cr->xdrawable_ == CanvasRep::unbound) {
return;
}
if (matrix != nil && matrix->Rotated() && !matrix->Rotated90()) {
IntCoord x[4], y[4];
x[0] = x[3] = x1;
x[1... | false | false | false | false | false | 0 |
cst_utf8_explode(const cst_string *utf8string)
{
/* return a list of utf-8 characters as strings */
const unsigned char *xxx = (const unsigned char *)utf8string;
cst_val *chars=NULL;
int i, l=0;
char utf8char[5];
for (i=0; xxx[i]; i++)
{
if (xxx[i] < 0x80) /* one byte */
{
... | false | false | false | false | false | 0 |
EXPmatch(p, v, mod)
register char *p;
register NEWSGROUP *v;
register char mod;
{
register NEWSGROUP *ngp;
register int i;
register BOOL negate;
negate = *p == '!';
if (negate)
p++;
for (ngp = Groups, i = nGroups; --i >= 0; ngp++)
if (negate ? !wildmat(ngp->Name, p) : wildmat(ngp-... | false | false | false | false | false | 0 |
cddb_mc_read(int cd_desc, int sock, int mode,
struct cddb_entry *entry,
struct disc_mc_data *data, ...)
{
int ret;
va_list arglist;
struct disc_data *indata;
if((indata = malloc(sizeof(struct disc_data))) == NULL)
return -1;
va_start(arglist, data);
ret = cddb_vread(cd_desc, sock, mode,... | false | false | false | false | false | 0 |
jv_array_indexes(jv a, jv b) {
jv res = jv_array();
int idx = -1;
jv_array_foreach(a, ai, aelem) {
jv_array_foreach(b, bi, belem) {
// quieten compiler warnings about aelem not being used... by
// using it
if ((bi == 0 && !jv_equal(jv_copy(aelem), jv_copy(belem))) ||
(bi > 0 && !jv... | false | false | false | false | false | 0 |
dapm_new_mixer(struct snd_soc_dapm_widget *w)
{
int i, ret;
struct snd_soc_dapm_path *path;
struct dapm_kcontrol_data *data;
/* add kcontrol */
for (i = 0; i < w->num_kcontrols; i++) {
/* match name */
snd_soc_dapm_widget_for_each_source_path(w, path) {
/* mixer/mux paths name must match control name */
... | false | false | false | false | false | 0 |
selectLayer(int nNum) {
if(this->nNumLayers_ < 1 || nNum >= this->nNumLayers_)
return FALSE;
poCurrent_ = papoLayers_[nNum];
return TRUE;
} | false | false | false | false | false | 0 |
HTS_Question_find(HTS_Question * question, const char *string)
{
for (; question; question = question->next)
if (strcmp(string, question->string) == 0)
return question;
return NULL;
} | false | false | false | false | false | 0 |
findSubElementIndex(int elem_index,
int& direction, int& start_position,
int nof_sub_nodes, const int* sub_node_ids)
{
static int my_sub_node_ids[64];
meshElementCode elem_code = getElementCode(elem_index);
int my_nof_sub_elems = MeshEle... | false | false | false | false | true | 1 |
readGCGdata(struct ReadSeqVars *V)
{
int binary = FALSE; /* whether data are binary or not */
int blen = 0; /* length of binary sequence */
/* first line contains ">>>>" followed by name */
if (Strparse(">>>>([^ ]+) .+2BIT +Len: ([0-9]+)", V->buf, 2))
{
binary = TRUE;
SetSeqinfoString... | false | false | false | false | true | 1 |
pad_link_maybe_ghosting (GstPad * src, GstPad * sink, GstPadLinkCheck flags)
{
GSList *pads_created = NULL;
gboolean ret;
if (!prepare_link_maybe_ghosting (&src, &sink, &pads_created)) {
ret = FALSE;
} else {
ret = (gst_pad_link_full (src, sink, flags) == GST_PAD_LINK_OK);
}
if (!ret) {
g_slis... | false | false | false | false | false | 0 |
init_crc(void)
{
int i, j;
for (i = 0; i < 256; i++) {
crctab[i] = 0;
for (j = 0; j < 8; j++) {
if ((bittab[j] & i) != 0) {
crctab[i] = crctab[i] ^ crcbit[j];
}
}
}
} | false | false | false | false | false | 0 |
fdump_map_info(FILE *fp, Map_info *map_info, Pa_info *caller_info, Pa_info *callee_info)
{
Map_info *m;
Op_entry *op_e;
Pa_object *caller_obj;
Pa_object *callee_obj;
List *li;
for (m = map_info; m != NULL; m = m->next) {
callee_obj = search_and_check_pa_object(m->callee_op_entry, callee... | false | false | false | false | false | 0 |
git_reference_foreach(git_repository *repo, unsigned int list_flags, int (*callback)(const char *, void *), void *payload)
{
int error;
struct dirent_list_data data;
char refs_path[GIT_PATH_MAX];
/* list all the packed references first */
if (list_flags & GIT_REF_PACKED) {
const char *ref_name;
void *GIT_UNUS... | true | true | false | true | false | 1 |
hwloc_xml_component_instantiate(struct hwloc_disc_component *component,
const void *_data1,
const void *_data2,
const void *_data3)
{
struct hwloc_xml_backend_data_s *data;
struct hwloc_backend *backend;
char *env;
int force_nolibxml;
const char * xmlpath = (const char *) _data1;
const char * xm... | false | false | false | false | false | 0 |
luaI_growvector (void **block, unsigned long nelems, int size,
char *errormsg, unsigned long limit)
{
if (nelems >= limit)
lua_error(errormsg);
nelems = (nelems == 0) ? 20 : nelems*2;
if (nelems > limit)
nelems = limit;
*block = luaI_realloc(*block, nelems*size);
return (int)nel... | false | false | false | false | false | 0 |
gmpc_clicklabel_set_do_underline (GmpcClicklabel* self, gboolean val) {
gboolean _tmp0_;
g_return_if_fail (self != NULL);
_tmp0_ = val;
self->priv->underline = _tmp0_;
gmpc_clicklabel_update (self);
} | false | false | false | false | false | 0 |
mmap_close(mmap_info* info) {
if (munmap(info->addr, info->size)) {
perror("fail to munmap file");
return 2;
}
if (fclose(info->fp)) {
perror("fail to close file");
return 1;
}
return 0;
} | false | false | false | false | false | 0 |
set_base_total_from_path(Cbasetot *basetot)
{
GtkTreeModel *model;
GtkTreeIter iter;
GtkListStore *store;
if(atoi(pathSelectedAtom)<0) return;
model = gtk_tree_view_get_model(GTK_TREE_VIEW(listOfAtoms));
if(!gtk_tree_model_get_iter_from_string (model, &iter, pathSelectedAtom)) return;
store = GTK... | false | false | false | false | false | 0 |
GetVersion() {
static v8::internal::EmbeddedVector<char, 128> buffer;
v8::internal::Version::GetString(buffer);
return buffer.start();
} | false | false | false | false | false | 0 |
EmailFree(Email email)
{
PairListFree(&email->headers);
fclose(email->body);
free(email->tbody);
if (email->subject != m_subject) free((void *)email->subject);
if (email->replyto != m_replyto) free((void *)email->replyto);
if (email->to != m_to) free((void *)email->to);
if (email->from != m_f... | false | false | false | false | false | 0 |
WriteMillerCylindrical(string csFileName, OGRSpatialReference oSRS)
{
WriteProjectionName(csFileName, "Miller");
WriteFalseEastNorth(csFileName, oSRS);
WriteElement("Projection", ILW_Central_Meridian, csFileName,
oSRS.GetNormProjParm(SRS_PP_CENTRAL_MERIDIAN, 0.0));
} | false | false | false | false | false | 0 |
gail_canvas_text_get_caret_offset (AtkText *text)
{
GailCanvasText *gail_text;
GtkTextBuffer *buffer;
GtkTextMark *cursor_mark;
GtkTextIter cursor_itr;
g_return_val_if_fail (GAIL_IS_CANVAS_TEXT (text), 0);
gail_text = GAIL_CANVAS_TEXT (text);
g_return_val_if_fail (gail_text->textutil, 0);
buffer = gail... | false | false | false | false | false | 0 |
gst_bus_timed_pop_filtered (GstBus * bus, GstClockTime timeout,
GstMessageType types)
{
GstMessage *message;
GTimeVal now, then;
gboolean first_round = TRUE;
GstClockTime elapsed = 0;
g_return_val_if_fail (GST_IS_BUS (bus), NULL);
g_return_val_if_fail (types != 0, NULL);
g_return_val_if_fail (timeout... | false | false | false | false | false | 0 |
STDINCHIGEN_Setup(INCHIGEN_HANDLE _HGen,
INCHIGEN_DATA * pGenData,
inchi_Input * pInp)
{
INCHIGEN_CONTROL *HGen = (INCHIGEN_CONTROL *)_HGen;
INPUT_PARMS *ip = &(HGen->InpParms);
STRUCT_DATA *sd = &(HGen->StructData);
... | false | false | false | false | false | 0 |
plug (i_inout *inout_)
{
zmq_assert (!inout);
encoder.set_inout (inout_);
decoder.set_inout (inout_);
handle = add_fd (tcp_socket.get_fd ());
set_pollin (handle);
set_pollout (handle);
inout = inout_;
// Flush all the data that may have been already received downstream.
in_event... | false | false | false | false | false | 0 |
addritem_free_list_email( GList *list ) {
GList *node = list;
while( node ) {
ItemEMail *email = node->data;
addritem_free_item_email( email );
node->data = NULL;
node = g_list_next( node );
}
g_list_free( list );
list = NULL;
} | false | false | false | false | false | 0 |
usb_hcd_unlink_urb (struct urb *urb, int status)
{
struct usb_hcd *hcd;
struct usb_device *udev = urb->dev;
int retval = -EIDRM;
unsigned long flags;
/* Prevent the device and bus from going away while
* the unlink is carried out. If they are already gone
* then urb->use_count must be 0, since disconnect... | false | false | false | false | false | 0 |
inheritCosts(CostCentreStack *ccs)
{
IndexTable *i;
if (ignoreCCS(ccs)) { return; }
ccs->inherited_ticks += ccs->time_ticks;
ccs->inherited_alloc += ccs->mem_alloc;
for (i = ccs->indexTable; i != NULL; i = i->next)
if (!i->back_edge) {
inheritCosts(i->ccs);
ccs->in... | false | false | false | false | false | 0 |
make_absolute_path(const char *path)
{
static char bufs[2][PATH_MAX + 1], *buf = bufs[0], *next_buf = bufs[1];
char cwd[1024] = "";
int buf_index = 1, len;
int depth = MAXDEPTH;
char *last_elem = NULL;
struct stat st;
if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX)
die ("Too long path: %.*s", 60, path);
whil... | false | false | false | false | false | 0 |
stdin_write_handler(int fd, short event, void *cbdata)
{
orte_iof_sink_t *sink = (orte_iof_sink_t*)cbdata;
orte_iof_write_event_t *wev = sink->wev;
opal_list_item_t *item;
orte_iof_write_output_t *output;
int num_written;
OPAL_OUTPUT_VERBOSE((1, orte_iof_base_framework.framework_output,
... | false | false | false | false | false | 0 |
selector_read_index(struct ccu_data *ccu, struct bcm_clk_sel *sel)
{
unsigned long flags;
u32 reg_val;
u32 parent_sel;
u8 index;
/* If there's no selector, there's only one parent */
if (!selector_exists(sel))
return 0;
/* Get the value in the selector register */
flags = ccu_lock(ccu);
reg_val = __ccu_rea... | false | false | false | false | false | 0 |
FCEU_VSUniCheck(uint64 md5partial, int *MapperNo, uint8 *Mirroring)
{
VSUNIENTRY *vs = VSUniGames;
while(vs->name)
{
if(md5partial == vs->md5partial)
{
if(vs->ppu < RCP2C03B) pale = vs->ppu;
//puts(vs->name);
*MapperNo = vs->mapper;
*Mirroring = vs->mirroring;
FCEUGameInfo->type = GIT_VSUNI;
... | false | false | false | false | false | 0 |
process(const std::string& action,
PayloadSOAP *request,
PayloadSOAP **response) {
*response = NULL;
MCC_Status r;
if(!(r=Load())) return r;
if (!soap_entry) return MCC_Status(GENERIC_ERROR,"COMMUNICATION","MCC chain loading produced no e... | false | false | false | false | false | 0 |
qhasharr_clear(qhasharr_t *tbl) {
if (tbl == NULL) {
errno = EINVAL;
return;
}
qhasharr_data_t *tbldata = tbl->data;
qhasharr_slot_t *tblslots = get_slots(tbl);
if (tbldata->usedslots == 0)
return;
tbldata->usedslots = 0;
tbldata->num = 0;
// clear memory
... | false | false | false | false | false | 0 |
fw_domain_reset(const struct intel_uncore_forcewake_domain *d)
{
WARN_ON(d->reg_set == 0);
__raw_i915_write32(d->i915, d->reg_set, d->val_reset);
} | false | false | false | false | false | 0 |
printModImmOperand(const MCInst *MI, unsigned OpNum,
const MCSubtargetInfo &STI,
raw_ostream &O) {
MCOperand Op = MI->getOperand(OpNum);
// Support for fixups (MCFixup)
if (Op.isExpr())
return printOperand(MI, OpNum, STI, O);
... | false | false | false | false | false | 0 |
igb_write_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value)
{
struct igb_adapter *adapter = hw->back;
if (pcie_capability_write_word(adapter->pdev, reg, *value))
return -E1000_ERR_CONFIG;
return 0;
} | false | false | false | false | false | 0 |
include_config (cmd_parms *cmd, void *dummy,
const char *name)
{
ap_directive_t *conftree = NULL;
const char *conffile, *error;
unsigned *recursion;
int optional = cmd->cmd->cmd_data ? 1 : 0;
void *data;
apr_pool_userdata_get(&data, "ap_include_sentinel", cmd-... | false | false | false | false | false | 0 |
GetGeoTransform( double * padfGeoTransform )
{
if( CSLFetchNameValue(papszAuxLines, "UpLeftX") != NULL
&& CSLFetchNameValue(papszAuxLines, "UpLeftY") != NULL
&& CSLFetchNameValue(papszAuxLines, "LoRightX") != NULL
&& CSLFetchNameValue(papszAuxLines, "LoRightY") != NULL )
{
do... | false | false | false | false | false | 0 |
store_layout_timestamp (NemoIconContainer *container,
NemoIconData *icon_data,
const time_t *timestamp,
NemoIconView *view)
{
NemoFile *file;
NemoDirectory *directory;
if (icon_data == NULL) {
directory = nemo_view_get_model (NEMO_VIEW (view));
if (directory == NULL) {
return FALSE;
}
file = ne... | false | false | false | false | false | 0 |
remote_burglary(xchar x, xchar y)
{
struct monst *shkp;
struct eshk *eshkp;
shkp = shop_keeper(*in_rooms(x, y, SHOPBASE));
if (!shkp || !inhishop(shkp))
return; /* shk died, teleported, changed levels... */
eshkp = ESHK(shkp);
if (!eshkp->billct && !eshkp->debit) /* bill is settled... | false | false | false | false | false | 0 |
ZapperFrapper(uint8 *bg, uint8 *spr, uint32 linets, int final)
{
int xs,xe;
int zx,zy;
if(!bg) // New line, so reset stuff.
{
ZD.zappo=0;
return;
}
xs=ZD.zappo;
xe=final;
zx=ZD.mzx;
zy=ZD.mzy;
if(xe>256) xe=256;
if(scanline>=(zy-4) && scanline<=(zy+4))
{
while(xs<xe)
{
uint8 a1,a2;
... | false | false | false | false | false | 0 |
coeff(int narg, char **arg)
{
if (!allocated) allocate();
int ilo,ihi;
force->bounds(arg[0],atom->ndihedraltypes,ilo,ihi);
// 2nd arg = dihedral sub-style name
// allow for "none" or "skip" as valid sub-style name
int m;
for (m = 0; m < nstyles; m++)
if (strcmp(arg[1],keywords[m]) == 0) break;
i... | false | false | false | false | false | 0 |
mptsas_send_raid_event(struct fw_event_work *fw_event)
{
MPT_ADAPTER *ioc;
EVENT_DATA_RAID *raid_event_data;
struct mptsas_hotplug_event hot_plug_info;
int status;
int state;
struct scsi_device *sdev = NULL;
VirtDevice *vdevice = NULL;
RaidPhysDiskPage0_t phys_disk;
ioc = fw_event->ioc;
raid_event_data = (EV... | false | false | false | false | false | 0 |
callsite_free(gpointer data)
{
struct ctf_callsite_dups *cs_dups = data;
struct ctf_callsite *callsite, *cs_n;
bt_list_for_each_entry_safe(callsite, cs_n, &cs_dups->head, node) {
g_free(callsite->func);
g_free(callsite->file);
g_free(callsite);
}
g_free(cs_dups);
} | false | false | false | false | false | 0 |
parse_escreen(char *buff, void *state)
{
#ifdef ESCREEN
if ((*buff == SPIFCONF_BEGIN_CHAR) || (*buff == SPIFCONF_END_CHAR)) {
return NULL;
}
if (!BEG_STRCASECMP(buff, "url ")) {
RESET_AND_ASSIGN(rs_url, spiftool_get_word(2, buff));
} else if (!BEG_STRCASECMP(buff, "firewall ")) {
... | false | false | false | false | false | 0 |
AddShaderVariable(const char* name, int num_of_elements,
const float* values)
{
if (!name || num_of_elements <= 0 || !values)
{
return;
}
this->Internals->UniformVariables[name] = vtkShaderUniformVariable(
name, num_of_elements, values);
this->Modified();
} | false | false | false | false | false | 0 |
_gst_audio_structure_set_list (GstStructure * structure,
const gchar * fieldname, GType type, int number, ...)
{
va_list varargs;
GValue value = { 0 };
GArray *array;
int j;
g_return_if_fail (structure != NULL);
g_value_init (&value, GST_TYPE_LIST);
array = g_value_peek_pointer (&value);
va_start... | false | false | false | false | false | 0 |
sanitizeCustomHTTPHeader(const QString& _header)
{
QString sanitizedHeaders;
const QStringList headers = _header.split(QRegExp(QLatin1String("[\r\n]")));
for(QStringList::ConstIterator it = headers.begin(); it != headers.end(); ++it)
{
// Do not allow Request line to be specified and ignore
// the othe... | false | false | false | false | false | 0 |
NewInstance(int argc,
v8::Handle<v8::Value> argv[]) const {
i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
ON_BAILOUT(isolate, "v8::Function::NewInstance()",
return Local<v8::Object>());
LOG_API(isolate, "Function::NewInstance");
ENTER_V8(isolat... | false | false | false | false | false | 0 |
csv_read_record(TABDCA *dca, struct csv *csv)
{ /* read next record from csv data file */
int k, ret = 0;
xassert(csv->mode == 'R');
if (setjmp(csv->jump))
{ ret = 1;
goto done;
}
/* read dummy RECNO field */
if (csv->ref[0] > 0)
#if 0 /* 01/VI-2010 */
mp... | false | false | false | false | false | 0 |
fiid_iterator_field_len (fiid_iterator_t iter)
{
if (!(iter && iter->magic == FIID_ITERATOR_MAGIC))
return (-1);
iter->errnum = FIID_ERR_SUCCESS;
/* integer overflow conditions checked during object creation */
return (iter->obj->field_data[iter->current_index].set_field_len);
} | false | false | false | false | false | 0 |
add(const Coordinate& coord,
int segmentIndex, double dist)
{
EdgeIntersection *eiNew=new EdgeIntersection(coord, segmentIndex, dist);
pair<EdgeIntersectionList::iterator, bool> p = nodeMap.insert(eiNew);
if ( p.second ) { // new EdgeIntersection inserted
return eiNew;
} else {
delete eiNew;
return *(p.firs... | false | false | false | false | false | 0 |
getline(char** buf, size_t* bufsize, FILE *infile, int *lineno)
{
while (true) {
if (::getline(buf, bufsize, infile) == -1)
return false;
if(lineno != NULL)
*lineno ++;
char *c = *buf;
while (*c && (*c!='\r') && (*c!='\n'))
c++;
*c = 0;
if (**buf) {
break;
} else ... | false | false | false | false | false | 0 |
dbxout_type_fields (type)
tree type;
{
tree tem;
/* Output the name, type, position (in bits), size (in bits) of each
field that we can support. */
for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem))
{
/* If on of the nodes is an error_mark or its type is then return early. */
i... | false | false | false | false | false | 0 |
cmpTplScore (void *tpl1, void *tpl2)
{ /* cmpTplScore */
double l1, l2;
l1 = ((topol *) tpl1)->likelihood;
l2 = ((topol *) tpl2)->likelihood;
return (l1 > l2) ? -1 : ((l1 == l2) ? 0 : 1);
} | false | false | false | false | false | 0 |
open_file_registers(struct inode *inode, struct file *file)
{
struct seq_file *s;
int res;
res = seq_open(file, ®ister_seq_ops);
if (res == 0) {
s = file->private_data;
s->private = inode->i_private;
}
return res;
} | false | false | false | false | false | 0 |
stmmac_set_coalesce(struct net_device *dev,
struct ethtool_coalesce *ec)
{
struct stmmac_priv *priv = netdev_priv(dev);
unsigned int rx_riwt;
/* Check not supported parameters */
if ((ec->rx_max_coalesced_frames) || (ec->rx_coalesce_usecs_irq) ||
(ec->rx_max_coalesced_frames_irq) || (ec->tx_coalesc... | false | false | false | false | false | 0 |
getrandom(u_int8_t *buf, size_t len)
{
u_int32_t tmp = 0;
size_t i;
for (i = 0; i < len; i++) {
if (i % sizeof tmp == 0)
tmp = sysdep_random();
buf[i] = tmp & 0xff;
tmp >>= 8;
}
return buf;
} | false | false | false | false | false | 0 |
randumize(longer seed, long *enterorder)
{ /* randomize input order of species -- randomly permute array enterorder */
long i, j, k;
for (i = 0; i < spp; i++) {
j = (long)(randum(seed) * (i+1));
k = enterorder[j];
enterorder[j] = enterorder[i];
enterorder[i] = k;
}
} | false | false | false | false | false | 0 |
set_parameter_theora(void * data, const char * name,
const bg_parameter_value_t * v)
{
theora_t * theora = data;
if(!name)
return;
else if(bg_encoder_set_framerate_parameter(&theora->fr, name, v))
return;
else if(!strcmp(name, "target_bitrate"))
theora->ti.targe... | false | false | false | false | false | 0 |
cxx_callgraph_analyze_expr (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED,
tree from ATTRIBUTE_UNUSED)
{
tree t = *tp;
if (flag_unit_at_a_time)
switch (TREE_CODE (t))
{
case PTRMEM_CST:
if (TYPE_PTRMEMFUNC_P (TREE_TYPE (t)))
cgraph_mark_needed_node (cgraph_node (PTRMEM_CST_MEMBER (t)));
... | false | false | false | false | false | 0 |
HasAddressTaken(const Instruction *AI) {
for (const User *U : AI->users()) {
if (const StoreInst *SI = dyn_cast<StoreInst>(U)) {
if (AI == SI->getValueOperand())
return true;
} else if (const PtrToIntInst *SI = dyn_cast<PtrToIntInst>(U)) {
if (AI == SI->getOperand(0))
return true;
... | false | false | false | false | false | 0 |
bitvector_set(u_int32_t *b, u_int64_t n, u_int32_t c)
{
if (c)
b[n>>5] |= (1<<(n&31));
else
b[n>>5] &= ~(1<<(n&31));
} | 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.