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 |
|---|---|---|---|---|---|---|
SendNotification(const QSharedPointer<ISender> &to,
const QString &method, const QVariant &data)
{
int id = IncrementId();
QVariantList container = Request::BuildNotification(id, method, data);
QByteArray msg;
QDataStream stream(&msg, QIODevice::WriteOnly);
stream << container;
qDebug(... | false | false | false | false | false | 0 |
pg_euctw2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
{
int cnt = 0;
while (len > 0 && *from)
{
if (*from == SS2 && len >= 4) /* code set 2 */
{
from++;
*to = (((uint32) SS2) << 24) | (*from++ << 16);
*to |= *from++ << 8;
*to |= *from++;
len -= 4;
}
else if (*from == SS3... | false | false | false | false | false | 0 |
jerasure_bitmatrix_decode(int k, int m, int w, int *bitmatrix, int row_k_ones, int *erasures,
char **data_ptrs, char **coding_ptrs, int size, int packetsize)
{
int i;
int *erased;
int *decoding_matrix;
int *dm_ids;
int edd, *tmpids, lastdrive;
erased = jerasure_erasures_to_era... | false | true | false | false | false | 1 |
UpdateChunks() {
const int iEntrySize = 12; // 12 bytes per connection block
pArticulationCk->Resize(HeaderSize + Connections * iEntrySize);
uint8_t* pData = (uint8_t*) pArticulationCk->LoadChunkData();
store16(&pData[0], HeaderSize);
store16(&pData[2], Connections);
for ... | false | false | false | false | false | 0 |
ui_teardown(char *cmd)
{
char name[81];
struct sa *sa;
if (sscanf(cmd, "t %80s", name) != 1) {
log_print("ui_teardown: command \"%s\" malformed", cmd);
return;
}
LOG_DBG((LOG_UI, 10, "ui_teardown: teardown connection \"%s\"", name));
connection_teardown(name);
while ((sa = sa_lookup_by_name(... | true | true | false | false | false | 1 |
getnormal(u16 x, u16 y, f32 s) const
{
const f32 zc = get(x, y);
f32 zl, zr, zu, zd;
if (x == 0)
{
zr = get(x + 1, y);
zl = zc + zc - zr;
}
else if (x == Width - 1)
{
zl = get(x - 1, y);
zr = zc + zc - zl;
}
else
{
zr = get(x + 1, y);
zl = get(x - 1, y);
}
... | false | false | false | false | false | 0 |
init_varasm_once (void)
{
section_htab = htab_create_ggc (31, section_entry_hash,
section_entry_eq, NULL);
object_block_htab = htab_create_ggc (31, object_block_entry_hash,
object_block_entry_eq, NULL);
const_desc_htab = htab_create_ggc (1009, const_desc_hash,
const_desc_eq, NULL);
sh... | false | false | false | false | false | 0 |
gmpc_mpddata_model_playlist_get_total_playtime (GmpcMpdDataModelPlaylist * self, unsigned long * loaded_songs, unsigned long * total_time)
{
#line 1020 "gmpc-mpddata-model-playlist.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Model:Playlist::get_total_playtime"
#line 506 "gmpc-mpddata-model-playlist.gob"
g_return_if_fail... | false | false | false | false | false | 0 |
iwl_mvm_request_statistics(struct iwl_mvm *mvm, bool clear)
{
struct iwl_statistics_cmd scmd = {
.flags = clear ? cpu_to_le32(IWL_STATISTICS_FLG_CLEAR) : 0,
};
struct iwl_host_cmd cmd = {
.id = STATISTICS_CMD,
.len[0] = sizeof(scmd),
.data[0] = &scmd,
.flags = CMD_WANT_SKB,
};
int ret;
ret = iwl_mvm_se... | false | false | false | false | false | 0 |
cbf_reverse_bitcodes (cbf_compress_data *data)
{
unsigned int node, endcode, codes, count, index [2][2], bit [2];
endcode = 1 << data->bits;
codes = endcode + data->maxbits + 1;
/* Reverse the order of the bits in the code */
for (node = 0; node < codes; node++)
... | false | false | false | false | false | 0 |
undoNeighbourUpdates(neighbourUpdate *nu)
{
simplex **thisPtr;
simplex *thisSimplex;
// We use isEmpty, because the pointers might sometimes be NULL.
while (!isEmpty(nu->ptrs))
{
thisPtr = pop(nu->ptrs);
thisSimplex = pop(nu->old);
if (thisPtr)
*thisPtr = thisSimplex;
}
} | false | false | false | false | false | 0 |
qla1280_exit(void)
{
int i;
pci_unregister_driver(&qla1280_pci_driver);
/* release any allocated firmware images */
for (i = 0; i < QL_NUM_FW_IMAGES; i++) {
release_firmware(qla1280_fw_tbl[i].fw);
qla1280_fw_tbl[i].fw = NULL;
}
} | false | false | false | false | false | 0 |
ajoute(tab, tab_lg, val)
type_i tab[];
type_l tab_lg;
type_i val;
{
register int i, j;
for (i = 0; i < tab_lg; i++) {
if (tab[i] == (type_i) - 1) { /* ici, la valeur est mise a la fin de la zone */
tab[i] = val;
break;
}
... | false | false | false | false | false | 0 |
Convolve(const RNScalar filter[3][3])
{
// Make temporary copy of grid
R2Grid copy(*this);
// Mark boundaries unknown
for (int i = 0; i < XResolution(); i++) {
SetGridValue(i, 0, R2_GRID_UNKNOWN_VALUE);
SetGridValue(i, YResolution()-1, R2_GRID_UNKNOWN_VALUE);
}
for (int j = 0; j < YReso... | false | false | false | false | false | 0 |
new_rt_env(unsigned size)
{
Var *ret;
unsigned i;
if (size <= NUM_READY_VARS && ready_size_rt_envs) {
ret = ready_size_rt_envs;
ready_size_rt_envs = ret[0].v.list;
} else
ret = mymalloc(MAX(size, NUM_READY_VARS) * sizeof(Var), M_RT_ENV);
for (i = 0; i < size; i++)
ret[i].type = TYPE_NONE;
... | false | false | false | false | false | 0 |
str_catenate(string_ty *s1, string_ty *s2)
{
static char *tmp;
static size_t tmplen;
string_ty *s;
size_t length;
length = s1->str_length + s2->str_length;
if (tmplen < length)
{
tmplen = length;
tmp = mem_change_size(tmp, tmplen);
}
memcpy(tmp, ... | false | true | false | false | false | 1 |
tg3_chk_missed_msi(struct tg3 *tp)
{
u32 i;
for (i = 0; i < tp->irq_cnt; i++) {
struct tg3_napi *tnapi = &tp->napi[i];
if (tg3_has_work(tnapi)) {
if (tnapi->last_rx_cons == tnapi->rx_rcb_ptr &&
tnapi->last_tx_cons == tnapi->tx_cons) {
if (tnapi->chk_msi_cnt < 1) {
tnapi->chk_msi_cnt++;
r... | false | false | false | false | false | 0 |
Set_HSL(T_Palette start_palette, T_Palette end_palette, byte color, short diff_h, short diff_s, short diff_l)
{
byte h, s, l;
RGB_to_HSL(start_palette[color].R,start_palette[color].G,start_palette[color].B,&h,&s,&l);
// La teinte (Hue) est cyclique
h=(diff_h+256+h);
// Pour les autres (Saturation, L... | false | false | false | false | false | 0 |
next_eqe_sw(struct mthca_eq *eq)
{
struct mthca_eqe *eqe;
eqe = get_eqe(eq, eq->cons_index);
return (MTHCA_EQ_ENTRY_OWNER_HW & eqe->owner) ? NULL : eqe;
} | false | false | false | false | false | 0 |
regbranch(flagp)
int *flagp;
{
char_u *ret;
char_u *chain = NULL;
char_u *latest;
int flags;
*flagp = WORST | HASNL; /* Tentatively. */
ret = regnode(BRANCH);
for (;;)
{
latest = regconcat(&flags);
if (latest == NULL)
return NULL;
/* If one of the branches has width, the... | false | false | false | false | false | 0 |
devmajorminor_create_file(struct visor_device *dev, const char *name,
int major, int minor)
{
int maxdevnodes = ARRAY_SIZE(dev->devnodes) / sizeof(dev->devnodes[0]);
struct devmajorminor_attribute *myattr = NULL;
int x = -1, rc = 0, slot = -1;
register_devmajorminor_attributes(dev);
for (slot = 0; slot < max... | false | false | false | false | false | 0 |
connman_service_get_nameservers(struct connman_service *service)
{
if (service == NULL)
return NULL;
if (service->nameservers_config != NULL)
return g_strdupv(service->nameservers_config);
else if (service->nameservers != NULL ||
service->nameservers_auto != NULL) {
int len = 0, len_auto = 0, i;
char *... | false | false | false | false | false | 0 |
InsChar(lineno, col, num, new)
int lineno,
col,
num;
char *new;
{
register char *sp1,
*sp2, /* To push over the array. */
*sp3; /* Last character to push over. */
int i;
i_set(lineno, 0);
sp2 = Curline->s_roof + num;
if (sp2 > cursend) {
i_set(lineno, CO - num - 1);
cl_eol();
sp2 = cursend;
}
Cur... | false | false | false | false | true | 1 |
emit_status_for_each_line (const gchar *line, gpointer user_data)
{
GcrRecord *record;
if (g_str_has_prefix (line, "[GNUPG:] ")) {
_gcr_debug ("received status line: %s", line);
line += 9;
} else {
g_message ("gnupg status record was not prefixed appropriately: %s", line);
return;
}
record = _gcr_record_... | false | false | false | false | false | 0 |
gck_object_get_async (GckObject *self,
const gulong *attr_types,
guint n_attr_types,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
GetAttributes *args;
guint i;
g_return_if_... | false | false | false | false | false | 0 |
test_attr_lookup__from_buffer(void)
{
git_attr_file *file;
struct attr_expected cases[] = {
{ "abc", "foo", EXPECT_TRUE, NULL },
{ "abc", "bar", EXPECT_TRUE, NULL },
{ "abc", "baz", EXPECT_TRUE, NULL },
{ "aaa", "foo", EXPECT_TRUE, NULL },
{ "aaa", "bar", EXPECT_UNDEFINED, NULL },
{ "aaa", "baz", EXPECT_... | false | false | false | false | false | 0 |
evrpc_request_done(struct evrpc_req_generic *rpc_state)
{
struct evhttp_request *req;
struct evrpc *rpc;
EVUTIL_ASSERT(rpc_state);
req = rpc_state->http_req;
rpc = rpc_state->rpc;
if (rpc->reply_complete(rpc_state->reply) == -1) {
/* the reply was not completely filled in. error out */
goto error;
}
if... | false | false | false | false | false | 0 |
checkObjectDimensions() {
GLEDevice* psdev = g_get_device_ptr();
double x0 = 0.0;
double y0 = 0.0;
double x1 = (double)psdev->getBoundingBox()->getX()/PS_POINTS_PER_INCH*CM_PER_INCH;
double y1 = (double)psdev->getBoundingBox()->getY()/PS_POINTS_PER_INCH*CM_PER_INCH;
for (vector<TeXObject*>::size_type i = 0; i < m... | false | false | false | false | false | 0 |
remove(Focusable &win) {
// if the window isn't already in this list, we could send a bad signal
bool contained = contains(win);
m_signal_map.erase(&win);
if (!contained) {
return;
}
m_list.remove(&win);
m_removesig.emit(&win);
} | false | false | false | false | false | 0 |
save_articleinfo_all()
{
ArticleHashIterator it = m_hash_article->begin();
for( ; it != m_hash_article->end(); ++it ) ( *it )->save_info( false );
} | false | false | false | false | false | 0 |
twlreg_read(struct twlreg_info *info, unsigned slave_subgp, unsigned offset)
{
u8 value;
int status;
status = twl_i2c_read_u8(slave_subgp,
&value, info->base + offset);
return (status < 0) ? status : value;
} | false | false | false | false | false | 0 |
alarms_remove_from_to_list(unsigned int unique_id)
{
struct jp_alarms *temp_alarm, *prev_alarm, *next_alarm;
#ifdef ALARMS_DEBUG
printf("remove from list(%d)\n", unique_id);
#endif
for(prev_alarm=NULL, temp_alarm=alarm_list;
temp_alarm;
temp_alarm=next_alarm) {
if (temp_alarm->unique_id==u... | false | false | false | false | false | 0 |
makescalar(Object o)
{
Array va,sa;
if (!(va = (Array)DXGetComponentValue((Field)o,"data")))
return ERROR;
if (!(sa = DXScalarConvert((Array)va)))
return ERROR;
if (!DXSetComponentValue((Field)o,"data",(Object)sa))
return ERROR;
return OK;
} | false | false | false | false | false | 0 |
dispose (GObject *object)
{
CutLoaderPrivate *priv = CUT_LOADER_GET_PRIVATE(object);
if (priv->so_filename) {
g_free(priv->so_filename);
priv->so_filename = NULL;
}
if (priv->elf_loader) {
g_object_unref(priv->elf_loader);
priv->elf_loader = NULL;
}
if (priv->m... | false | false | false | false | false | 0 |
delete_folder_cb(GtkAction *action, gpointer data)
{
FolderView *folderview = (FolderView *)data;
GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
FolderItem *item;
gchar *message, *name;
AlertValue avalue;
gchar *old_id;
if (!folderview->selected) return;
item = gtk_cmctree_node_get_row_data(ctree, folder... | false | false | false | false | false | 0 |
end_glyphout(void)
{
#if defined(ASCIIGRAPH) && !defined(NO_TERMS)
if (GFlag) {
GFlag = false;
graph_off();
}
#endif
#ifdef TEXTCOLOR
if(ttyDisplay->color != NO_COLOR) {
term_end_color();
ttyDisplay->color = NO_COLOR;
}
#endif
} | false | false | false | false | false | 0 |
openPopupMenu(bool notify)
{
// no popup? or already open...
if (d_popup == 0 || d_opened)
return;
d_popupOpening = false;
d_popupClosing = false;
// should we notify ?
// if so, and we are attached to a menu bar or popup menu, we let it handle the "activation"
Window* p = d_ownerL... | false | false | false | false | false | 0 |
onHomePressed(GtkWidget *widget _U_, GdkEventKey *event,
gpointer data _U_)
{
GtkWindow *window;
DBG_fprintf(stderr, "Gtk Interactive: get key pressed.\n");
if(event->keyval == GDK_KEY_Home)
{
window = visu_ui_getRenderWindow();
g_return_val_if_fail(window, FALSE);
/* We raised the... | false | false | false | false | false | 0 |
rtnl_send_check(struct rtnl_handle *rth, const void *buf, int len)
{
struct nlmsghdr *h;
int status;
char resp[1024];
status = send(rth->fd, buf, len, 0);
if (status < 0)
return status;
/* Check for immediate errors */
status = recv(rth->fd, resp, sizeof(resp), MSG_DONTWAIT|MSG_PEEK);
if (status < 0) {
if... | true | true | false | false | false | 1 |
pk_write_key_pem( pk_context *key, unsigned char *buf, size_t size )
{
int ret;
unsigned char output_buf[4096];
const char *begin, *end;
size_t olen = 0;
if( ( ret = pk_write_key_der( key, output_buf, sizeof(output_buf) ) ) < 0 )
return( ret );
#if defined(POLARSSL_RSA_C)
if( pk_get_ty... | true | true | false | false | false | 1 |
delhost_by_handle(char *handle, char *host)
{
struct userrec *u;
struct list_type *q, *qnext, *qprev;
struct user_entry *e = NULL;
int i = 0;
u = get_user_by_handle(userlist, handle);
if (!u)
return 0;
q = get_user(&USERENTRY_HOSTS, u);
qprev = q;
if (q) {
if (!rfc_casecmp(q->extra, host)) {
... | false | false | false | false | false | 0 |
tree_find_path(tree_t* root, tree_t* child) {
tree_t* temp;
g_assert(child && root);
for (temp = child; temp; temp = temp->parent) {
if (temp->parent == root) return temp;
}
return NULL;
} | false | false | false | false | false | 0 |
qlafx00_soft_reset(scsi_qla_host_t *vha)
{
struct qla_hw_data *ha = vha->hw;
if (unlikely(pci_channel_offline(ha->pdev) &&
ha->flags.pci_channel_io_perm_failure))
return;
ha->isp_ops->disable_intrs(ha);
qlafx00_soc_cpu_reset(vha);
} | false | false | false | false | false | 0 |
zip_init_write (GsfOutput *output)
{
GsfOutfileZip *zip = GSF_OUTFILE_ZIP (output);
GsfZipDirent *dirent;
int ret;
if (zip->root->writing) {
g_warning ("Already writing to another stream in archive");
return FALSE;
}
if (!gsf_output_wrap (G_OBJECT (output), zip->sink))
return FALSE;
dirent = zip_di... | false | false | false | false | false | 0 |
ast2obj_alias(void* _o)
{
alias_ty o = (alias_ty)_o;
PyObject *result = NULL, *value = NULL;
if (!o) {
Py_INCREF(Py_None);
return Py_None;
}
result = PyType_GenericNew(alias_type, NULL, NULL);
if (!result) return NULL;
value = ast2... | false | false | false | false | false | 0 |
gth_file_source_set_cancellable (GthFileSource *file_source,
GCancellable *cancellable)
{
_g_object_unref (file_source->priv->cancellable);
file_source->priv->cancellable = NULL;
if (cancellable != NULL)
file_source->priv->cancellable = g_object_ref (cancellable);
} | false | false | false | false | false | 0 |
open( HidOut * hout, t_CKINT device_num )
{
// see if port not already open
if( device_num >= (t_CKINT)the_phouts.capacity() || !the_phouts[device_num] )
{
// allocate
PhyHidDevOut * phout = new PhyHidDevOut;
// resize?
if( device_num >= (t_CKINT)the_phouts.capacity() )
... | false | false | false | false | false | 0 |
need_format_setup(MAILSTREAM *stream)
{
return(sp_icache_flags(stream) & SP_NEED_FORMAT_SETUP);
} | false | false | false | false | false | 0 |
grbSzip(int filetype, unsigned char *gribbuffer, size_t gribbuffersize)
{
size_t nbytes = 0;
unsigned char *buffer;
size_t buffersize;
static int lszip_warn = 1;
buffersize = gribbuffersize + 1000; /* compressed record can be greater than source record */
buffer = (unsigned char *) malloc(buffersize);
/... | false | false | false | false | false | 0 |
execute() {
BScreen *screen = Fluxbox::instance()->mouseScreen();
if (screen == 0)
return;
std::string resourcename = screen->name() + ".strftimeFormat";
CommandDialog *dialog = new CommandDialog(*screen, "Edit Clock Format",
... | false | false | false | false | false | 0 |
paintEvent(QPaintEvent* event)
{
QLineEdit::paintEvent(event);
if (!hasFocus() && text().isEmpty() && !m_hintText.isEmpty())
{
QPainter painter(this);
painter.setPen(palette().brush(QPalette::Disabled, QPalette::Text).color());
QStyleOptionFrameV2 option;
initStyleOption(&option);
QRect contentsRect = s... | false | false | false | false | false | 0 |
search_gui_cmp_owned(const struct result_data *a, const struct result_data *b)
{
const guint32 mask = SR_OWNED | SR_SHARED;
return SEARCH_GUI_CMP(a, b, record->flags & mask);
} | false | false | false | false | false | 0 |
font(const char *font_)
{
initFont();
Font fid=printFontID(font_);
if (fid!=0&&fid!=printFontIDHashTable().notFound())
{
fontID(fid);
fontString(font_);
}
return fid;
} | false | false | false | false | false | 0 |
GetCol(MatrixRowCol& mrc)
{
// do not allow StoreHere
if (+(mrc.cw*StoreHere))
Throw(InternalException("SymmetricBandMatrix::GetCol(MatrixRowCol&)"));
int c=mrc.rowcol; int w1 = lower_val+1; mrc.length=nrows_val;
REPORT
int s = c-lower_val; int o = c*w1;
if (s<0) { w1 += s; o -= s; s = 0; }
... | false | false | false | false | false | 0 |
mould_filter(GwyContainer *data,
gint id,
gpointer user_data)
{
GwyDataObjectId *object = (GwyDataObjectId*)user_data;
return data != object->data || id != object->id;
} | false | false | false | false | false | 0 |
xxfopen(char *name, char *mode, char bin_asc)
{
register FILE *ret;
ret = fopen(name,mode);
if(ret == NULL) panic("Error in opening file",name,strerror(errno));
#if defined(HAVE_SETMODE) && defined(WIN32)
if(bin_asc == 'a') setmode(fileno(ret),O_TEXT);
if(bin_asc == 'b') setmode(fileno(ret),O_BINA... | false | false | false | false | false | 0 |
hashnum (const Table *t, lua_Number n) {
unsigned int a[numints];
int i;
n += 1; /* normalize number (avoid -0) */
lua_assert(sizeof(a) <= sizeof(n));
memcpy(a, &n, sizeof(a));
for (i = 1; i < numints; i++) a[0] += a[i];
return hashmod(t, a[0]);
} | false | false | false | false | false | 0 |
qtdemux_dump_dref (GstQTDemux * qtdemux, GstByteReader * data, int depth)
{
guint32 ver_flags = 0, num_entries = 0, i;
if (!gst_byte_reader_get_uint32_be (data, &ver_flags) ||
!gst_byte_reader_get_uint32_be (data, &num_entries))
return FALSE;
GST_LOG ("%*s version/flags: %08x", depth, "", ver_flags);... | false | false | false | false | false | 0 |
sgetline(char **line, size_t *linesize, size_t *linelen, struct sock *sp)
{
char *lp = *line;
if (sp->s_rsz < 0) {
sclose(sp);
return sp->s_rsz;
}
do {
if (*line == NULL || lp > &(*line)[*linesize - 128]) {
size_t diff = lp - *line;
*line = srealloc(*line, *linesize += 256);
lp = &(*line)[diff];
}... | true | true | false | false | true | 1 |
load_cursors(void)
{
enum cursor_type cursor;
int frame;
SDL_Surface *pSurf;
pStd_Cursor = SDL_GetCursor();
pSurf = create_surf_alpha(1, 1, SDL_SWSURFACE);
pDisabledCursor = SurfaceToCursor(pSurf, 0, 0);
FREESURFACE(pSurf);
for (cursor = 0; cursor < CURSOR_LAST; cursor++) {
for (frame = 0; fr... | false | false | false | false | false | 0 |
coq_kind_of_closure(value v) {
opcode_t * c;
int res;
int is_app = 0;
c = Code_val(v);
if (Is_instruction(c, GRAB)) return Val_int(0);
if (Is_instruction(c, RESTART)) {is_app = 1; c++;}
if (Is_instruction(c, GRABREC)) return Val_int(1+is_app);
if (Is_instruction(c, MAKEACCU)) return Val_int(3);
return... | false | false | false | false | false | 0 |
UnhighlightBorder(w)
Widget w ;
#else
UnhighlightBorder(Widget w)
#endif /* _NO_PROTO */
{
XmPrimitiveWidget pw = (XmPrimitiveWidget) w ;
pw->primitive.highlighted = False ;
pw->primitive.highlight_drawn = False ;
if(XtWidth( w) == 0 || XtHeight( w) == 0 ||
pw->primitive.highlight_thickness ... | false | false | false | false | false | 0 |
add_memory_region(const char* name, size_t namelen,
unsigned int attributes,
Expression* start, Expression* length)
{
if (this->memory_regions_ == NULL)
this->memory_regions_ = new Memory_regions();
else if (this->find_memory_region(name, namelen))
{
gold_error(_("region '%.*s' already d... | false | false | false | false | false | 0 |
ast_rtp_instance_new(const char *engine_name,
struct ast_sched_context *sched, const struct ast_sockaddr *sa,
void *data)
{
struct ast_sockaddr address = {{0,}};
struct ast_rtp_instance *instance = NULL;
struct ast_rtp_engine *engine = NULL;
AST_RWLIST_RDLOCK(&engines);
/* If an engine name was specified try... | false | false | false | false | false | 0 |
__ecereMethod___ecereNameSpace__ecere__com__Array_GetFirst(struct __ecereNameSpace__ecere__com__Instance * this)
{
struct __ecereNameSpace__ecere__com__Array * __ecerePointer___ecereNameSpace__ecere__com__Array = (struct __ecereNameSpace__ecere__com__Array *)(this ? (((char *)this) + 12) : 0);
return (struct __ecereNa... | false | false | false | true | false | 1 |
gen_split_2218 (rtx curr_insn ATTRIBUTE_UNUSED, rtx *operands)
{
rtx operand0;
rtx operand1;
rtx operand2;
rtx operand3;
rtx operand4;
rtx operand5;
rtx _val = 0;
start_sequence ();
#line 9395 "../../src/gcc/config/arm/arm.md"
{
rtx tmp1;
enum machine_mode mode = SELECT_CC_MODE (GET_CODE (operands[1... | false | false | false | false | false | 0 |
may_assign_reg_p (rtx x)
{
return (GET_MODE (x) != VOIDmode
&& GET_MODE (x) != BLKmode
&& can_copy_p (GET_MODE (x))
&& (!REG_P (x)
|| !HARD_REGISTER_P (x)
|| REGNO_REG_CLASS (REGNO (x)) != NO_REGS));
} | false | false | false | false | false | 0 |
rr_dump(struct net_device *dev)
{
struct rr_private *rrpriv;
struct rr_regs __iomem *regs;
u32 index, cons;
short i;
int len;
rrpriv = netdev_priv(dev);
regs = rrpriv->regs;
printk("%s: dumping NIC TX rings\n", dev->name);
printk("RxPrd %08x, TxPrd %02x, EvtPrd %08x, TxPi %02x, TxCtrlPi %02x\n",
rea... | false | false | false | false | false | 0 |
pushElement(OpenElement *e)
{
ContentState::pushElement(e);
pcdataRecovering_ = 0;
// the start tag of this element may have been implied by data
// inside a cdata or rcdata marked section
if (markedSectionSpecialLevel_ == 0) {
currentMode_ = contentMode();
if (e->requiresSpecialParse()) {
speci... | false | false | false | false | false | 0 |
stmt_interesting_for_vrp (gimple stmt)
{
if (gimple_code (stmt) == GIMPLE_PHI
&& is_gimple_reg (gimple_phi_result (stmt))
&& (INTEGRAL_TYPE_P (TREE_TYPE (gimple_phi_result (stmt)))
|| POINTER_TYPE_P (TREE_TYPE (gimple_phi_result (stmt)))))
return true;
else if (is_gimple_assign (stmt) || is_gimpl... | false | false | false | false | false | 0 |
probe_monster(mtmp)
struct monst *mtmp;
{
struct obj *otmp;
mstatusline(mtmp);
if (notonhead) return; /* don't show minvent for long worm tail */
#ifndef GOLDOBJ
if (mtmp->minvent || mtmp->mgold) {
#else
if (mtmp->minvent) {
#endif
for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj)
otmp->dknown = 1; /* t... | false | false | false | false | false | 0 |
update_view_title(struct view *view)
{
char buf[SIZEOF_STR];
char state[SIZEOF_STR];
size_t bufpos = 0, statelen = 0;
assert(view_is_displayed(view));
if (view != VIEW(REQ_VIEW_STATUS) && view->lines) {
unsigned int view_lines = view->offset + view->height;
unsigned int lines = view->lines
? MIN(view_... | false | false | false | false | false | 0 |
pk_time_get_gradient (PkTimeItem *item1, PkTimeItem *item2)
{
gfloat dy;
gfloat dx;
if (item1->time == item2->time)
return 0;
dy = (gfloat) (item1->percentage - item2->percentage);
dx = (gfloat) (item1->time - item2->time);
return dy/dx;
} | false | false | false | false | false | 0 |
krb5_cc_get_lifetime(krb5_context context, krb5_ccache id, time_t *t)
{
krb5_cc_cursor cursor;
krb5_error_code ret;
krb5_creds cred;
time_t now, endtime = 0;
*t = 0;
now = time(NULL);
ret = krb5_cc_start_seq_get(context, id, &cursor);
if (ret)
return ret;
while ((ret = krb5_cc_ne... | false | false | false | false | false | 0 |
H5FL_fac_calloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
{
void *ret_value; /* Pointer to object to return */
/* NOINIT OK here because this must be called after H5FL_fac_init -NAF */
FUNC_ENTER_NOAPI_NOINIT
/* Double check parameters */
HDassert(head);
/* Allocate the block */
if ... | false | false | false | false | false | 0 |
replace_item(GlyphIndex index, MenuItem* item) {
MenuImpl& i = *impl_;
if (index >= 0 && index < i.itemlist_.count()) {
MenuItem* mi = i.itemlist_.item(index);
i.itemlist_.remove(index);
Resource::ref(item);
i.itemlist_.insert(index, item);
replace(index, item->body());
Resource::unref(mi);
... | false | false | false | false | false | 0 |
_gcr_certificate_extension_subject_key_identifier (GBytes *data,
gsize *n_keyid)
{
GNode *asn = NULL;
gpointer result;
g_return_val_if_fail (data != NULL, NULL);
asn = egg_asn1x_create_and_decode (pkix_asn1_tab, "SubjectKeyIdentifier", data);
if (asn == NULL)
... | false | false | false | false | false | 0 |
delete_after(struct llist *target, int pos, int length)
{
struct llist *result;
struct list_elem *elem;
int i, n;
result = create_llist();
if (NULL == result) return NULL;
if (-1 == pos) {
elem = target->head;
result->head = target->head;
for (n = length; n > 1; n--) /* not 0 */
elem = elem->next;
r... | false | false | false | false | false | 0 |
ComputeGroupLength(vtkPolyData* input, int branchGroupId)
{
double groupLength = 0.0;
vtkDataArray* groupIdsArray = input->GetCellData()->GetArray(this->GroupIdsArrayName);
int numberOfCells = input->GetNumberOfCells();
double lengthWeightSum = 0.0;
for (int i=0; i<numberOfCells; i++)
{
int groupI... | false | false | false | false | false | 0 |
dead_file_copy_scan_deferred(gfarm_ino_t inum, struct host *host,
int (*filter)(struct dead_file_copy *, gfarm_ino_t, struct host *),
const char *diag)
{
struct dead_file_copy *dfc;
time_t now = time(NULL);
int busy;
enum dead_file_copy_state state;
gfarm_mutex_lock(&dfc_allq.mutex, diag, "lock");
/* giant_lo... | false | false | false | false | false | 0 |
sdl_WindowFree(sdl_Window* window)
{
if (window->surface)
{
SDL_FreeSurface(window->surface);
sdl_ButtonBankFree(&window->buttons);
sdl_FontFree(&window->font);
WIPE(window, sdl_Window);
}
} | false | false | false | false | false | 0 |
bnxt_alloc_hwrm_resources(struct bnxt *bp)
{
struct pci_dev *pdev = bp->pdev;
bp->hwrm_cmd_resp_addr = dma_alloc_coherent(&pdev->dev, PAGE_SIZE,
&bp->hwrm_cmd_resp_dma_addr,
GFP_KERNEL);
if (!bp->hwrm_cmd_resp_addr)
return -ENOMEM;
bp->hwrm_dbg_resp_addr = dma_alloc_coherent(&pdev->dev,
... | false | false | false | false | false | 0 |
asyncShutdownFinished()
{
IPlugin *plugin = qobject_cast<IPlugin *>(sender());
Q_ASSERT(plugin);
asynchronousPlugins.removeAll(plugin->pluginSpec());
if (asynchronousPlugins.isEmpty())
shutdownEventLoop->exit();
} | false | false | false | false | false | 0 |
buildin_goto(struct script_state *st)
{
if( st->stack->stack_data[st->start+2].type!=C_POS ){
printf("buildin_goto: not label !\n");
st->state=END;
return 0;
}
st->pos = conv_num(st,& (st->stack->stack_data[st->start+2]));
st->state = GOTO;
return 0;
} | false | false | false | false | false | 0 |
sim_open(sim_fetch_func_t fetch_func,
sim_store_func_t store_func,
void *user_data)
{
struct sim_device *dev = malloc(sizeof(*dev));
if (!dev) {
pr_error("can't allocate memory for simulation");
return NULL;
}
memset(dev, 0, sizeof(*dev));
dev->base.max_breakpoints = DEVICE_MAX_BREAKPOINTS;
dev->ba... | false | false | false | false | false | 0 |
nv3_get_param(nv3_fifo_info *res_info, nv3_sim_state * state, nv3_arb_info *ainfo)
{
int done, g,v, p;
done = 0;
for (p=0; p < 2; p++)
{
for (g=128 ; g > 32; g= g>> 1)
{
for (v=128; v >=32; v = v>> 1)
{
ainfo->priority = p;
ain... | false | false | false | false | false | 0 |
annPlaneSplit( // split points by a plane
ANNpointArray pa, // points to split
ANNidxArray pidx, // point indices
int n, // number of points
int d, // dimension along which to split
ANNcoord cv, // cutting value
int &br1, // first break (values < cv)
int &br2) // second ... | false | false | false | false | false | 0 |
end(GB_DRAW *d)
{
gDraw *dr = DR(d);
GB.Unref(POINTER(&(EXTRA(d)->font)));
EXTRA(d)->font = NULL;
delete dr;
} | false | false | false | false | false | 0 |
_xml_name_dump_cb(void *data,
Eina_Simple_XML_Type type,
const char *value,
unsigned offset __UNUSED__,
unsigned length)
{
Name_Dump *dump = data;
if (!dump) return EINA_FALSE;
switch (type)
{
case EINA_SIMPLE_XML_OPEN:
... | false | false | false | false | false | 0 |
SECMOD_CreateModule(const char *library, const char *moduleName,
const char *parameters, const char *nss)
{
SECMODModule *mod = secmod_NewModule();
char *slotParams,*ciphers;
/* pk11pars.h still does not have const char * interfaces */
char *nssc = (char *)nss;
if (mod == NULL) return NULL;
... | false | false | false | false | false | 0 |
stream_read(STREAM *stream, char *buffer, int len)
{
/*if ((stream->common.mode & ST_READ) == 0)
THROW(E_ACCESS);*/
CHECK_enter();
if (sigsetjmp(CHECK_jump, TRUE) == 0)
memmove(buffer, stream->memory.addr + stream->memory.pos, len);
CHECK_leave();
if (CHECK_got_error())
{
errno = EIO;
... | false | false | false | false | false | 0 |
hub_port_connect_change(struct usb_hub *hub, int port1,
u16 portstatus, u16 portchange)
__must_hold(&port_dev->status_lock)
{
struct usb_port *port_dev = hub->ports[port1 - 1];
struct usb_device *udev = port_dev->child;
int status = -ENODEV;
dev_dbg(&port_dev->dev, "status %04x, change %04x, %s\n", portstat... | false | false | false | false | false | 0 |
trie_delete2(trie_t * t, trie_node_t * node) {
item_t * i;
trie_node_t * n;
assert(t);
if ( list_length(&node->children) == 0 ) {
if (node != t->root) {
list_remove2(&node->item);
t->delete_node(node);
node = NULL;
}
return TRIE_OK;
} else {
i = node->children.head;
while (i) {
n = list_ent... | false | false | false | false | false | 0 |
bus_engine_proxy_set_cursor_location (BusEngineProxy *engine,
gint x,
gint y,
gint w,
gint h)
{
g_assert (BUS_IS_ENGINE_... | false | false | false | false | false | 0 |
gen_floatunssidf2 (rtx operand0,
rtx operand1)
{
rtx operand2;
rtx operand3;
rtx operand4;
rtx operand5;
rtx _val = 0;
start_sequence ();
{
rtx operands[6];
operands[0] = operand0;
operands[1] = operand1;
#line 5890 "../../src/gcc/config/rs6000/rs6000.md"
{
if (TARGET_E500_DOUBLE)
{
... | false | false | false | false | false | 0 |
length_ProxyPolicy(const ProxyPolicy *data)
{
size_t ret = 0;
{
size_t Top_tag_oldret = ret;
ret = 0;
ret += der_length_oid(&(data)->policyLanguage);
ret += 1 + der_length_len (ret);
ret += Top_tag_oldret;
}
if((data)->policy){
size_t Top_tag_oldret = ret;
ret = 0;
ret += der_length_octet_string((data)->policy);
ret +=... | false | false | false | false | false | 0 |
sc_func_map_in (GnmConventions const *conv, Workbook *scope,
char const *name, GnmExprList *args)
{
static struct {
char const *sc_name;
char const *gnm_name;
} const sc_func_renames[] = {
{ "AVG", "AVERAGE" },
{ "DTR", "RADIANS" },
{ "FABS", "ABS" },
{ "COLS", "COLUMNS" },
{ "AVG", "AVER... | false | false | false | false | false | 0 |
find_usable_indexes(PlannerInfo *root, RelOptInfo *rel,
List *clauses, List *outer_clauses,
bool istoplevel, RelOptInfo *outer_rel,
SaOpControl saop_control)
{
Relids outer_relids = outer_rel ? outer_rel->relids : NULL;
bool possibly_useful_pathkeys = has_useful_pathkeys(root, rel);
List *result ... | false | false | false | false | false | 0 |
es_newStr(es_size_t lenhint)
{
es_str_t *s;
/* we round length to a multiple of 8 in the hope to reduce
* memory fragmentation.
*/
if(lenhint & 0x07)
lenhint = lenhint - (lenhint & 0x07) + 8;
if((s = malloc(sizeof(es_str_t) + lenhint)) == NULL)
goto done;
# ifndef NDEBUG
/*s->objID = ES_STRING_OID;*/
# e... | false | false | false | false | false | 0 |
btrfs_add_delayed_iput(struct inode *inode)
{
struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info;
struct delayed_iput *delayed;
if (atomic_add_unless(&inode->i_count, -1, 1))
return;
delayed = kmalloc(sizeof(*delayed), GFP_NOFS | __GFP_NOFAIL);
delayed->inode = inode;
spin_lock(&fs_info->delayed_i... | 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.