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 |
|---|---|---|---|---|---|---|
copy_stream(FILE * source, FILE * destination) {
unsigned char buffer[8192];
for (;;) {
int bytes_read = fread(buffer, 1, sizeof(buffer), source);
if (bytes_read == 0) {
break;
}
fwrite(buffer, 1, bytes_read, destination);
}
} | false | false | false | false | true | 1 |
expose_event_cb(GdkEventExpose *event) {
if (!_line_numbers) {
return false;
}
// TODO: Should we connect/disconnect this when needed since the spell
// is handled by an idle worker ??
#ifndef ENABLE_HIGHLIGHT
Glib::RefPtr<Gdk::Window> wl = _text_view.get_window(numbers_left);
#endif
Glib::RefPtr<Gdk::W... | false | false | false | false | false | 0 |
print_PaletteInfo(
int32 ri_id,
int32 num_pals, /* number of palettes, currently only 1 */
FILE *fp )
{
int32 pal_id = FAIL,
pal_index,
data_type,
n_comps,
n_entries,
interlace_mode;
intn status, ret_value = SUCCEED;
/* Check the number of ... | false | false | false | false | false | 0 |
nvkm_fb_tile_prog(struct nvkm_fb *fb, int region, struct nvkm_fb_tile *tile)
{
struct nvkm_device *device = fb->subdev.device;
if (fb->func->tile.prog) {
fb->func->tile.prog(fb, region, tile);
if (device->gr)
nvkm_engine_tile(&device->gr->engine, region);
if (device->mpeg)
nvkm_engine_tile(device->mpeg, r... | false | false | false | false | false | 0 |
yconnection()
{
Vector<int> elements1, elements2;
int connector = 0;
const char *epos[5], *last_element_pos = next_pos();
Lexeme t;
while (true) {
// get element
elements2.clear();
if (!yelement(elements2, !elements1.empty(), epos)) {
yconnection_check_useless(elements1, true, epos + 3, tru... | false | false | false | false | false | 0 |
if_usb_resume(struct usb_interface *intf)
{
struct if_usb_card *cardp = usb_get_intfdata(intf);
struct lbs_private *priv = cardp->priv;
lbs_deb_enter(LBS_DEB_USB);
if_usb_submit_rx_urb(cardp);
lbs_resume(priv);
lbs_deb_leave(LBS_DEB_USB);
return 0;
} | false | false | false | false | false | 0 |
print_binder_node(struct seq_file *m, struct binder_node *node)
{
struct binder_ref *ref;
struct binder_work *w;
int count;
count = 0;
hlist_for_each_entry(ref, &node->refs, node_entry)
count++;
seq_printf(m, " node %d: u%016llx c%016llx hs %d hw %d ls %d lw %d is %d iw %d",
node->debug_id, (u64)node->p... | false | false | false | false | false | 0 |
MovePassConstraintsToRule(std::vector<GdlExpression *> & m_vpexpPassConstr)
{
for (size_t ipexp = 0; ipexp < m_vpexpPassConstr.size(); ipexp++)
{
m_vpexpConstraints.push_back(m_vpexpPassConstr[ipexp]->Clone());
}
} | false | false | false | false | false | 0 |
debug_calloc(const char *file, unsigned line, const char *function,
size_t count, size_t size )
{
void *ptr = debug_malloc( file, line, function, count * size );
if( ptr )
memset( ptr, 0, count * size );
return ptr;
} | false | false | false | false | false | 0 |
actopen (regnum)
int regnum; /* ACT Catalog region number */
{
FILE *fcat;
struct StarCat *sc;
int lfile, lpath;
char *actfile;
char *path; /* Full pathname for catalog file */
/* static int actsize(); */
char *cdpath;
/* Set the pathname using the appropriate ACT CDROM directory */
... | false | false | false | false | false | 0 |
onVpnTaskTimeout()
{
// qDebug() << "ConnectionManager::onVpnTaskTimeout()";
if (m_fIsExecuting)
{
m_pConnectionInformation->appendLogColorText(QColor(255, 0, 0), "Last command timed out\n");
m_fIsExecuting = !m_pVPNControlTask->stop(1000);
if ((m_pState->isState(ConnectionState::Connecting... | false | false | false | false | false | 0 |
lua_touserdata(lua_State *L, int idx)
{
cTValue *o = index2adr(L, idx);
if (tvisudata(o))
return uddata(udataV(o));
else if (tvislightud(o))
return lightudV(o);
else
return NULL;
} | false | false | false | false | false | 0 |
group_count_function_read(struct ast_channel *chan, const char *cmd,
char *data, char *buf, size_t len)
{
int ret = -1;
int count = -1;
char group[80] = "", category[80] = "";
ast_app_group_split_group(data, group, sizeof(group), category,
sizeof(category));
/* If no group has been provided let's ... | true | true | false | false | false | 1 |
find_subtable (GSList * subtables, guint8 table_id, guint16 subtable_extension)
{
GSList *tmp;
/* FIXME: Make this an array ! */
for (tmp = subtables; tmp; tmp = tmp->next) {
MpegTSPacketizerStreamSubtable *sub =
(MpegTSPacketizerStreamSubtable *) tmp->data;
if (sub->table_id == table_id
... | false | false | false | false | false | 0 |
spl_array_object_count_elements(zval *object, long *count TSRMLS_DC) /* {{{ */
{
spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
if (intern->fptr_count) {
zval *rv;
zend_call_method_with_0_params(&object, intern->std.ce, &intern->fptr_count, "count", &rv);
if (rv) ... | false | false | false | false | false | 0 |
InsertsGivenNodeIndex(CM_t *cm, int nd, int *ret_i1, int *ret_i2)
{
int i1 = -1;
int i2 = -1;
int v = cm->nodemap[nd];
switch (cm->ndtype[nd]) {
case MATP_nd: i1 = v+4; i2 = v+5; break;
case MATL_nd: i1 = v+2; break;
case MATR_nd: i1 = v+2; break;
case BEGR_nd: i1 = v+1; break;
case ROOT_nd: i1... | false | false | false | false | false | 0 |
Copy_String_NQ(char *s)
{ int l,i,j=0;
char *res;
l=strlen(s);
res=(char *)mem_malloc((l-1)*sizeof(char));
for(i=0;i<=l;i++) if (s[i]!='"') res[j++]=s[i];
return res;
} | false | false | false | false | false | 0 |
ui_status(uih_context * uih)
{
if (statuswindow == NULL) {
statuswindow =
uih_registerw(uih, ui_statuspos, ui_drawstatus, NULL, 0);
} else {
uih_removew(uih, statuswindow);
statuswindow = NULL;
}
ui_updatemenus(uih, "status");
ui_updatemenus(uih, "animministatus")... | false | false | false | false | false | 0 |
_synctex_log_input(synctex_node_t node) {
printf("%s",synctex_node_isa(node));
printf(":%i",SYNCTEX_TAG(node));
printf(",%s",SYNCTEX_NAME(node));
printf(" SYNCTEX_SIBLING:%p",(void *)SYNCTEX_SIBLING(node));
} | false | false | false | false | false | 0 |
resolve_symlink(fname, buf)
char_u *fname;
char_u *buf;
{
char_u tmp[MAXPATHL];
int ret;
int depth = 0;
if (fname == NULL)
return FAIL;
/* Put the result so far in tmp[], starting with the original name. */
vim_strncpy(tmp, fname, MAXPATHL - 1);
for (;;)
{
/* Limit symlink... | false | false | false | false | false | 0 |
ipc_bufpool_new(int size)
{
struct ipc_bufpool* pool;
int totalsize;
/* there are memories for two struct SOCKET_MSG_HEAD
* one for the big message, the other one for the next
* message. This code prevents allocating
* <big memory> <4k> <big memory><4k> ...
* from happening when a client sends big messages
... | false | false | false | false | true | 1 |
bch_compute(GHashTable *bch, char_type *pattern, int m, gboolean case_sens)
{
for (int i = 0; i < m - 1; ++i)
bch_set_value(bch, CHARTYPE_CASE(pattern[i], case_sens), m-i-1);
} | false | false | false | false | false | 0 |
command_default(struct iptables_command_state *cs,
struct xtables_globals *gl)
{
struct xtables_rule_match *matchp;
struct xtables_match *m;
if (cs->target != NULL &&
(cs->target->parse != NULL || cs->target->x6_parse != NULL) &&
cs->c >= cs->target->option_offset &&
cs->c < cs->target->option_... | false | false | false | false | false | 0 |
parse_config_file(char *map, size_t len)
{
int *end = (int *) (map + len);
/* start at +1, so that p can never be < map */
int *m = (int *) map + 1;
char *p, *q;
for (; m < end; m++) {
if (*m == INT_CONF) { p = (char *) m ; goto conf; }
if (*m == INT_ONFI) { p = (char *) m-1; goto conf; }
if (*m == INT_N... | false | false | false | false | false | 0 |
emit_quadratic (PathParseState *state)
{
double values[4];
skip_spaces (state);
while (parse_values (state, 4, values)) {
if (state->relative) {
values[0] += state->lastx;
values[1] += state->lasty;
values[2] += state->lastx;
values[3] += state->lasty;
}
go_path_curve_to (state->path,
... | false | false | false | false | false | 0 |
mkd_sub_e_h(GWindow gw, GEvent *event) {
MathKernDlg *mkd = (MathKernDlg *) ((CharViewBase *) GDrawGetUserData(gw))->container;
switch ( event->type ) {
case et_expose:
MKDDraw(mkd,gw,event);
break;
case et_resize:
if ( event->u.resize.sized )
MKDSubResize(mkd,event);
break;
... | false | false | false | false | false | 0 |
_wrap_goo_canvas_convert_bounds_to_item_space(PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "item", "bounds", NULL };
PyGObject *item;
PyObject *py_bounds;
if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!O!:GooCanvas.convert_bounds_to_item_space", kwlist, &PyGooCanvasI... | false | false | false | false | false | 0 |
test_dict_deflate(compr, comprLen)
Byte *compr;
uLong comprLen;
{
z_stream c_stream; /* compression stream */
int err;
c_stream.zalloc = (alloc_func)0;
c_stream.zfree = (free_func)0;
c_stream.opaque = (voidpf)0;
err = deflateInit(&c_stream, Z_BEST_COMPRESSION);
CHECK_ERR(err, "defl... | false | false | false | false | false | 0 |
default_button_create_value(char *title, GtkWidget *hbox,
GapArrArg *arr_ptr, t_arr_interface *arrint_ptr,
t_all_arr_args *arr_all)
{
GtkWidget *button;
button = gtk_button_new_from_stock (GIMP_STOCK_RESET); /*button = gtk_button_new_with_label (title)... | false | false | false | false | false | 0 |
get_digest(EVP_PKEY *pkey, char *out)
{
int r = 1;
crypto_pk_t *pk = _crypto_new_pk_from_rsa(EVP_PKEY_get1_RSA(pkey));
if (pk) {
r = crypto_pk_get_digest(pk, out);
crypto_pk_free(pk);
}
return r;
} | false | false | false | false | false | 0 |
ensAttributeadaptorFetchAllbySeqregion(
EnsPAttributeadaptor ata,
const EnsPSeqregion sr,
const AjPStr code,
AjPList attributes)
{
char *txtcode = NULL;
AjBool result = AJFALSE;
AjPStr statement = NULL;
if (!ata)
return ajFalse;
if (!sr)
return ajFalse;
if (!... | false | false | false | false | false | 0 |
wiiproto_req_rumble(struct wiimote_data *wdata, __u8 rumble)
{
__u8 cmd[2];
rumble = !!rumble;
if (rumble == !!(wdata->state.flags & WIIPROTO_FLAG_RUMBLE))
return;
if (rumble)
wdata->state.flags |= WIIPROTO_FLAG_RUMBLE;
else
wdata->state.flags &= ~WIIPROTO_FLAG_RUMBLE;
cmd[0] = WIIPROTO_REQ_RUMBLE;
cmd[... | false | false | false | false | false | 0 |
NET_SDL_InitClient(void)
{
int p;
if (initted)
return true;
//!
// @category net
// @arg <n>
//
// Use the specified UDP port for communications, instead of
// the default (2342).
//
p = M_CheckParmWithArgs("-port", 1);
if (p > 0)
port = atoi(myargv[p+1]);... | false | false | false | false | false | 0 |
OnMotion (Canvas *canvas, GdkEventMotion *event)
{
Item *item = NULL;
canvas->m_LastEventState = event->state;
double x = event->x / canvas->m_Zoom, y = event->y / canvas->m_Zoom;
if (canvas->m_Root->Distance (x, y, &item) > canvas->m_Gap)
item = NULL;
ItemClient *client = (item)? item->GetClient (): NULL;
retu... | false | false | false | false | false | 0 |
sens_timeout_init(void) {
int i;
struct tmouts *gen;
// set NULL pointers in tmout_h table and init
memset(&tmout_h, 0, HASH_SIZE * sizeof(struct tmouts));
i = 0;
while(i < HASH_SIZE){
gen = &tmout_h[i];
gen->prev_hash = gen;
gen->next_hash = gen;
i++;
}
// generate free nodes list
free_start->next_... | false | false | false | false | false | 0 |
setUpRadioButtons()
{
clustal = new QCheckBox("CLUSTAL format tree");
percIdentMat = new QCheckBox("% identity matrix");
phylip = new QCheckBox("Phylip format tree");
phylipDistMat = new QCheckBox("Phylip distance matrix");
nexus = new QCheckBox("Nexus format tree");
if(clustalw::userParame... | false | false | false | false | false | 0 |
writeDate ()
{
static const String DATE("DATE");
int status(0);
makeThisCurrent();
if (fits_write_date(fitsPointer(),&status)) throw FitsError(status);
FITSUtil::auto_array_ptr<char> pDate(new char[FLEN_KEYWORD]);
FITSUtil::auto_array_ptr<char> pDateComment(new char[FLEN_COMMENT]);
char* d... | false | false | false | false | false | 0 |
soap_serialize(struct soap *soap) const
{
#ifndef WITH_NOIDREF
if (this->__ptr && !soap_array_reference(soap, this, (struct soap_array*)&this->__ptr, 1, SOAP_TYPE_ns__List))
for (int i = 0; i < this->__size; i++)
{
soap_serialize_PointerTons__Object(soap, this->__ptr + i);
}
#endif
} | false | false | false | false | false | 0 |
is_matching_response(struct fcp_transaction *transaction,
const void *response, size_t length)
{
const u8 *p1, *p2;
unsigned int mask, i;
p1 = response;
p2 = transaction->response_buffer;
mask = transaction->response_match_bytes;
for (i = 0; ; ++i) {
if ((mask & 1) && p1[i] != p2[i])
return false;
m... | false | false | false | false | false | 0 |
pvlist(struct einfo *ep, int nitems,
Type type, Category category,
int rank, int *shape, Pointer value, int itemsize)
{
int i;
if (EndCheck(ep))
return;
sprintf(ep->mp, "{ "); while(*ep->mp) ep->mp++;
for (i=0; i<nitems; i++) {
pvalue(... | false | true | false | false | false | 1 |
i_stage1(cdrom_paranoia_t *p, c_block_t *p_new,
void (*callback)(long int, paranoia_cb_mode_t))
{
long size=cs(p_new);
c_block_t *ptr=c_last(p);
int ret=0;
long int begin=0;
long int end;
#if TRACE_PARANOIA & 1
long int block_count = 0;
fprintf(stderr,
"Verifying block %ld:[%ld-%ld] against previou... | false | false | false | false | false | 0 |
img_update_realloc(unsigned long size)
{
unsigned char *image_update_buffer = NULL;
unsigned long rc;
unsigned long img_buf_phys_addr;
int ordernum;
int dma_alloc = 0;
/*
* check if the buffer of sufficient size has been
* already allocated
*/
if (rbu_data.image_update_buffer_size >= size) {
/*
* che... | false | false | false | false | false | 0 |
ipmi_ctx_set_flags (ipmi_ctx_t ctx, unsigned int flags)
{
unsigned int flags_mask = (IPMI_FLAGS_NONBLOCKING
| IPMI_FLAGS_NOSESSION
| IPMI_FLAGS_DEBUG_DUMP
| IPMI_FLAGS_NO_VALID_CHECK
| IPMI_FLAGS_NO_LEGAL_CHECK
| IPMI_FLAGS_IGNORE_AUTHE... | false | false | false | false | false | 0 |
call_blocking_read(gpointer user_data)
{
GAtIO *io = user_data;
while (can_write_data(io->channel, G_IO_OUT, io) == TRUE);
write_watcher_destroy_notify(io);
return FALSE;
} | false | false | false | false | false | 0 |
remoteop_chown(const char *path, uid_t uid, gid_t gid)
{
int res;
char *p;
if (discofs_options.copyattr & COPYATTR_NO_OWNER)
uid = -1;
if (discofs_options.copyattr & COPYATTR_NO_GROUP)
gid = -1;
if (uid == -1 && gid == -1)
return 0;
p = remote_path(path);
if (!p)
... | false | false | false | false | true | 1 |
initialSolve()
{
OsiClpSolverInterface::initialSolve();
int secondaryStatus = modelPtr_->secondaryStatus();
if (modelPtr_->status() == 0 && (secondaryStatus == 2 || secondaryStatus == 4))
modelPtr_->cleanup(1);
if (isProvenOptimal() && modelPtr_->numberColumns() == quadraticModel_->numberColumns... | false | false | false | false | false | 0 |
InsertSetSides(
vtkIntArray* refs, int otyp, int obj, SetInfoType* sinfo )
{
static const int sideCellTypes[] =
{
VTK_EMPTY_CELL, // don't support any cells with 0 nodes per side
VTK_VERTEX,
VTK_LINE,
VTK_TRIANGLE,
VTK_QUAD,
VTK_EMPTY_CELL, // don't support any cells with 5 nodes per sid... | false | false | false | false | false | 0 |
loginInfoCallbackCancel()
{
currentCallback=NULL;
failcmd(*myimap, "Login cancelled.");
} | false | false | false | false | false | 0 |
i2400m_get_drvinfo(struct net_device *net_dev,
struct ethtool_drvinfo *info)
{
struct i2400m *i2400m = net_dev_to_i2400m(net_dev);
strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
strlcpy(info->fw_version, i2400m->fw_name ? : "",
sizeof(info->fw_version));
if (net_dev->dev.parent)
strlcpy... | false | false | false | false | false | 0 |
dm_cache_policy_register(struct dm_cache_policy_type *type)
{
int r;
/* One size fits all for now */
if (type->hint_size != 0 && type->hint_size != 4) {
DMWARN("hint size must be 0 or 4 but %llu supplied.", (unsigned long long) type->hint_size);
return -EINVAL;
}
spin_lock(®ister_lock);
if (__find_policy... | false | false | false | false | false | 0 |
miner_applications_add_directories (TrackerMinerFS *fs)
{
#ifdef HAVE_MEEGOTOUCH
TrackerIndexingTree *indexing_tree;
GFile *file;
const gchar *path;
#endif /* HAVE_MEEGOTOUCH */
const gchar * const *xdg_dirs;
const gchar *user_data_dir;
gint i;
g_message ("Setting up applications to iterate from XDG system dire... | false | false | false | false | false | 0 |
pixaScaleToSize(PIXA *pixas,
l_int32 wd,
l_int32 hd)
{
l_int32 n, i;
PIX *pix1, *pix2;
PIXA *pixad;
PROCNAME("pixaScaleToSize");
if (!pixas)
return (PIXA *)ERROR_PTR("pixas not defined", procName, NULL);
if (wd <= 0 && hd <= 0)
return (PIXA *)ER... | false | false | false | false | false | 0 |
parse_arguments(int argc, char *argv[])
{
/* basename $0 */
package = strrchr(argv[0], '/');
if (package == 0)
package = argv[0];
else
package++;
if (argc==1) {
just_print_bufsize = 1;
return;
}
if (argc < 2) {
fprintf(stderr, "usage: %s <bufsize>\n", package);
exit(9);
}
if (strspn (argv... | false | false | false | false | false | 0 |
v4l2_read_packet(AVFormatContext *s1, AVPacket *pkt)
{
struct video_data *s = s1->priv_data;
int res;
if (s->io_method == io_mmap) {
av_init_packet(pkt);
res = mmap_read_frame(s1, pkt);
} else if (s->io_method == io_read) {
if (av_new_packet(pkt, s->frame_size) < 0)
... | false | false | false | false | false | 0 |
set_noop_p (rtx set)
{
rtx src = SET_SRC (set);
rtx dst = SET_DEST (set);
if (dst == pc_rtx && src == pc_rtx)
return 1;
if (GET_CODE (dst) == MEM && GET_CODE (src) == MEM)
return rtx_equal_p (dst, src) && !side_effects_p (dst);
if (GET_CODE (dst) == SIGN_EXTRACT
|| GET_CODE (dst) == ZERO_EXTR... | false | false | false | false | false | 0 |
pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error)
{
xmlChar *rel;
GDataGDWherePrivate *priv = GDATA_GD_WHERE (parsable)->priv;
rel = xmlGetProp (root_node, (xmlChar*) "rel");
if (rel != NULL && *rel == '\0') {
xmlFree (rel);
return gdata_parser_error_r... | false | false | false | false | false | 0 |
loadMovie(const QString& name, KIconLoader::Group group, int size, QObject *parent) const
{
QString file = moviePath( name, group, size );
if (file.isEmpty())
return 0;
int dirLen = file.lastIndexOf('/');
QString icon = iconPath(name, size ? -size : group, true);
if (!icon.isEmpty() && file.... | false | false | false | false | false | 0 |
mario_draw_sprites( struct mame_bitmap *bitmap )
{
int offs;
for (offs = 0;offs < spriteram_size;offs += 4)
{
if (spriteram[offs])
{
drawgfx(bitmap,Machine->gfx[1],
spriteram[offs + 2],
(spriteram[offs + 1] & 0x0f) + 16 * palette_bank,
spriteram[offs + 1] & 0x80,spriteram[offs + 1] ... | false | false | false | false | false | 0 |
est_aidx_seq_narrow(DEPOT *db, const CBLIST *pdocs, const char *cop, int sign,
const char *oval, int osiz, const char *sval, int ssiz,
const void *regex, int onum, ESTSCORE *scores, int snum,
int limit, int *restp){
char vbuf... | false | false | false | false | false | 0 |
unity_webapps_dpkg_available_application_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
UnityWebappsDpkgAvailableApplication *app;
app = UNITY_WEBAPPS_DPKG_AVAILABLE_APPLICATION (object);
switch (prop_id)
{
case PROP_NAME:
g_valu... | false | false | false | false | false | 0 |
g_mime_filter_init (GMimeFilter *filter, GMimeFilterClass *klass)
{
filter->priv = g_new0 (struct _GMimeFilterPrivate, 1);
filter->outptr = NULL;
filter->outreal = NULL;
filter->outbuf = NULL;
filter->outsize = 0;
filter->backbuf = NULL;
filter->backsize = 0;
filter->backlen = 0;
} | false | false | false | false | false | 0 |
RequestInformation (
vtkInformation * vtkNotUsed(request),
vtkInformationVector ** vtkNotUsed( inputVector ),
vtkInformationVector *outputVector)
{
// get the info objects
vtkInformation* outInfo = outputVector->GetInformationObject(0);
int i;
double ar[3], origin[3];
int wExt[6];
wExt[0] = 0; wEx... | false | false | false | false | false | 0 |
rssyl_remove_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_path;
gchar *old_id;
item = folderview_get_selected_item(folderview);
g_return_if_f... | false | false | false | false | false | 0 |
ipv6_ip_in_arp_table(struct ipv6_context *context,
struct ipv6_addr *ip_addr,
struct mac_address *mac_addr)
{
struct ipv6_arp_entry *arp_entry;
int i;
for (i = 0; i < UIP_ARPTAB_SIZE; i++) {
arp_entry = &context->ipv6_arp_table[i];
if (IPV6_ARE_ADDR_EQUAL(&arp_entry->ip_addr, ip_addr)) {
memcpy((cha... | false | false | false | false | false | 0 |
L10__DEFMACRO__evalmacros()
{register object *base=vs_base;
register object *sup=base+VM10; VC10
vs_reserve(VM10);
check_arg(2);vs_top=sup;
{object V59=base[0]->c.c_cdr;
if(endp(V59))invalid_macro_call();
base[2]= (V59->c.c_car);
V59=V59->c.c_cdr;
if(endp(V59))invalid_macro_call();
base[3]= (V59->c.c_car);
V5... | false | false | false | false | false | 0 |
safe_write (desc, ptr, len)
int desc;
char *ptr;
int len;
{
int wcount, written;
while (len > 0) {
wcount = len;
#ifdef MAX_WRITE_LEN
if (wcount > MAX_WRITE_LEN)
wcount = MAX_WRITE_LEN;
#endif
written = write (desc, ptr, wcount);
if (written < 0)
{
#ifdef EINTR
if (errno... | false | false | false | false | false | 0 |
mboxname_lockpath(const char *mboxname)
{
static char lockresult[MAX_MAILBOX_PATH+1];
char basepath[MAX_MAILBOX_PATH+1];
const char *root = config_getstring(IMAPOPT_MBOXNAME_LOCKPATH);
int len;
if (!root) {
snprintf(basepath, MAX_MAILBOX_PATH, "%s/lock", config_dir);
root = basepath;
}
m... | false | false | false | false | false | 0 |
forward_object(CELL pointer, CELL newpointer)
{
if(pointer != newpointer)
put(UNTAG(pointer),RETAG(newpointer,GC_COLLECTED));
} | false | false | false | false | false | 0 |
calcLiveInMask(MachineBasicBlock *MBB) {
unsigned Mask = 0;
for (const auto &LI : MBB->liveins()) {
if (LI.PhysReg < X86::FP0 || LI.PhysReg > X86::FP6)
continue;
Mask |= 1 << (LI.PhysReg - X86::FP0);
}
return Mask;
} | false | false | false | false | false | 0 |
reserve_crashkernel_low(void)
{
#ifdef CONFIG_X86_64
unsigned long long base, low_base = 0, low_size = 0;
unsigned long total_low_mem;
int ret;
total_low_mem = memblock_mem_size(1UL << (32 - PAGE_SHIFT));
/* crashkernel=Y,low */
ret = parse_crashkernel_low(boot_command_line, total_low_mem, &low_size, &base);
i... | false | false | false | false | false | 0 |
addTrack( ScriptableServiceTrack * track )
{
int artistId = -1;
int genreId = -1;
TrackPtr trackPtr = TrackPtr( track );
m_collection->acquireWriteLock();
m_collection->addTrack( trackPtr );
m_collection->releaseLock();
m_trackIdCounter++;
track->setId( m_trackIdCounter );
in... | false | false | false | false | false | 0 |
watchdog_set_pulse_width(unsigned int pw)
{
int err = 0;
mutex_lock(&watchdog.lock);
if (pw <= 1) {
watchdog.pulse_val = 0;
} else if (pw <= 25) {
watchdog.pulse_val = 1;
} else if (pw <= 125) {
watchdog.pulse_val = 2;
} else if (pw <= 5000) {
watchdog.pulse_val = 3;
} else {
pr_err("pul... | false | false | false | false | false | 0 |
gs_cos_degrees(double ang)
{
double quot = ang / const_90_degrees;
if (floor(quot) == quot) {
/* See above re the following line. */
return isincos[((int)fmod(quot, 4.0) & 3) + 1];
}
return cos(ang * (M_PI / 180));
} | false | false | false | false | false | 0 |
static_level2 (gamgi_atom *atom1,
gamgi_atom *atom2, gamgi_geometry *geometry)
{
gamgi_bond *bond;
gamgi_dlist *dlist;
atom2->mark = -atom2->mark;
static_measure_length (atom1, atom2, geometry);
for (dlist = atom2->bond_start; dlist != NULL; dlist = dlist->next)
{
bond = GAMGI_CAST_BOND dlist->data;
if (bond-... | false | false | false | false | false | 0 |
amd_sched_entity_push_job(struct amd_sched_job *sched_job)
{
struct amd_sched_entity *entity = sched_job->s_entity;
trace_amd_sched_job(sched_job);
wait_event(entity->sched->job_scheduled,
amd_sched_entity_in(sched_job));
} | false | false | false | false | false | 0 |
merge_dir_config(apr_pool_t *p, void *basev, void *addv) {
cache_dir_conf *new = (cache_dir_conf *) apr_pcalloc(p, sizeof(cache_dir_conf));
cache_dir_conf *add = (cache_dir_conf *) addv;
cache_dir_conf *base = (cache_dir_conf *) basev;
new->no_last_mod_ignore = (add->no_last_mod_ignore_set == 0) ? base... | false | false | false | false | false | 0 |
ensGvvariationadaptorFetchByIdentifier(
EnsPGvvariationadaptor gvva,
ajuint identifier,
EnsPGvvariation *Pgvv)
{
/* This function needs to join the to the flanking_sequence SQL table. */
AjBool joinallele = AJFALSE;
AjBool joinflank = AJTRUE;
AjBool joinsource = AJFALSE;
AjBool result ... | false | false | false | false | false | 0 |
popLastNamed ( void )
{
int i = getLastNamedIndex ();
if (i >= 0)
{
stackIndex = i;
toDoNext = stack[i].callback;
vStringClear (stack[i].contextName);
}
else
{
/* ok, no named context found...
* (should not happen). */
stackIndex = 0;
toDoNext = &globalScope;
}
} | false | false | false | false | false | 0 |
gntdev_ioctl_notify(struct gntdev_priv *priv, void __user *u)
{
struct ioctl_gntdev_unmap_notify op;
struct grant_map *map;
int rc;
int out_flags;
unsigned int out_event;
if (copy_from_user(&op, u, sizeof(op)))
return -EFAULT;
if (op.action & ~(UNMAP_NOTIFY_CLEAR_BYTE|UNMAP_NOTIFY_SEND_EVENT))
return -EINV... | false | false | false | false | false | 0 |
strbuf_getline(struct strbuf *sb, FILE *fp, int term)
{
if (strbuf_getwholeline(sb, fp, term))
return EOF;
if (sb->buf[sb->len-1] == term)
strbuf_setlen(sb, sb->len-1);
return 0;
} | false | false | false | false | false | 0 |
FindPrefixKeys(const dawgdic::Dictionary &dic, std::istream *input) {
std::string line;
while (std::getline(*input, line)) {
std::cout << line << ':';
dawgdic::BaseType index = dic.root();
for (std::size_t i = 0; i < line.length(); ++i) {
if (!dic.Follow(line[i], &index)) {
break;
}... | false | false | false | false | false | 0 |
getFieldMask() {
int32_t result=0;
for (int32_t i=0; i<UDATPG_FIELD_COUNT; ++i) {
if (skeleton.type[i]!=0) {
result |= (1<<i);
}
}
return result;
} | false | false | false | false | false | 0 |
DrawNetwork(GtkWidget * data, int rflevel)
{
int i;
if (rflevel > 100)
rflevel = 100;
for (i = 0; (i * 25) <= rflevel; i++) {
float percent = ((float) rflevel - i * 25) / 25;
if (percent > 1)
percent = 1;
gdk_draw_rectangle(Pixmap, GTK_WIDGET(data)->style->white_gc, TRUE,
network_levels[4 * i] + ... | false | false | false | false | false | 0 |
rar_read(vfile *vf, char *buf, avsize_t nbyte)
{
avssize_t res;
struct archfile *fil = arch_vfile_file(vf);
struct rarfile *rfil = (struct rarfile *) fil->data;
if(rfil == NULL)
return av_arch_read(vf, buf, nbyte);
if(lseek(rfil->fd, vf->ptr, SEEK_SET) == -1)
return -errno;
re... | false | false | false | false | false | 0 |
lgs8gxx_init(struct dvb_frontend *fe)
{
struct lgs8gxx_state *priv =
(struct lgs8gxx_state *)fe->demodulator_priv;
const struct lgs8gxx_config *config = priv->config;
u8 data = 0;
s8 err;
dprintk("%s\n", __func__);
lgs8gxx_read_reg(priv, 0, &data);
dprintk("reg 0 = 0x%02X\n", data);
if (config->prod == LGS8... | false | false | false | false | false | 0 |
orinoco_ioctl_getsens(struct net_device *dev,
struct iw_request_info *info,
struct iw_param *srq,
char *extra)
{
struct orinoco_private *priv = ndev_priv(dev);
struct hermes *hw = &priv->hw;
u16 val;
int err;
unsigned long flags;
if (!priv->has_sensitivity)
return -EOPNOTSUPP;
if (orinoco_lock... | false | false | false | false | false | 0 |
print ( std::ostream& o ) const
{
o << "Taxonomy consists of " << nEntries << " entries\n";
o << " of which " << nCDEntries << " are completely defined\n\n";
o << "All entries are in format:\n\"entry\" {n: parent_1 ... parent_n} {m: child_1 child_m}\n\n";
TVSet sorted(itop()+1, end());
getTopVertex()-... | false | false | false | false | false | 0 |
gsearch_setup_goption_descriptions (void)
{
gint i = 1;
gint j;
GSearchGOptionEntries[i++].description = g_strdup (_("Set the text of \"Name contains\" search option"));
GSearchGOptionEntries[i++].description = g_strdup (_("Set the text of \"Look in folder\" search option"));
GSearchGOptionEntries[i++].descript... | false | false | false | false | false | 0 |
job_update_master_list_usage(lList *job_list, lListElem *event)
{
bool ret = true;
u_long32 job_id, ja_task_id;
const char *pe_task_id;
DENTER(TOP_LAYER, "job_update_master_list_usage");
job_id = lGetUlong(event, ET_intkey);
ja_task_id = lGetUlong(event, ET_intkey2);
pe_task_id = lGetString(event... | false | false | false | false | false | 0 |
PrintExpression(struct Expression * exp, char * string)
{
{
struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
int count;
if(exp)
OutputExpression(exp, f);
((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance... | false | false | false | false | false | 0 |
addNumber(EditBoard *eb, int loc, bool moveNum) {
SgfElem *search;
int i, val;
char labelStr[4];
const char *sgfLoc;
for (search = eb->sgf->active; search && (search->type != sgfType_node);
search = search->parent) {
if ((search->type == sgfType_label) &&
(goBoard_sgf2Loc(eb->game->board, ... | true | true | false | false | false | 1 |
BlockSelectLine() {
int Y = VToR(CP.Row);
if (BlockUnmark() == 0) return 0;
BlockMode = bmStream;
if (SetBB(EPoint(Y, 0)) == 0) return 0;
if (Y == RCount - 1) {
if (SetBE(EPoint(Y, LineLen(Y))) == 0) return 0;
} else {
if (SetBE(EPoint(Y + 1, 0)) == 0) return 0;
}
return... | false | false | false | false | false | 0 |
qh_randommatrix (realT *buffer, int dim, realT **row) {
int i, k;
realT **rowi, *coord, realr;
coord= buffer;
rowi= row;
for (i=0; i<dim; i++) {
*(rowi++)= coord;
for (k=0; k<dim; k++) {
realr= qh_RANDOMint;
*(coord++)= 2.0 * realr/(qh_RANDOMmax+1.0) - 1.0;
}
}
*rowi= coord;
} | false | false | false | false | false | 0 |
cmsFreeToneCurve(cmsToneCurve* Curve)
{
cmsContext ContextID;
if (Curve == NULL) return;
ContextID = Curve ->InterpParams->ContextID;
_cmsFreeInterpParams(Curve ->InterpParams);
if (Curve -> Table16)
_cmsFree(ContextID, Curve ->Table16);
if (Curve ->Segments) {
cmsU... | false | false | false | false | false | 0 |
read_cb(EV_P_ ev_io *w, int revents __attribute__((__unused__)))
{
input_state *input = w->data;
char *chunk;
ssize_t n;
do {
if ((chunk = buffer_read_chunk(input->buffer, input->separator))
!= NULL) {
debug("Got complete chunk from standard input");
ev_io_stop(EV_A_ w);
input->read_handler(input,... | false | true | false | false | true | 1 |
trick_num_point_cards (Trick *trick)
{
gint i, result = 0;
for (i = 0; i < 4; i++)
{
if (trick->card[i] != NULL)
{
if (trick->card[i]->suit == CARDS_HEARTS)
result++;
else if (trick->card[i]->suit == CARDS_SPADES && trick->card[i]->rank == CARD_QUEEN)
result++;
}
}
return result;
} | false | false | false | false | false | 0 |
print_types(raw_ostream &OS, const SelectionDAG *G) const {
for (unsigned i = 0, e = getNumValues(); i != e; ++i) {
if (i) OS << ",";
if (getValueType(i) == MVT::Other)
OS << "ch";
else
OS << getValueType(i).getEVTString();
}
} | false | false | false | false | false | 0 |
concat_NFA (fsm_t *fsm1, fsm_t *fsm2)
{
// Link from the first's final state to the start state of the next.
if (!fsm1->accept_state)
{
ALLOC_STATE(fsm1->accept_state);
}
link_states ( fsm1->accept_state, &(fsm2->start_state), 'a', EPSILON);
fsm1->accept_state->is_final_state = 0;
fsm1->accept_state = fsm2->ac... | false | false | false | false | false | 0 |
emit_xyplot_code( FILE * fp,
FL_OBJECT * ob )
{
FL_OBJECT *defobj;
SuperSPEC *sp,
*defsp;
if ( ob->objclass != FL_XYPLOT )
{
M_err( "EmitXYPlotCode", "not xyplot class!" );
return;
}
/* create a default object */
defobj = fl_create_xypl... | false | false | false | false | false | 0 |
amdgpu_atombios_dp_get_adjust_train(const u8 link_status[DP_LINK_STATUS_SIZE],
int lane_count,
u8 train_set[4])
{
u8 v = 0;
u8 p = 0;
int lane;
for (lane = 0; lane < lane_count; lane++) {
u8 this_v = drm_dp_get_adjust_request_voltage(link_status, lane);
u8 this_p = drm_dp_get_adjust_request_pre_emp... | 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.