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 |
|---|---|---|---|---|---|---|
col_present (const gretl_matrix *a, const gretl_matrix *b, int j,
int *colno)
{
double xa, xb;
int i, k, match;
int ret = 0;
for (k=0; k<a->cols; k++) {
match = 1;
for (i=0; i<a->rows; i++) {
xa = gretl_matrix_get(a, i, k);
xb = gretl_matrix_get(b, i, j);
if (xa != xb) {
match ... | false | false | false | false | false | 0 |
getBaseRegister(const MachineFunction &MF) const {
const PPCSubtarget &Subtarget = MF.getSubtarget<PPCSubtarget>();
if (!hasBasePointer(MF))
return getFrameRegister(MF);
if (TM.isPPC64())
return PPC::X30;
if (Subtarget.isSVR4ABI() &&
TM.getRelocationModel() == Reloc::PIC_)
return PPC::R29;
... | false | false | false | false | false | 0 |
prodint(t,resp,resp2,lf,coef,h)
lfit *lf;
double *t, *resp, *resp2, *coef, h;
{ INT dim, deg, p, i, j, k, st;
double cf[MXDEG+1], hj, hs, prod_wk[MXDIM][2*MXDEG+1];
st = 0;
dim = lf->mi[MDIM];
deg = lf->mi[MDEG];
p = lf->mi[MP];
for (i=0; i<p*p; i++) resp[i] = 0.0;
cf[0] = coef[0];
/* compute the one... | false | false | false | false | false | 0 |
dinkc_bindings_lookup(dinkc_sp_custom hash, char* funcname)
{
struct binding search;
struct binding *result;
char* lcfuncname = strdup(funcname);
char* pc;
for (pc = lcfuncname; *pc != '\0'; pc++)
*pc = tolower(*pc);
search.funcname = lcfuncname;
result = hash_lookup(hash, &search);
free(lcfuncnam... | false | false | false | false | false | 0 |
on_adddel_edit(const Gtk::TreeModel::iterator& row)
{
sharedptr<const Field> constfield = get_field_definition(row);
m_Field_BeingEdited = constfield;
m_pDialog->set_field(m_Field_BeingEdited, m_table_name);
//m_pDialog->set_modified(false); //Disable [Apply] at start.
Gtk::Window* parent_window = get_app_... | false | false | false | false | false | 0 |
tracker_spawn_child_func (gpointer user_data)
{
struct rlimit cpu_limit;
gint timeout = GPOINTER_TO_INT (user_data);
if (timeout > 0) {
/* set cpu limit */
getrlimit (RLIMIT_CPU, &cpu_limit);
cpu_limit.rlim_cur = timeout;
cpu_limit.rlim_max = timeout + 1;
if (setrlimit (RLIMIT_CPU, &cpu_limit) !... | false | false | false | false | false | 0 |
isARMNEONPred(const MachineInstr *MI) {
const MCInstrDesc &MCID = MI->getDesc();
// If we're a thumb2 or not NEON function we'll be handled via isPredicable.
if ((MCID.TSFlags & ARMII::DomainMask) != ARMII::DomainNEON ||
AFI->isThumb2Function())
return MI->isPredicable();
for (unsigned i = 0, e = M... | false | false | false | false | false | 0 |
ar_delete (struct list *list)
{
if (!obfd)
{
fprintf (stderr, _("%s: no open output archive\n"), program_name);
maybequit ();
}
else
{
while (list)
{
/* Find this name in the archive. */
bfd *member = obfd->archive_head;
bfd **prev = &(obfd->archive_head);
int found = 0;
... | false | false | false | false | false | 0 |
say(game *g, std::string line, ...)
{
va_list ap;
va_start(ap, line);
char buff[8192];
vsprintf(buff, line.c_str(), ap);
va_end(ap);
line = buff;
int junk;
parse_tags(line, &(g->u), this);
if (g->u_see(posx, posy, junk)) {
g->add_msg("%s says, \"%s\"", name.c_str(), line.c_str());
g->sound(posx, posy, 16, ... | false | false | false | false | false | 0 |
_hostlist_create_bracketed(const char *hostlist, char *sep,
char *r_op, int dims)
{
hostlist_t new = hostlist_new();
struct _range *ranges;
int nr, err;
char *p, *tok, *str, *orig;
char cur_tok[1024];
if (hostlist == NULL)
return new;
if (!(orig = str = strdup(hostlist))) {
hostlist_destroy(new);
r... | true | true | false | false | false | 1 |
etfci_realize (GnomeCanvasItem *item)
{
ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item);
if (GNOME_CANVAS_ITEM_CLASS (e_table_field_chooser_item_parent_class)-> realize)
(*GNOME_CANVAS_ITEM_CLASS (e_table_field_chooser_item_parent_class)->realize)(item);
if (!etfci->font_desc)
etfci_font_load... | false | false | false | false | false | 0 |
flush_outbuf(void)
{
if (G1.outcnt == 0)
return;
xwrite(ofd, (char *) G1.outbuf, G1.outcnt);
G1.outcnt = 0;
} | false | false | false | false | false | 0 |
is_awaiting_development()
{
if (bogus)
return false;
cstate_ty *csp = cstate_get();
assert(csp);
if (!csp)
return false;
return (csp->state == cstate_state_awaiting_development);
} | false | false | false | false | false | 0 |
root_panel(void)
{
if (_nc_stdscr_pseudo_panel == (PANEL *) 0)
{
assert(stdscr && !_nc_bottom_panel && !_nc_top_panel);
#if NO_LEAKS
_nc_panelhook()->destroy = del_panel;
#endif
_nc_stdscr_pseudo_panel = (PANEL *) malloc(sizeof(PANEL));
if (_nc_stdscr_pseudo_panel != 0)
{
PANEL *pan =... | false | false | false | false | false | 0 |
message_flush(void)
{
/* Hack -- Reset */
if (!msg_flag) message_column = 0;
/* Flush when needed */
if (message_column)
{
/* Print pending messages */
if (Term)
msg_flush(message_column);
/* Forget it */
msg_flag = FALSE;
/* Reset */
message_column = 0;
}
} | false | false | false | false | false | 0 |
tcpnodelay () const
{
struct protoent* proto = getprotobyname ("tcp");
if (proto == 0) throw sockerr (ENOPROTOOPT, "sockinetbuf::tcpnodelay");
int old = 0;
getopt (TCP_NODELAY, &old, sizeof (old), proto->p_proto);
return old!=0;
} | false | false | false | false | false | 0 |
cfb_free_cffile( ConfigFile *cf )
{
ConfigFile *next;
for (; cf; cf=next) {
next = cf->c_sibs;
if ( cf->c_kids )
cfb_free_cffile( cf->c_kids );
ch_free( cf->c_file.bv_val );
ber_bvarray_free( cf->c_dseFiles );
ch_free( cf );
}
} | false | false | false | false | false | 0 |
insert_packet_duration_from_pts(bgav_packet_timer_t * pt)
{
bgav_packet_t * p;
p = insert_packet(pt);
if(!p)
return NULL;
/* Detect B-Pyramid */
if((PACKET_GET_CODING_TYPE(p) == BGAV_CODING_TYPE_B) && !PACKET_GET_SKIP(p))
{
if(!pt->b_pyramid &&
(pt->last_b_pts != GAVL_TIME_UNDEFINED)... | false | false | false | false | false | 0 |
dri2DrawableGetMSC(struct glx_screen *psc, __GLXDRIdrawable *pdraw,
int64_t *ust, int64_t *msc, int64_t *sbc)
{
xcb_connection_t *c = XGetXCBConnection(pdraw->psc->dpy);
xcb_dri2_get_msc_cookie_t get_msc_cookie;
xcb_dri2_get_msc_reply_t *get_msc_reply;
get_msc_cookie = xcb_dri2_get_msc_unchecked(c, pd... | false | false | false | false | false | 0 |
devm_gpiod_get_index_optional(struct device *dev,
const char *con_id,
unsigned int index,
enum gpiod_flags flags)
{
struct gpio_desc *desc;
desc = devm_gpiod_get_index(dev, con_id, index, flags);
if (IS_ERR(desc)) {
if (PTR_ERR(desc) == -ENOENT)
return NULL;
}
return desc... | false | false | false | false | false | 0 |
SetPosition (double x, double y, double width, double height)
{
Invalidate ();
if (width > 0) {
m_x = x;
m_w = width;
} else {
m_x = x + width;
m_w = -width;
}
if (height > 0) {
m_y = y;
m_h = height;
} else {
m_y = y + height;
m_h = -height;
}
BoundsChanged ();
Invalidate ();
} | false | false | false | false | false | 0 |
ensure_request (StTextureCache *cache,
const char *key,
StTextureCachePolicy policy,
AsyncTextureLoadData **request,
ClutterActor *texture)
{
CoglHandle texdata;
AsyncTextureLoadData *pending;
gboolean had_pending;
tex... | false | false | false | false | false | 0 |
v4l_enumstd(const struct v4l2_ioctl_ops *ops,
struct file *file, void *fh, void *arg)
{
struct video_device *vfd = video_devdata(file);
struct v4l2_standard *p = arg;
v4l2_std_id id = vfd->tvnorms, curr_id = 0;
unsigned int index = p->index, i, j = 0;
const char *descr = "";
/* Return -ENODATA if the tvnorms... | false | false | false | false | false | 0 |
set_and_calc_slave_port_state(struct mlx4_dev *dev, int slave,
u8 port, int event,
enum slave_port_gen_event *gen_event)
{
struct mlx4_priv *priv = mlx4_priv(dev);
struct mlx4_slave_state *ctx = NULL;
unsigned long flags;
int ret = -1;
struct mlx4_active_ports actv_ports = mlx4_get_active_ports(dev, sl... | false | false | false | false | false | 0 |
emit_engine_emit_exp( Chuck_Emitter * emit, a_Exp exp )
{
// for now...
// assert( exp->next == NULL );
// loop over
while( exp )
{
switch( exp->s_type )
{
case ae_exp_binary:
if( !emit_engine_emit_exp_binary( emit, &exp->binary ) )
return FALSE;... | false | false | false | false | false | 0 |
server_real_handle_get_db (DBusConnection *connection,
DBusMessage *message,
GSList *addresses)
{
GConfDatabase *db;
DBusMessage *reply;
GError *gerror = NULL;
const gchar *str;
if (gconfd_dbus_check_in_shutdown (connection, message))
return;
db = gconfd_obtain_datab... | false | false | false | false | false | 0 |
ibmhmc_status(StonithPlugin *s)
{
struct pluginDevice* dev = NULL;
if(Debug){
LOG(PIL_DEBUG, "%s: called\n", __FUNCTION__);
}
ERRIFWRONGDEV(s,S_OOPS);
dev = (struct pluginDevice*) s;
return check_hmc_status(dev);
} | false | false | false | false | false | 0 |
ocfs2_xa_offset_pointer(struct ocfs2_xa_loc *loc, int offset)
{
BUG_ON(offset >= loc->xl_size);
return loc->xl_ops->xlo_offset_pointer(loc, offset);
} | false | false | false | false | false | 0 |
setSolvers(uint32 n) {
if (n <= 1) { share_.count = 1; share_.physical = 0; }
else { share_.count = n; }
} | false | false | false | false | false | 0 |
sr_write_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
u16 size, void *data)
{
int err;
err = usbnet_write_cmd(dev, cmd, SR_REQ_WR_REG, value, index,
data, size);
if ((err != size) && (err >= 0))
err = -EINVAL;
return err;
} | false | false | false | false | false | 0 |
dict_foreach_cb (const char *key, xmmsv_t *value, void *user_data)
{
HV *hash = (HV *)user_data;
if (!hv_store (hash, key, strlen (key), value_to_sv (value), 0)) {
croak ("failed to convert result to hash");
}
} | false | false | false | false | false | 0 |
LoadController(FCDObject* object, xmlNode* controllerNode)
{
FCDController* controller = (FCDController*)object;
bool status = FArchiveXML::LoadEntity(object, controllerNode);
if (!status) return status;
if (!IsEquivalent(controllerNode->name, DAE_CONTROLLER_ELEMENT))
{
FUError::Error(FUError::WARNING_L... | false | false | false | false | false | 0 |
ToNarrow(const std::wstring& str)
{
std::string nstr;
#if defined(_WIN32)
int length =
WideCharToMultiByte(KWSYS_ENCODING_DEFAULT_CODEPAGE, 0, str.c_str(),
int(str.size()), NULL, 0, NULL, NULL);
if (length > 0) {
char* data = new char[length];
int r =
WideCharToMultiByte(... | false | false | false | false | false | 0 |
PrintNJInternal(FILE *fp, NJ_t *NJ, bool useLen) {
if (NJ->nSeq < 4) {
return;
}
typedef struct { int node; int end; } stack_t;
stack_t *stack = (stack_t *)mymalloc(sizeof(stack_t)*NJ->maxnodes);
int stackSize = 1;
stack[0].node = NJ->root;
stack[0].end = 0;
while(stackSize>0) {
stack_t *last =... | false | false | false | false | false | 0 |
postOrder(CTree<string>* node, fstream& filter_file) {
if(node->rule != FILTERREC)
{
for (uint32_t i = 0; i < node->children.size(); i++)
postOrder(node->children.at(i), filter_file);
}
CTree<string>* tmp;
if (node->rule != FILTERNOT && node->rule != -1) {
string path = "";
path = node->i... | false | false | false | false | false | 0 |
suggest_hpet(void)
{
FILE *file;
char buffer[1024];
file = fopen("/sys/devices/system/clocksource/clocksource0/available_clocksource", "r");
if (!file)
return;
memset(buffer, 0, 1024);
if (!fgets(buffer, 1023, file)) {
fclose(file);
return;
}
if (strstr(buffer, "hpet")) {
fclose(file);
return;
}
... | false | false | false | false | false | 0 |
set_dealloc(PySetObject *so)
{
register setentry *entry;
Py_ssize_t fill = so->fill;
PyObject_GC_UnTrack(so);
Py_TRASHCAN_SAFE_BEGIN(so)
if (so->weakreflist != NULL)
PyObject_ClearWeakRefs((PyObject *) so);
for (entry = so->table; fill > 0; entry++) {
if (entry->key) {
... | false | false | false | false | false | 0 |
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
QLuaConsoleWidget *_t = static_cast<QLuaConsoleWidget *>(_o);
switch (_id) {
case 0: _t->statusMessage((*reinterpret_cast< const... | false | false | false | false | false | 0 |
PickRow(struct __ecereNameSpace__ecere__com__Instance * browser, struct __ecereNameSpace__ecere__com__Instance * surface, struct Block * row, struct Block * table, int x, int y, int pickX, int pickY, struct Block ** pickBlock, int * pickTextPos)
{
unsigned int result = 0x0;
struct Block * cell;
int c = 0;
struct Column... | false | false | false | false | false | 0 |
cxusb_d680_dmb_frontend_attach(struct dvb_usb_adapter *adap)
{
struct dvb_usb_device *d = adap->dev;
int n;
/* Select required USB configuration */
if (usb_set_interface(d->udev, 0, 0) < 0)
err("set interface failed");
/* Unblock all USB pipes */
usb_clear_halt(d->udev,
usb_sndbulkpipe(d->udev, d->props.gen... | false | false | false | false | false | 0 |
make_pair(uint32_t first, uint32_t second) {
CHECK_CELLS(2);
uint32_t index = next_cell;
cells[next_cell++] = T_PAIR;
cells[next_cell++] = ((uint64_t)first << 32) | second;
return index;
} | false | false | false | false | false | 0 |
Rotation(Point& X0, Matrix& R)
{
//steps for point generate
Point Px_d(0.0,10.0,10.0);
Point Py_d(10.0,0.0,10.0);
Point Pz_d(10.0,10.0,0.0);
Point Px(10000.0,10000.0,10000.0),Py(10000.0,10000.0,10000.0),Pz(10000.0,10000.0,10000.0);
//point generate
std::list<Point> pl;
int c=0;
while(c!=100)
{
... | false | false | false | false | false | 0 |
sadump_phys_base(ulong *phys_base)
{
if (SADUMP_VALID()) {
if (CRASHDEBUG(1))
error(NOTE, "sadump: does not save phys_base.\n");
return FALSE;
}
return FALSE;
} | false | false | false | false | false | 0 |
pv_get_rcvport(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res)
{
if(msg==NULL)
return -1;
if(msg->rcv.bind_address==NULL
|| msg->rcv.bind_address->port_no_str.s==NULL)
return pv_get_null(msg, param, res);
return pv_get_intstrval(msg, param, res,
(int)msg->rcv.bind_address->port_no,
&msg-... | false | false | false | false | false | 0 |
ajMartFilterMatch(AjPTable atab, const AjPMartFilter filt)
{
AjPStr filterkey = NULL;
AjPStr filterval = NULL;
const AjPStr atableval = NULL;
const AjPStr acolumnval = NULL;
const AjPStr ftableval = NULL;
const AjPStr fcolumnval = NULL;
const AjPStr nameval = NULL;
AjPTable ftab ... | false | false | false | false | false | 0 |
clearAll()
{
qDeleteAll(m_sortedByBeginList);
m_sortedByBeginList.clear();
m_sortedByEndList.clear();
m_RetrievedDates.clear();
if (m_propagateEvents)
Q_EMIT reset();
} | false | false | false | false | false | 0 |
convertCharacterSet(const OFString &fromCharset,
const OFString &toCharset,
const OFBool transliterate,
const OFBool updateCharset,
const OFBool discardIlle... | false | false | false | false | false | 0 |
gnumeric_create_popup_menu (GnumericPopupMenuElement const *elements,
GnumericPopupMenuHandler handler,
gpointer user_data,
int display_filter, int sensitive_filter,
GdkEventButton *event)
{
char const *trans;
GSList *menu_stack = NULL;
GtkWidget *menu, *item;
menu = gtk_menu_new ();
f... | false | false | false | true | false | 1 |
PyvtkCellLocator_FindCellsAlongLine(PyObject *self, PyObject *args)
{
vtkPythonArgs ap(self, args, "FindCellsAlongLine");
vtkObjectBase *vp = ap.GetSelfPointer(self, args);
vtkCellLocator *op = static_cast<vtkCellLocator *>(vp);
double temp0[3];
double save0[3];
const int size0 = 3;
double temp1[3];
do... | false | false | false | false | false | 0 |
sha1_array_for_each_unique(struct sha1_array *array,
for_each_sha1_fn fn,
void *data)
{
int i;
if (!array->sorted)
sha1_array_sort(array);
for (i = 0; i < array->nr; i++) {
if (i > 0 && !hashcmp(array->sha1[i], array->sha1[i-1]))
continue;
fn(array->sha1[i], data);
}
} | false | false | false | false | false | 0 |
filterbank_psy_smooth(FilterBank *bank, float *ps, float *mask)
{
/* Low freq slope: 14 dB/Bark*/
/* High freq slope: 9 dB/Bark*/
/* Noise vs tone: 5 dB difference */
/* FIXME: Temporary kludge */
float bark[100];
int i;
/* Assumes 1/3 Bark resolution */
float decay_low = 0.34145f;
float deca... | false | false | false | false | true | 1 |
gdb_flush_waypt_queue(queue* Q)
{
queue* elem, *tmp;
QUEUE_FOR_EACH(Q, elem, tmp) {
waypoint* wpt = (waypoint*)elem;
dequeue(elem);
if (wpt->extra_data) {
xfree(wpt->extra_data);
}
waypt_free(wpt);
}
} | false | false | false | false | false | 0 |
waitForFinished(int msecs)
{
QMutexLocker ml(&d_ptr->mutex);
if (!d_ptr->manager) {
d_ptr->error = QLandmarkManager::BadArgumentError;
d_ptr->errorString = "No manager assigned to landmark request object";
qWarning() << d_ptr->errorString;
return false;
}
QLandmarkManage... | false | false | false | false | false | 0 |
brasero_task_ctx_get_average (GSList **values, gdouble value)
{
const unsigned int scale = 10000;
unsigned int num = 0;
gdouble average;
gint32 int_value;
GSList *l;
if (value * scale < G_MAXINT)
int_value = (gint32) ceil (scale * value);
else if (value / scale < G_MAXINT)
int_value = (gint32) ceil (-1.0 * ... | false | false | false | false | false | 0 |
bc_handle_current_id(xmmsv_t *val, void *userdata)
{
if (xmmsv_get_int(val, ¤t_id) &&
xmms2ctrl_get_error() != ERROR_CONNECTION) {
xmmsc_result_t *res2;
res2 = xmmsc_medialib_get_info(connection, current_id);
xmmsc_result_notifier_set(res2, n_media_lib_get_info, ¤t_id);
xmmsc_result_unref(res2)... | false | false | false | false | false | 0 |
set_address(const std::string &hostname, const std::string &port)
{
memset(&hints, 0, sizeof(hints));
hints.ai_flags = 0; // For now
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
if (info)
{
freeaddrinfo(info);
info = NULL;
}
int error = getaddrinfo(hostname.c_str(), port.c_str(), &hints, ... | false | false | false | false | false | 0 |
connman_proxy_driver_unregister(struct connman_proxy_driver *driver)
{
GSList *list;
DBG("driver %p name %s", driver, driver->name);
driver_list = g_slist_remove(driver_list, driver);
for (list = lookup_list; list; list = list->next) {
struct proxy_lookup *lookup = list->data;
if (lookup->proxy == driver)
... | false | false | false | false | false | 0 |
getTCS_W(const char* name, GIOP::Version v)
{
omniCodeSet::Base* cs;
omniCodeSet::TCS_W* tcs;
for (cs = tcs_w_head(); cs; cs = cs->pd_next) {
tcs = (omniCodeSet::TCS_W*)cs;
if (omni::strMatch(cs->name(), name) &&
versionMatch(tcs->giopVersion(), v))
return tcs;
}
return 0;
} | false | false | false | false | false | 0 |
RecvFrom(
wxSockAddress &addr, void* buf, wxUint32 nBytes )
{
wxMutexLocker lock(m_socketLocker);
m_lastUDPOperation = UDP_OPERATION_RECV_FROM;
if (m_proxyTCPSocket.GetUseProxy()) {
if (m_udpSocketOk) {
char *bufUDP = NULL;
if (nBytes + PROXY_UDP_MAXIMUM_OVERHEAD > PROXY_BUFFER_SIZE) {
bufUDP = new char... | false | false | false | false | false | 0 |
operator<< (ostream& os, GammaMatrix g) {
os << left << setprecision(2);
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) os << setw(20) << g(i,j);
os << "\n";
}
return os;
} | false | false | false | false | false | 0 |
gegl_instrument (const gchar *parent_name,
const gchar *name,
long usecs)
{
Timing *iter;
Timing *parent;
if (root == NULL)
{
root = g_slice_new0 (Timing);
root->name = g_strdup (parent_name);
}
parent = timing_find (root, parent_name);
if (... | false | false | false | false | false | 0 |
missing_required_fields (const DatabaseInfo database, PR *pr, ErrorDesc *err)
{
int cnt = 0;
FieldList fields = getRequiredInputFields(database);
while (fields != NULL)
{
const char *fldval = get_field_value (pr, NULL, fields->ent, NULL, NULL);
if (value_is_empty (fldval))
{
setError (... | false | false | false | false | false | 0 |
shrink41(uint8_t *dst, int dst_wrap,
const uint8_t *src, int src_wrap,
int width, int height)
{
int w;
const uint8_t *s;
uint8_t *d;
for(;height > 0; height--) {
s = src;
d = dst;
for(w = width;w > 0; w--) {
d[0] = (s[0] + s[... | false | false | false | false | false | 0 |
cli_jsonbool_nojson(const char* key, int i)
{
nojson_func("nojson: %s: %s\n", key, i ? "true" : "false");
return CL_SUCCESS;
} | false | false | false | false | false | 0 |
qla4xxx_set_model_info(struct scsi_qla_host *ha)
{
uint16_t board_id_string[8];
int i;
int size = sizeof(ha->nvram->isp4022.boardIdStr);
int offset = offsetof(struct eeprom_data, isp4022.boardIdStr) / 2;
for (i = 0; i < (size / 2) ; i++) {
board_id_string[i] = rd_nvram_word(ha, offset);
offset += 1;
}
memc... | false | true | false | false | false | 1 |
fuse_setattr (xlator_t *this, fuse_in_header_t *finh, void *msg)
{
struct fuse_setattr_in *fsi = msg;
fuse_private_t *priv = NULL;
fuse_state_t *state = NULL;
GET_STATE (this, finh, state);
if (fsi->valid & FATTR_FH &&
!(fsi->valid & (FATTR_ATIME|FATTR_MTIME))) {
... | false | false | false | false | false | 0 |
runClicked()
{
if ((mExecutor != NULL) && (mExecutor->getQProcess()->state() == QProcess::Running))
{
mExecutor->terminate();
QMessageBox::warning(this, "dasdisup",
"dasdisup operation was aborted at user's request",
QMessageBox::Ok,
QMessageBox::NoButton);
mExecutor = NULL;
ui.runButton->setText("Ru... | false | false | false | false | false | 0 |
draw_circle_changed(FitControls *controls)
{
FitArgs *args;
GwyGraphCurveModel *cmodel;
gdouble *xd, *yd;
gboolean ok; /* XXX: ignored */
gint i, j, n, res=100;
gdouble *param;
GwyCDLine *func;
args = controls->args;
n = gwy_cdline_get_nparams(args->fitfunc);
param = g_newa(gd... | false | false | false | false | false | 0 |
simplex_vector_integral_grad(f_info)
struct qinfo *f_info;
{ int i,m,j,k,jj;
REAL value = 0.0;
REAL val[MAXCOORD];
REAL derivs[MAXCOORD][MAXCOORD];
MAT2D(mat,MAXCOORD,MAXCOORD);
REAL sign = (get_fattr(f_info->id) & NEGBOUNDARY) ? -1.0 : 1.0;
for ( m = 0 ; m < gauss2D_num ; m++ )
{ REAL weight = sign*gaus... | false | false | false | false | false | 0 |
valid_pos( gint x, gint y, gint jugador )
{
if( (!vacio(x,y,jugador)) && (!vacio(x+1,y+1,jugador)) )
return FALSE;
if( (!vacio(x+1,y,jugador)) && (!vacio(x,y+1,jugador)) )
return FALSE;
return TRUE;
} | false | false | false | false | false | 0 |
xevalhook(void)
{
LVAL expr,newehook,newahook,newenv,oldenv,oldfenv,olddenv,val;
/* protect some pointers */
xlstkcheck(3);
xlsave(oldenv);
xlsave(oldfenv);
xlsave(newenv);
/* get the expression, the new hook functions and the environment */
expr = xlgetarg();
newehook = xlgetarg()... | false | false | false | false | false | 0 |
state_change(struct gfs2_glock *gl, unsigned int new_state)
{
int held1, held2;
held1 = (gl->gl_state != LM_ST_UNLOCKED);
held2 = (new_state != LM_ST_UNLOCKED);
if (held1 != held2) {
GLOCK_BUG_ON(gl, __lockref_is_dead(&gl->gl_lockref));
if (held2)
gl->gl_lockref.count++;
else
gl->gl_lockref.count--;
... | false | false | false | false | false | 0 |
db_parse(MYSQL_ROW &r) {
int i=0;
clear();
create_time = atof(r[i++]);
vda_file_id = atoi(r[i++]);
host_id = atoi(r[i++]);
strcpy2(physical_file_name, r[i++]);
present_on_host = (atoi(r[i++]) != 0);
transfer_in_progress = (atoi(r[i++]) != 0);
transfer_wait = (atoi(r[i++]) != 0);
... | false | false | false | false | false | 0 |
runnerError(const QByteArray &line)
{
QByteArray lineCopy = line;
if (lineCopy.endsWith("\n"))
lineCopy.chop(1);
emit output(lineCopy);
} | false | false | false | false | false | 0 |
leaf_function_p (void)
{
rtx insn;
rtx link;
if (current_function_profile || profile_arc_flag)
return 0;
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
{
if (GET_CODE (insn) == CALL_INSN
&& ! SIBLING_CALL_P (insn))
return 0;
if (GET_CODE (insn) == INSN
&& GET_CODE (PATTERN... | false | false | false | false | false | 0 |
trace_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
struct iovec *vector, int32_t count,
off_t offset, uint32_t flags, struct iobref *iobref, dict_t *xdata)
{
if (trace_fop_names[GF_FOP_WRITE].enabled) {
gf_log (this->name, GF_LOG_INFO,
... | false | false | false | false | false | 0 |
draw_ascii(int dx, int dy, char digit)
{
char *source = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ- ";
int idx = strchr(source, digit) - source;
int x, y;
/* handle "space" here */
if (idx == 37)
return;
for (y = 0; y < 7; y++) {
for (x = 0; x < 6; x++) {
int src = font_data[(y * 222 + x) + ... | false | false | false | false | false | 0 |
search(sp)
register struct searcher *sp;
{
register of_t dest;
register of_t value;
of_t val; /* buffer for value (can't fread register) */
register of_t place;
if (sp->aborted)
return(NOTFOUND);
for (;;) {
/* determine location to be examined */
place = sp->place;
if (sp->seen) {
/* go to next loca... | false | false | false | false | true | 1 |
panel_modules_ensure_extension_points_registered (void)
{
static gboolean registered_extensions = FALSE;
GIOExtensionPoint *ep;
if (!registered_extensions) {
registered_extensions = TRUE;
ep = g_io_extension_point_register (PANEL_APPLETS_MANAGER_EXTENSION_POINT_NAME);
g_io_extension_point_set_required_type (... | false | false | false | false | false | 0 |
japi_add_grammar(int sd, char *prefixpath)
{
/* file existing check */
if (check_grammar_path(prefixpath) < 0) return;
/* send data */
/* do_send(sd, "ADDGRAM\n"); */
/* send data with its name */
snprintf(buf, MAXLINELEN, "ADDGRAM %s\n", prefixpath);
do_send(sd, buf);
send_grammar(sd, prefixpath);
} | false | false | false | false | false | 0 |
initializeMECorrection(ShowerTreePtr tree, double & initial,
double & final) {
systems_.clear();
for(map<ShowerProgenitorPtr,ShowerParticlePtr>::const_iterator
cit=tree->incomingLines().begin();cit!=tree->incomingLines().end();++cit) {
if(QuarkMatcher::Check(cit->first->progenitor()->data())) {
... | false | false | false | false | false | 0 |
xlog_grant_add_space(
struct xlog *log,
atomic64_t *head,
int bytes)
{
int64_t head_val = atomic64_read(head);
int64_t new, old;
do {
int tmp;
int cycle, space;
xlog_crack_grant_head_val(head_val, &cycle, &space);
tmp = log->l_logsize - space;
if (tmp > bytes)
space += bytes;
else {
spa... | false | false | false | false | false | 0 |
p54_find_ie(struct sk_buff *skb, u8 ie)
{
struct ieee80211_mgmt *mgmt = (void *)skb->data;
u8 *pos, *end;
if (skb->len <= sizeof(mgmt))
return NULL;
pos = (u8 *)mgmt->u.beacon.variable;
end = skb->data + skb->len;
while (pos < end) {
if (pos + 2 + pos[1] > end)
return NULL;
if (pos[0] == ie)
return... | false | false | false | false | true | 1 |
static_vectors (GtkWidget *widget, void *data)
{
gamgi_window *window = GAMGI_CAST_WINDOW data;
GtkWidget *dialog = window->dialog0;
GtkWidget *combo;
gamgi_enum lattice, vectors;
int row;
/***************************************************
* this is not necessary but prevents a O3 warning *
***********************... | false | false | false | false | false | 0 |
GAUpdateParameters(int *Parameters[],
int *ParamCount,
char *Option,
char *CtrlStrCopy,
char *CtrlStr,
int *argc,
char ***argv) {
int i, BooleanTrue = Option[2] != '-';
if (Option[0] != '-') {
... | false | false | false | false | false | 0 |
istrnvis(char *dst, size_t *dlen, const char *src, int flag)
{
char *extra = NULL;
int rv;
MAKEEXTRALIST(flag, extra, "");
if (!extra) {
if (dlen && *dlen == 0) {
errno = ENOSPC;
return -1;
}
*dst = '\0'; /* can't create extra, return "" */
return 0;
}
rv = istrsnvis(dst, dlen, src, flag, extra);
... | false | false | false | false | false | 0 |
_copy_line (const char **s, char *buf, size_t buf_len)
{
int x = 0;
const char *st = *s;
while (*st && x < buf_len-1)
{
buf[x++] = *st;
if (*st++ == '\n') break;
}
buf[x] = '\0';
*s = st;
return x;
} | false | false | false | false | false | 0 |
mark_live(struct fa *fa) {
int changed;
F(mark_reachable(fa));
list_for_each(s, fa->initial) {
s->live = s->reachable && s->accept;
}
do {
changed = 0;
list_for_each(s, fa->initial) {
if (! s->live && s->reachable) {
for_each_trans(t, s) {
... | false | false | false | false | false | 0 |
sampled_data_finish(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
gs_sampled_data_enum *penum = senum;
/* Build a type 0 function using the given parameters */
gs_function_Sd_params_t * params =
(gs_function_Sd_params_t *)&penum->pfn->params;
gs_function_t * pfn;
ref cref; /* closure */
int... | false | false | false | false | false | 0 |
error_callback(jsonsl_t jsn,
jsonsl_error_t err,
struct jsonsl_state_st *state,
char *errat)
{
/* Error callback. In theory, this can return a true value
* and maybe 'correct' and seek ahead of the buffer, and try to
* do some correction.
*/
... | false | false | false | false | false | 0 |
pcie_init(struct pcie_device *dev)
{
struct controller *ctrl;
u32 slot_cap, link_cap;
struct pci_dev *pdev = dev->port;
ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
if (!ctrl) {
dev_err(&dev->device, "%s: Out of memory\n", __func__);
goto abort;
}
ctrl->pcie = dev;
pcie_capability_read_dword(pdev, PCI_EXP_SL... | false | false | false | false | false | 0 |
UTI_IPToString(IPAddr *addr)
{
unsigned long a, b, c, d, ip;
uint8_t *ip6;
char *result;
result = NEXT_BUFFER;
switch (addr->family) {
case IPADDR_UNSPEC:
snprintf(result, BUFFER_LENGTH, "[UNSPEC]");
break;
case IPADDR_INET4:
ip = addr->addr.in4;
a = (ip>>24) & 0xff;
b =... | false | false | false | false | false | 0 |
run() {
try {
while(1) {
client_socket = server_socket.accept();
handle_client();
}
}
catch(const std::exception& e) {
cout << e.what() << endl;
}
} | false | false | false | false | false | 0 |
insert_promoters( ae_list<ae_rna*>** promoters_to_insert )
{
ae_list_node<ae_rna*>* rna_node = NULL;
ae_list_node<ae_rna*>* rna_node_to_insert = NULL;
// -- LEADING --
if ( promoters_to_insert[LEADING]->get_nb_elts() > 0 )
{
// Get to the right position in individual's list (first promoter ... | false | false | false | false | false | 0 |
KfwumManualRollback(struct ipmi_intf * intf)
{
tKFWUM_Status status = KFWUM_STATUS_OK;
struct ipmi_rs * rsp;
struct ipmi_rq req;
struct KfwumManualRollbackReq thisReq;
memset(&req, 0, sizeof(req));
req.msg.netfn = IPMI_NETFN_FIRMWARE;
req.msg.cmd = KFWUM_CMD_ID_MANUAL_ROLLBACK;
thi... | false | false | false | false | false | 0 |
PrintSelf(ostream& os, vtkIndent indent)
{
//Superclass typedef defined in vtkTypeMacro() found in vtkSetGet.h
this->Superclass::PrintSelf(os,indent);
if ( this->ImageActor )
{
os << indent << "Image Actor: " << this->ImageActor << "\n";
}
else
{
os << indent << "Image Actor: (none)\n";
... | false | false | false | false | false | 0 |
gwy_set_data_preview_size(GwyDataView *data_view,
gint max_size)
{
GwyContainer *container;
GwyDataField *data_field;
GwyPixmapLayer *layer;
gdouble zoomval, scale, xreal, yreal;
gboolean realsquare;
gint xres, yres;
const gchar *prefix;
gchar *key;
g_retur... | false | false | false | false | false | 0 |
startProcessInternal(int argc, const char *argv[], bool waitAndExit, bool directly)
{
fprintf(stderr, "KCrash: Attempting to start %s %s\n", argv[0], directly ? "directly" : "from kdeinit");
pid_t pid = directly ? startDirectly(argv) : startFromKdeinit(argc, argv);
if (pid > 0 && waitAndExit) {
//... | false | false | false | false | false | 0 |
search_register_reslimits( void )
{
int rc1, rc2, rc3;
rc1 = slapi_reslimit_register( SLAPI_RESLIMIT_TYPE_INT,
"nsSizeLimit" , &sizelimit_reslimit_handle );
rc2 = slapi_reslimit_register( SLAPI_RESLIMIT_TYPE_INT,
"nsTimeLimit", &timelimit_reslimit_handle );
rc3 = slapi_re... | false | false | false | false | false | 0 |
add_viscosity_explicit_flux (FttCell * cell, FluxPar * p)
{
FttCellFace f;
FttCellNeighbors n;
GfsGradient g = { 0., 0. };
gdouble v0;
if (GFS_IS_MIXED (cell)) {
if (((cell)->flags & GFS_FLAG_DIRICHLET) != 0)
g.b = gfs_cell_dirichlet_gradient_flux (cell, p->v->i, -1., 0.);
}
v0 = GFS_VARIABLE ... | 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.