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 |
|---|---|---|---|---|---|---|
ganv_node_get_draw_properties(const GanvNode* node,
double* dash_length,
double* border_color,
double* fill_color)
{
GanvNodeImpl* impl = node->impl;
*dash_length = impl->dash_length;
*border_color = i... | false | false | false | false | false | 0 |
getvalue (srcp)
char **srcp;
{
char *src = *srcp;
bfd_vma value = 0;
unsigned int len = hex_value(*src++);
if (len == 0)
len = 16;
while (len--)
{
value = value << 4 | hex_value(*src++);
}
*srcp = src;
return value;
} | false | false | false | false | false | 0 |
load_new_zones(ns_server_t *server, isc_boolean_t stop) {
isc_result_t result;
dns_view_t *view;
result = isc_task_beginexclusive(server->task);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
/*
* Load zone data from disk.
*/
for (view = ISC_LIST_HEAD(server->viewlist);
view != NULL;
view = ISC_LIST_NE... | false | false | false | false | false | 0 |
znzputc(int c, znzFile file)
{
if (file==NULL) { return 0; }
#ifdef HAVE_ZLIB
if (file->zfptr!=NULL) return gzputc(file->zfptr,c);
#endif
return fputc(c,file->nzfptr);
} | false | false | false | false | false | 0 |
handle_teardown_request (GstRTSPClient * client, GstRTSPClientState * state)
{
GstRTSPSession *session;
GstRTSPSessionMedia *media;
GstRTSPStatusCode code;
if (!state->session)
goto no_session;
session = state->session;
/* get a handle to the configuration of the media in the session */
media = gst... | false | false | false | false | false | 0 |
Study(int sk, int days)
{
Skill *s;
if(Globals->SKILL_LIMIT_NONLEADERS && !IsLeader()) {
if (skills.Num()) {
s = (Skill *) skills.First();
if ((s->type != sk) && (s->days > 0)) {
Error("STUDY: Can know only 1 skill.");
return 0;
}
}
}
int max = GetSkillMax(sk);
if (GetRealSkill(sk) >= max) {
... | false | false | false | false | false | 0 |
qla24xx_msix_rsp_q(int irq, void *dev_id)
{
struct qla_hw_data *ha;
struct rsp_que *rsp;
struct device_reg_24xx __iomem *reg;
struct scsi_qla_host *vha;
unsigned long flags;
uint32_t stat = 0;
rsp = (struct rsp_que *) dev_id;
if (!rsp) {
ql_log(ql_log_info, NULL, 0x505a,
"%s: NULL response queue pointe... | false | false | false | false | false | 0 |
addProddableBlock ( ObjectCode* oc, void* start, int size )
{
ProddableBlock* pb
= stgMallocBytes(sizeof(ProddableBlock), "addProddableBlock");
IF_DEBUG(linker, debugBelch("addProddableBlock: %p %p %d\n", oc, start, size));
ASSERT(size > 0);
pb->start = start;
pb->size = size;
pb->ne... | false | false | false | false | false | 0 |
tp_base_connection_constructor (GType type, guint n_construct_properties,
GObjectConstructParam *construct_params)
{
guint i;
TpBaseConnection *self = TP_BASE_CONNECTION (
G_OBJECT_CLASS (tp_base_connection_parent_class)->constructor (
type, n_construct_properties, construct_params));
TpBaseConn... | false | false | false | false | false | 0 |
triton_context_print(void)
{
struct _triton_context_t *ctx;
list_for_each_entry(ctx, &ctx_list, entry)
printf("%p\n", ctx);
} | false | false | false | false | false | 0 |
libgnac_converter_eos_cb(GstBus *bus,
GstMessage *message,
gpointer data)
{
LibgnacConverter *converter = (LibgnacConverter *) data;
g_return_if_fail(LIBGNAC_IS_CONVERTER(converter));
LibgnacMediaItem *item = converter->priv->current;
gchar *uri = g_fi... | false | false | false | false | false | 0 |
g3d_stream_gsf_close(gpointer data)
{
G3DStreamGsf *sg = (G3DStreamGsf *)data;
g_object_unref(sg->input_subfile);
if(sg->infile_msole)
g_object_unref(sg->infile_msole);
if(sg->infile_zip)
g_object_unref(sg->infile_zip);
if(sg->uri)
g_free(sg->uri);
g_object_unref(sg->input_container);
g_free(sg);
return 0... | false | false | false | false | false | 0 |
orderModule(const Module &M) {
// This needs to match the order used by ValueEnumerator::ValueEnumerator()
// and ValueEnumerator::incorporateFunction().
OrderMap OM;
// In the reader, initializers of GlobalValues are set *after* all the
// globals have been read. Rather than awkwardly modeling this behavio... | false | false | false | false | false | 0 |
Perl_mro_get_linear_isa(pTHX_ HV *stash)
{
struct mro_meta* meta;
AV *isa;
PERL_ARGS_ASSERT_MRO_GET_LINEAR_ISA;
if(!SvOOK(stash))
Perl_croak(aTHX_ "Can't linearize anonymous symbol table");
meta = HvMROMETA(stash);
if (!meta->mro_which)
Perl_croak(aTHX_ "panic: invalid MRO!");
... | false | false | false | true | false | 1 |
abraca_client_set_current_playback_status (AbracaClient* self, gint value) {
gint _tmp0_;
g_return_if_fail (self != NULL);
_tmp0_ = value;
self->priv->_current_playback_status = _tmp0_;
g_object_notify ((GObject *) self, "current-playback-status");
} | false | false | false | false | false | 0 |
dupe_match_unlink_child(DupeItem *child, DupeItem *parent)
{
DupeMatch *dm;
dm = dupe_match_find_match(child, parent);
if (dm)
{
parent->group = g_list_remove(parent->group, dm);
g_free(dm);
}
} | false | false | false | false | false | 0 |
CopyObjComObj (
Obj obj,
Int mut )
{
Obj copy; /* copy, result */
Obj tmp; /* temporary variable */
UInt i; /* loop variable */
/* d... | false | false | false | false | false | 0 |
tryModelGeneration() {
if (!d_theoryCore->incomplete()) throw Exception("Model generation should be called only after an UNKNOWN result");
QueryResult qres = UNKNOWN;
int scopeLevel = d_cm->scopeLevel();
try {
while (qres == UNKNOWN)
{
Theorem thm;
d_se->push();
... | false | false | false | false | false | 0 |
python_timers(script_t *scr, script_timer_t *time, int type)
{
int python_handle_result;
PyObject *obj = (PyObject *)time->priv_data;
PYTHON_HANDLE_HEADER(obj, Py_BuildValue("()"))
PYTHON_HANDLE_FOOTER()
return python_handle_result;
} | false | false | false | false | false | 0 |
smiapp_validate_csi_data_format(struct smiapp_sensor *sensor, u32 code)
{
const struct smiapp_csi_data_format *csi_format = sensor->csi_format;
unsigned int i;
for (i = 0; i < ARRAY_SIZE(smiapp_csi_data_formats); i++) {
if (sensor->mbus_frame_fmts & (1 << i)
&& smiapp_csi_data_formats[i].code == code)
re... | false | false | false | false | false | 0 |
strip_path_suffix(const char *path, const char *suffix)
{
int path_len = strlen(path), suffix_len = strlen(suffix);
while (suffix_len) {
if (!path_len)
return NULL;
if (is_dir_sep(path[path_len - 1])) {
if (!is_dir_sep(suffix[suffix_len - 1]))
return NULL;
path_len = chomp_trailing_dir_sep(path, pa... | false | false | false | false | false | 0 |
Start()
{
if(_running) {
return;
}
qDebug() << "Proxy exit started";
_running = true;
} | false | false | false | false | false | 0 |
minimize_using_gradient(vnl_vector<double>& x)
{
//fsm
if (! f_->has_gradient()) {
std::cerr << __FILE__ ": called method minimize_using_gradient(), but f_ has no gradient.\n";
return false;
}
long m = f_->get_number_of_residuals(); // I Number of residuals, must be > #unknowns
long n = f_->get_numb... | false | false | false | false | false | 0 |
ReSize(int pnrows, int pncols)
{
nrows = pnrows;
ncols = pncols;
data.clear();
data.resize(nrows);
} | false | false | false | false | false | 0 |
on_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data) {
static int x = 1;
MainWindow *self = (MainWindow *)user_data;
self->_expose = true;
if (x) {
x = 0;
self->attach_remote_listener();
Status::instance()->addStatusListener(self);
... | false | false | false | false | false | 0 |
opal_datatype_create( int32_t expectedSize )
{
opal_datatype_t* datatype = (opal_datatype_t*)OBJ_NEW(opal_datatype_t);
if( expectedSize == -1 ) expectedSize = DT_INCREASE_STACK;
datatype->desc.length = expectedSize + 1; /* one for the fake elem at the end */
datatype->desc.used = 0;
datatype->de... | false | false | false | false | false | 0 |
httpd_run(void)
{
struct timeval timeout;
conndata_t *conn;
herror_t err;
fd_set fds;
log_verbose1("starting run routine");
#ifndef WIN32
sigemptyset(&thrsigset);
sigaddset(&thrsigset, SIGALRM);
#endif
_httpd_register_signal_handler();
if ((err = hsocket_listen(&_httpd_socket)) != H_OK)
{
lo... | false | false | false | false | false | 0 |
get_cif_file_type(cfile)
/* Return the code for the structure name. Skip to the first DS command,
* and look at the following line.
*
* a Stanford: A Stanford symbol name follows a DS command as in (PadIn);
* b NCA: An NCA symbol name follows a DS command as in (PadIn);
* h IGS: A KIC or IGS symbol nam... | false | false | false | false | false | 0 |
smart_text(AW_world& selected_range, AW_device *device, int gc, const char *str,AW_pos x,AW_pos y, AW_pos alignment, AW_bitset filteri, AW_CL cd1, AW_CL cd2,long opt_strlen) {
int res = device->text(gc, str, x, y, alignment, filteri, cd1, cd2, opt_strlen);
if (gc == GEN_GC_CURSOR) {
#if defined(DEVEL_RALF)
#war... | false | false | false | false | false | 0 |
CL_ClearTEnts (void)
{
int i;
memset (cl_beams, 0, sizeof(cl_beams));
memset (cl_explosions, 0, sizeof(cl_explosions));
memset (cl_lasers, 0, sizeof(cl_lasers));
// link explosions
cl_free_expl = cl_explosions;
cl_explosions_headnode.prev = &cl_explosions_headnode;
cl_explosions_headnode.next = &cl_explosions... | false | false | false | false | false | 0 |
bio_csum(struct bio *bio, struct bkey *k)
{
struct bio_vec bv;
struct bvec_iter iter;
uint64_t csum = 0;
bio_for_each_segment(bv, bio, iter) {
void *d = kmap(bv.bv_page) + bv.bv_offset;
csum = bch_crc64_update(csum, d, bv.bv_len);
kunmap(bv.bv_page);
}
k->ptr[KEY_PTRS(k)] = csum & (~0ULL >> 1);
} | false | false | false | false | false | 0 |
document_scintilla_modify_current_line_marker(Document_Scintilla *doc)
{
g_return_if_fail(doc);
Document_ScintillaDetails *docdet = DOCUMENT_SCINTILLA_GET_PRIVATE(doc);
guint current_pos;
guint current_line;
current_pos = gtk_scintilla_get_current_pos(GTK_SCINTILLA(docdet->scintilla));
current_line = gtk_sc... | false | false | false | false | false | 0 |
bcma_chipco_watchdog_register(struct bcma_drv_cc *cc)
{
struct bcm47xx_wdt wdt = {};
struct platform_device *pdev;
wdt.driver_data = cc;
wdt.timer_set = bcma_chipco_watchdog_timer_set_wdt;
wdt.timer_set_ms = bcma_chipco_watchdog_timer_set_ms_wdt;
wdt.max_timer_ms =
bcma_chipco_watchdog_get_max_timer(cc) / cc->... | false | false | false | false | false | 0 |
jv_get_refcnt(jv j) {
switch (jv_get_kind(j)) {
case JV_KIND_ARRAY:
case JV_KIND_STRING:
case JV_KIND_OBJECT:
return j.u.ptr->count;
default:
return 1;
}
} | false | false | false | false | false | 0 |
WXMPUtils_ComposeArrayItemPath_1 ( XMP_StringPtr schemaNS,
XMP_StringPtr arrayName,
XMP_Index itemIndex,
void * itemPath,
SetClientStringProc SetClientString,
WXMP_Result * wResult )
{
XMP_ENTER_Static ( "WXMPUtils_ComposeArrayItemPath_1" )
if... | false | false | false | false | false | 0 |
write_targetSpinLock(int action,
u_char * var_val,
u_char var_val_type,
size_t var_val_len,
u_char * statP, oid * name, size_t name_len)
{
if (action == RESERVE1) {
if (var_val_type != ASN_INTEGER) {
return SNMP_... | false | false | false | false | false | 0 |
strio_reopen(int argc, VALUE *argv, VALUE self)
{
rb_io_taint_check(self);
if (argc == 1 && TYPE(*argv) != T_STRING) {
return strio_copy(self, *argv);
}
strio_init(argc, argv, StringIO(self));
return self;
} | false | false | false | false | false | 0 |
typeToString(ScriptType type)
{
switch (type) {
case CheckValidityOfAlert: return QApplication::translate("Alert::AlertScript", "Check alert validity");
case CyclingStartDate: return QApplication::translate("Alert::AlertScript", "Compute cycling starting date");
case OnAboutToShow: return QApplication::... | false | false | false | false | false | 0 |
gamgi_engine_link_plane_assembly (gamgi_plane *plane,
gamgi_assembly *assembly)
{
gamgi_dlist *dlist;
/*********************************
* add new member to parent list *
*********************************/
dlist = gamgi_engine_dlist_add_end (assembly->plane_end);
assembly->plane_end = dlist;
if (dlist->before == N... | false | false | false | false | false | 0 |
ajMartAttachMartquery(AjPSeqin seqin, AjPMartquery mq)
{
AjPQuery qry = NULL;
if(!seqin)
return;
qry = seqin->Input->Query;
if(!qry)
return;
qry->QryData = (void *) mq;
return;
} | false | false | false | false | false | 0 |
isValidUnquotedName(StringRef Name) const {
if (Name.empty())
return false;
// If any of the characters in the string is an unacceptable character, force
// quotes.
for (char C : Name) {
if (!isAcceptableChar(C))
return false;
}
return true;
} | false | false | false | false | false | 0 |
updateState( const QPaintEngineState &state )
{
if ( state.state() & QPaintEngine::DirtyPen )
{
d_pen = state.pen();
}
if ( state.state() & QPaintEngine::DirtyBrush )
{
d_brush = state.brush();
}
if ( state.state() & QPaintEngine::Dirty... | false | false | false | false | false | 0 |
AddFeature(const StringRef String,
bool IsEnabled) {
// Don't add empty features
if (!String.empty()) {
// Convert to lowercase, prepend flag and add to vector
Features.push_back(PrependFlag(LowercaseString(String), IsEnabled));
}
} | false | false | false | false | false | 0 |
md5_result(md_context *ctx, uchar digest[MD5_DIGEST_LEN])
{
uint32 last, padn;
uint32 high, low;
uchar msglen[8];
high = (ctx->totalN >> 29)
| (ctx->totalN2 << 3);
low = (ctx->totalN << 3);
SIVALu(msglen, 0, low);
SIVALu(msglen, 4, high);
last = ctx->totalN & 0x3F;
padn = last < 56 ? 56 - last : 12... | false | false | false | false | true | 1 |
save(CL_OutputSource *output, bool delete_output, bool insert_whitespace)
{
CL_XMLWriter writer(output, delete_output);
writer.set_insert_whitespace(insert_whitespace);
std::stack<CL_DomNode> node_stack;
CL_DomNode cur_node = get_first_child();
while (!cur_node.is_null())
{
// Create opening node:
CL_XMLToke... | false | false | false | false | false | 0 |
listExecute(list_ *r, listExecute_ f, void *private)
{
listNode_ *ptr;
ReturnErrIf(r == NULL);
ReturnErrIf(f == NULL);
ReturnErrIf(listLock(r));
for(ptr = r->head; ptr != NULL; ptr = ptr->next) {
ReturnErrIf(f(ptr->data, private));
}
ReturnErrIf(listUnlock(r));
return 0;
} | false | false | false | false | false | 0 |
HandleGMTicketSystemStatusOpcode(WorldPacket& /*recv_data*/)
{
WorldPacket data(SMSG_GMTICKET_SYSTEMSTATUS, 4);
//Handled by using .ticket system_on/off
data << uint32(sTicketMgr.WillAcceptTickets() ? 1 : 0);
SendPacket(&data);
} | false | false | false | false | false | 0 |
mprGrowBuf(MprBuf *bp, ssize need)
{
char *newbuf;
ssize growBy;
if (bp->maxsize > 0 && bp->buflen >= bp->maxsize) {
return MPR_ERR_TOO_MANY;
}
if (bp->start > bp->end) {
mprCompactBuf(bp);
}
if (need > 0) {
growBy = max(bp->growBy, need);
} else {
g... | false | true | false | false | false | 1 |
create(){
FXWindow::create();
#ifndef WIN32
unsigned long n,i; Atom type,*list; int format;
if(XGetWindowProperty(DISPLAY(getApp()),XDefaultRootWindow(DISPLAY(getApp())),getApp()->wmNetSupported,0,2048,False,XA_ATOM,&type,&format,&n,&i,(unsigned char**)&list)==Success && list){
for(i=0; i<n; i++){
if(li... | false | false | false | false | false | 0 |
toshiba_haps_reset_protection(acpi_handle handle)
{
acpi_status status;
status = acpi_evaluate_object(handle, "RSSS", NULL, NULL);
if (ACPI_FAILURE(status)) {
pr_err("Unable to reset the HDD protection\n");
return -EIO;
}
return 0;
} | false | false | false | false | false | 0 |
createCDATASection( const DOMString &data )
{
if (!impl) {
return 0;
}
int exceptioncode = 0;
CDATASectionImpl *d = ((DocumentImpl *)impl)->createCDATASection(data.implementation(), exceptioncode);
if (exceptioncode) {
throw DOMException(exceptioncode);
}
return d;
} | false | false | false | false | false | 0 |
tonga_populate_single_firmware_entry(struct pp_smumgr *smumgr,
uint16_t firmware_type,
struct SMU_Entry *pentry)
{
int result;
struct cgs_firmware_info info = {0};
result = cgs_get_firmware_info(
smumgr->device,
tonga_convert_fw_type_to_cgs(firmware_type),
&info);
if (result == 0) {
pentry->... | false | false | false | false | false | 0 |
clr_fl(int fd, int flags) {
int val;
if ((val = fcntl(fd, F_GETFL, 0)) < 0)
perror("fcntl F_GETFL error");
val &= ~flags; // turn flags off
if (fcntl(fd, F_SETFL, val) < 0)
perror("fcntl F_SETFL error");
} | false | false | false | false | false | 0 |
key_file_use (CamelKeyFile *bs)
{
CamelKeyFile *bf;
gint err, fd;
const gchar *flag;
GList *link;
/* We want to:
* remove file from active list
* lock it
*
* Then when done:
* unlock it
* add it back to end of active list
*/
/* TODO: Check header on reset? */
CAMEL_KEY_FILE_LOCK (bs, lock);
... | false | false | false | false | false | 0 |
init_ic_make_global_vars (void)
{
tree gcov_type_ptr;
ptr_void = build_pointer_type (void_type_node);
ic_void_ptr_var
= build_decl (UNKNOWN_LOCATION, VAR_DECL,
get_identifier ("__gcov_indirect_call_callee"),
ptr_void);
TREE_STATIC (ic_void_ptr_var) = 1;
TREE_PUBLIC (ic_void_ptr_var) = 0;
DECL... | false | false | false | false | false | 0 |
restore_action_replay (uae_u8 *src)
{
uae_u32 crc32;
TCHAR *s;
action_replay_unload (1);
restore_u8 ();
armodel = restore_u8 ();
if (!armodel)
return src;
crc32 = restore_u32 ();
s = restore_string ();
_tcsncpy (changed_prefs.cartfile, s, 255);
_tcscpy (currprefs.cartfile, changed_prefs.cartfile);
xfree (... | false | false | false | false | false | 0 |
abitset_xor_cmp (bitset dst, bitset src1, bitset src2)
{
bitset_windex i;
bool changed = false;
bitset_word *src1p = ABITSET_WORDS (src1);
bitset_word *src2p = ABITSET_WORDS (src2);
bitset_word *dstp = ABITSET_WORDS (dst);
bitset_windex size = dst->b.csize;
for (i = 0; i < size; i++, dstp++)
{
... | false | false | false | false | true | 1 |
PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
os << indent << "PixelTolerance: " << this->PixelTolerance << endl;
os << indent << "ViewPort: ";
if( this->Viewport )
{
this->Viewport->PrintSelf( os << endl, indent.GetNextIndent());
}
else
{
os << "(n... | false | false | false | false | false | 0 |
init_remote_listener(int port, gboolean encrypted)
{
int rc;
int *ssock = NULL;
struct sockaddr_in saddr;
int optval;
static struct mainloop_fd_callbacks remote_listen_fd_callbacks = {
.dispatch = cib_remote_listen,
.destroy = remote_connection_destroy,
};
if (port <= 0) {
... | false | false | false | false | false | 0 |
cpl_table_sort(cpl_table *table, const cpl_propertylist *reflist)
{
cpl_size *sort_pattern, *sort_null_pattern;
cpl_error_code ec;
if (table == NULL || reflist == NULL)
return cpl_error_set_(CPL_ERROR_NULL_INPUT);
if (cpl_propertylist_get_size(reflist) == 0)
return cpl_error_set_(... | true | true | false | false | true | 1 |
on_keybinding_button_remove_clicked (GtkButton *button,
gpointer user_data)
{
GtkTreeModel *model;
GtkTreeIter iter;
Key_Entry *entry, *key, *tmp;
int onkey;
if (!gtk_tree_selection_get_selected(keybinding_selection, &model, &iter)) {
... | false | false | false | false | false | 0 |
pfs_process_sigio()
{
UINT64_T pid;
struct pfs_process *p;
debug(D_PROCESS,"SIGIO received");
itable_firstkey(pfs_process_table);
while(itable_nextkey(pfs_process_table,&pid,(void**)&p)) {
if(p && p->flags&PFS_PROCESS_FLAGS_ASYNC) {
switch(p->state) {
case PFS_PROCESS_STATE_DONE:
break;
default... | false | false | false | false | false | 0 |
show_sort_keys(Plan *sortplan, int nkeys, AttrNumber *keycols,
const char *qlabel,
StringInfo str, int indent, ExplainState *es)
{
List *context;
bool useprefix;
int keyno;
char *exprstr;
Relids varnos;
int i;
if (nkeys <= 0)
return;
for (i = 0; i < indent; i++)
appendStringInfo(st... | false | false | false | false | false | 0 |
_gsskrb5_create_ctx(
OM_uint32 * minor_status,
gss_ctx_id_t * context_handle,
krb5_context context,
const gss_channel_bindings_t input_chan_bindings,
enum gss_ctx_id_t_state state)
{
krb5_error_code kret;
gsskrb5_ctx ctx;
*context_handle = NULL;
ctx = malloc(sizeof(*ctx));
if (ctx ==... | false | false | false | false | false | 0 |
merge_fileindex_video(bgav_superindex_t * idx, bgav_stream_t * s)
{
int i;
for(i = 0; i < s->file_index->num_entries; i++)
{
idx->entries[s->file_index->entries[i].position].pts =
s->file_index->entries[i].pts;
}
} | false | false | false | false | false | 0 |
mv_hsic_phy_probe(struct platform_device *pdev)
{
struct phy_provider *phy_provider;
struct mv_hsic_phy *mv_phy;
struct resource *r;
mv_phy = devm_kzalloc(&pdev->dev, sizeof(*mv_phy), GFP_KERNEL);
if (!mv_phy)
return -ENOMEM;
mv_phy->pdev = pdev;
mv_phy->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(mv_... | false | false | false | false | false | 0 |
dp83867_config_init(struct phy_device *phydev)
{
struct dp83867_private *dp83867;
int ret;
u16 val, delay;
if (!phydev->priv) {
dp83867 = devm_kzalloc(&phydev->dev, sizeof(*dp83867),
GFP_KERNEL);
if (!dp83867)
return -ENOMEM;
phydev->priv = dp83867;
ret = dp83867_of_init(phydev);
if (ret)
... | false | false | false | false | false | 0 |
getHostName ()
{
if (m_address.sin_addr.s_addr == htonl(INADDR_ANY)) {
return ("");
}
struct hostent* hentry;
hentry = gethostbyaddr ((const char*) &m_address.sin_addr,
sizeof(m_address.sin_addr),
AF_INET);
if (hentry == NULL) {
errno = h_errno;
setstate (Address::badbit);
EL((ASSAERR,"get... | false | false | false | false | false | 0 |
luaL_newstate(void)
{
lua_State *L;
void *ud = lj_alloc_create();
if (ud == NULL) return NULL;
#if LJ_64
L = lj_state_newstate(lj_alloc_f, ud);
#else
L = lua_newstate(lj_alloc_f, ud);
#endif
if (L) G(L)->panic = panic;
return L;
} | false | false | false | false | false | 0 |
multi_create_accept_hit()
{
char selected_name[255];
int start_campaign = 0;
int popup_choice = 0;
// make sure all players have finished joining
if(!multi_netplayer_state_check(NETPLAYER_STATE_JOINED,1)){
popup(PF_BODY_BIG | PF_USE_AFFIRMATIVE_ICON,1,POPUP_OK,XSTR("Please wait until all clients have finishe... | false | false | false | false | false | 0 |
opal_hwloc_compare(const hwloc_topology_t topo1,
const hwloc_topology_t topo2,
opal_data_type_t type)
{
hwloc_topology_t t1, t2;
unsigned d1, d2;
char *x1=NULL, *x2=NULL;
int l1, l2;
int s;
struct hwloc_topology_support *s1, *s2;
/* stop stupid ... | false | false | false | false | false | 0 |
Combine( const wxSheetBlock &block,
wxSheetBlock &top, wxSheetBlock &bottom,
wxSheetBlock &left, wxSheetBlock &right ) const
{
wxSheetBlock iBlock(Intersect(block));
if (iBlock.IsEmpty()) return wxSHEET_BLOCK_NONE; // nothing to combine
if (Cont... | false | false | false | false | false | 0 |
reset() {
pos_=initialPos_;
remainingMatchLength_=initialRemainingMatchLength_;
skipValue_=FALSE;
int32_t length=remainingMatchLength_+1; // Remaining match length.
if(maxLength_>0 && length>maxLength_) {
length=maxLength_;
}
str_.truncate(length);
pos_+=length;
remainingMat... | false | false | false | false | false | 0 |
_wapi_handle_ops_isowned (gpointer handle)
{
guint32 idx = GPOINTER_TO_UINT(handle);
WapiHandleType type;
if (!_WAPI_PRIVATE_VALID_SLOT (idx)) {
return(FALSE);
}
type = _WAPI_PRIVATE_HANDLES(idx).type;
if (handle_ops[type] != NULL && handle_ops[type]->is_owned != NULL) {
return(handle_ops[type]->is_owned ... | false | false | false | false | false | 0 |
adj_gtab_win_pos()
{
if (!gwin_gtab)
return;
if (win_size_exceed(gwin_gtab))
move_win_gtab(current_in_win_x, current_in_win_y);
} | false | false | false | false | false | 0 |
operator[](const set<int> &t)
{
if(has_not(t))
{
index[t] = index.size()-1;
element.push_back(&(index.find(t)->first));
}
return index[t];
} | false | false | false | false | false | 0 |
gda_lemon_capi_parserTrace(FILE *TraceFILE, char *zTracePrompt){
yyTraceFILE = TraceFILE;
yyTracePrompt = zTracePrompt;
if( yyTraceFILE==0 ) yyTracePrompt = 0;
else if( yyTracePrompt==0 ) yyTraceFILE = 0;
} | false | false | false | false | false | 0 |
foldAddMarker(lnum, marker, markerlen)
linenr_T lnum;
char_u *marker;
int markerlen;
{
char_u *cms = curbuf->b_p_cms;
char_u *line;
int line_len;
char_u *newline;
char_u *p = (char_u *)strstr((char *)curbuf->b_p_cms, "%s");
/* Allocate a new line: old-line + 'cms'-start + marker +... | false | false | false | false | false | 0 |
rtx_unstable_p (rtx x)
{
RTX_CODE code = GET_CODE (x);
int i;
const char *fmt;
switch (code)
{
case MEM:
return ! RTX_UNCHANGING_P (x) || rtx_unstable_p (XEXP (x, 0));
case QUEUED:
return 1;
case ADDRESSOF:
case CONST:
case CONST_INT:
case CONST_DOUBLE:
case CONST_... | false | false | false | false | false | 0 |
add_kern(Code in1, Code in2, int kern)
{
if (Kern *k = kern_obj(in1, in2))
k->kern += kern;
else
_encoding[in1].kerns.push_back(Kern(in2, kern));
} | false | false | false | false | false | 0 |
ndmp_sxa_mover_set_window (struct ndm_session *sess,
struct ndmp_xa_buf *xa, struct ndmconn *ref_conn)
{
struct ndm_tape_agent * ta = &sess->tape_acb;
struct ndmp9_mover_get_state_reply *ms = &ta->mover_state;
unsigned long long max_len;
unsigned long long end_win;
NDMS_WITH(ndmp9_mover_set_window)
ndmta_... | false | false | false | false | false | 0 |
stats (MonoImage *image, const char *name) {
int i, num_methods, num_types;
MonoMethod *method;
MonoClass *klass;
num_methods = mono_image_get_table_rows (image, MONO_TABLE_METHOD);
for (i = 0; i < num_methods; ++i) {
method = mono_get_method (image, MONO_TOKEN_METHOD_DEF | (i + 1), NULL);
method_stats (meth... | false | false | false | false | false | 0 |
PerlIO_apply_layers(pTHX_ PerlIO *f, const char *mode, const char *names)
{
int code = 0;
ENTER;
save_scalar(PL_errgv);
if (f && names) {
PerlIO_list_t * const layers = PerlIO_list_alloc(aTHX);
code = PerlIO_parse_layers(aTHX_ layers, names);
if (code == 0) {
code = PerlIO_apply_layera(aTHX_ f, ... | false | false | false | false | false | 0 |
qlcnic_enable_msix(struct qlcnic_adapter *adapter, u32 num_msix)
{
struct pci_dev *pdev = adapter->pdev;
int err, vector;
if (!adapter->msix_entries) {
adapter->msix_entries = kcalloc(num_msix,
sizeof(struct msix_entry),
GFP_KERNEL);
if (!adapter->msix_entries)
return -ENOMEM;
}
adapter->flags... | false | false | false | false | false | 0 |
callAsFunction(ExecState *exec, JSObject *, const List &args)
{
// Do not use thisObj here. See HTMLCollection.
UString s = args[0]->toString(exec);
// index-based lookup?
bool ok;
unsigned int u = s.qstring().toULong(&ok);
if (ok)
return getDOMNode(exec,m_impl->item(u));
// try lookup by name
// ... | false | false | false | false | false | 0 |
soc_probe_aux_dev(struct snd_soc_card *card, int num)
{
struct snd_soc_pcm_runtime *rtd = &card->rtd_aux[num];
struct snd_soc_aux_dev *aux_dev = &card->aux_dev[num];
int ret;
ret = soc_probe_component(card, rtd->component);
if (ret < 0)
return ret;
/* do machine specific initialization */
if (aux_dev->init) ... | false | false | false | false | false | 0 |
page_stats_print(unsigned long nbpages)
{
/* bad: we're assuming every cpu is at the same speed */
unsigned i;
FILE *stats;
u_64 lasttime=0ULL;
if( pagebufstats )
{
if( !(stats=fopen(pagebufstats,"w")) )
{
fprintf(stderr,"can't open buffer stats data file %s\n",pagebufstats);
exit(EXIT_FAILURE);
... | false | false | false | false | false | 0 |
scsifront_put_rqid(struct vscsifrnt_info *info, uint32_t id)
{
unsigned long flags;
int kick;
spin_lock_irqsave(&info->shadow_lock, flags);
kick = _scsifront_put_rqid(info, id);
spin_unlock_irqrestore(&info->shadow_lock, flags);
if (kick)
scsifront_wake_up(info);
} | false | false | false | false | false | 0 |
mca_base_component_unload (const mca_base_component_t *component, int output_id)
{
int ret;
/* Unload */
opal_output_verbose(10, output_id,
"mca: base: close: unloading component %s",
component->mca_component_name);
/* XXX -- TODO -- Replace reserved by... | false | false | false | false | false | 0 |
is_ICC_signature(png_alloc_size_t it)
{
return is_ICC_signature_char(it >> 24) /* checks all the top bits */ &&
is_ICC_signature_char((it >> 16) & 0xff) &&
is_ICC_signature_char((it >> 8) & 0xff) &&
is_ICC_signature_char(it & 0xff);
} | false | false | false | false | false | 0 |
_wrap_GooCanvasItemSimple__do_simple_create_path(PyObject *cls, PyObject *args, PyObject *kwargs)
{
gpointer klass;
static char *kwlist[] = { "self", "cr", NULL };
PyGObject *self;
PycairoContext *cr;
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!O!:GooCanvasItemSimple.simple_create_path", kwlis... | false | false | false | false | false | 0 |
SwitchMaster(jack_driver_desc_t* driver_desc, JSList* driver_params)
{
std::list<JackDriverInterface*> slave_list;
std::list<JackDriverInterface*>::const_iterator it;
// Remove current master
fAudioDriver->Stop();
fAudioDriver->Detach();
fAudioDriver->Close();
// Open new master
Ja... | false | false | false | false | false | 0 |
getnetnumber(addr)
unsigned int addr;
{
if (IN_CLASSA (addr)) return (addr >> 24 );
if (IN_CLASSB (addr)) return (addr >> 16 );
if (IN_CLASSC (addr)) return (addr >> 8 );
else return 0;
} | false | false | false | false | false | 0 |
cmdtime_netend() {
if (!cmdtime_enabled) { return; }
gettimeofday(&nettime_end, 0);
nettime += timesub(&nettime_start, &nettime_end);
} | false | false | false | false | false | 0 |
getVectors( std::vector<aiVector3D>& vecs )
{
vecs.resize(vecMap.size());
for(vecIndexMap::dataType::iterator it = vecMap.begin(); it != vecMap.end(); it++){
vecs[it->second-1] = it->first;
}
} | false | false | false | false | false | 0 |
makeweights(void)
{
/* make up weights vector to avoid duplicate computations */
long i;
for (i = 1; i <= sites; i++) {
alias[i - 1] = i;
ally[i - 1] = 0;
aliasweight[i - 1] = weight[i - 1];
location[i - 1] = 0;
}
sitesort2(sites, aliasweight);
sitecombine2(sites, aliasweight);
sitescrun... | false | false | false | false | false | 0 |
g_daemon_volume_monitor_find_mount_by_mount_info (GMountInfo *mount_info)
{
GDaemonMount *daemon_mount;
G_LOCK (daemon_vm);
daemon_mount = NULL;
if (_the_daemon_volume_monitor != NULL)
{
daemon_mount = find_mount_by_mount_info (_the_daemon_volume_monitor, mount_info);
if (daemon_mount !... | false | false | false | false | false | 0 |
out( MifOutputByteStream &os ) {
os << '\n' << MifOutputByteStream::INDENT << "<XRef ";
os.indent();
CHECK_PROPERTY( XRefName );
if( setProperties & fXRefSrcText )
XRefSrcText.escapeSpecialChars();
CHECK_PROPERTY( XRefSrcText );
CHECK_PROPERTY( XRefSrcFile );
os.undent();
os << ... | false | false | false | false | false | 0 |
CreateOverlaySurface(volatile STG4000REG __iomem *pSTGReg,
u32 inWidth,
u32 inHeight,
int bLinear,
u32 ulOverlayOffset,
u32 * retStride, u32 * retUVStride)
{
u32 tmp;
u32 ulStride;
if (inWidth > STG4000_OVRL_MAX_WIDTH ||
inHeight > STG4000_OVRL_MAX_HEIGHT) {
return -EINVAL;
}
/* Stride... | false | false | false | false | false | 0 |
netsnmp_create_watcher_info(void *data, size_t size, u_char type, int flags)
{
netsnmp_watcher_info *winfo = SNMP_MALLOC_TYPEDEF(netsnmp_watcher_info);
if (winfo)
netsnmp_init_watcher_info(winfo, data, size, type, flags);
return winfo;
} | 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.