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 |
|---|---|---|---|---|---|---|
CleanSubId()
{
FUSUniqueStringMap myStringMap;
for (FCDPhysicsModelInstanceContainer::iterator it = instances.begin(); it != instances.end(); ++it)
{
(*it)->CleanSubId(&myStringMap);
}
} | false | false | false | false | false | 0 |
DetectHeaderLine()
{
int bHeaderLineCandidate = TRUE;
size_t i;
for(i = 0; i < apoFirstLineTypes.size(); i++)
{
if (apoFirstLineTypes[i] != "string")
{
/* If the values in the first line are not text, then it is */
/* not a header line */
bHeaderLineC... | false | false | false | false | false | 0 |
__env_init_rec_43(env)
ENV *env;
{
int ret;
if ((ret = __db_add_recovery_int(env, &env->recover_dtab,
__bam_relink_43_recover, DB___bam_relink_43)) != 0)
goto err;
/*
* We want to use the 4.2-based txn_regop record.
*/
if ((ret = __db_add_recovery_int(env, &env->recover_dtab,
__txn_regop_42_recove... | false | false | false | false | false | 0 |
moveClientLeftOf(WinClient &win, WinClient &dest) {
frame().moveLabelButtonLeftOf(*m_labelbuttons[&win], *m_labelbuttons[&dest]);
ClientList::iterator it = find(m_clientlist.begin(),
m_clientlist.end(),
&win);
Client... | false | false | false | false | false | 0 |
too_many_workers(struct worker_pool *pool)
{
bool managing = pool->flags & POOL_MANAGER_ACTIVE;
int nr_idle = pool->nr_idle + managing; /* manager is considered idle */
int nr_busy = pool->nr_workers - nr_idle;
return nr_idle > 2 && (nr_idle - 2) * MAX_IDLE_WORKERS_RATIO >= nr_busy;
} | false | false | false | false | false | 0 |
on_document_opened(IAnjutaFile* afile, GError* error, gpointer user_data)
{
QuickOpenDialog* self = user_data;
if (error)
return;
quick_open_dialog_document_file_changed(self, IANJUTA_DOCUMENT(afile));
} | false | false | false | false | false | 0 |
draw(Gfx *gfx, GBool printing) {
Object obj;
if (!isVisible (printing))
return;
// draw the appearance stream
appearance.fetch(xref, &obj);
gfx->drawAnnot(&obj, border, color, 1,
rect->x1, rect->y1, rect->x2, rect->y2);
obj.free();
} | false | false | false | false | false | 0 |
as_del_players(void)
{
struct s_as_player *p;
for (p = as_players->head; p;) {
if (p->status == P_del) {
as_del_player(p);
p = as_players->head;
} else
SWITCH(p);
}
} | false | false | false | false | false | 0 |
unity_webapps_music_player_set_track (UnityWebappsContext *context,
const gchar *artist,
const gchar *album,
const gchar *title,
const gchar *icon_url)
{
gchar *sanitized_artist, *sanitized_album, *sanitized_title, *sanitized_icon_url;
g_return_if_fail (context != NULL);
g_... | false | false | false | false | false | 0 |
multigram_build(RecogProcess *r)
{
if (r->lm->winfo != NULL) {
/* re-build tree lexicon for recognition process */
if (multigram_rebuild_wchmm(r) == FALSE) {
jlog("ERROR: multi-gram: failed to re-build tree lexicon\n");
return FALSE;
}
#ifdef MDEBUG
jlog("STAT: wchmm (re)build completed\n"... | false | false | false | false | false | 0 |
qfo_self(Param *param, double qi)
{
double self_d,cmin,cmax,qmin,qmax;
double s1 = param->chi;
double s2 = param->dj;
double s3 = param->dk;
double s4 = param->dl;
self_d = 0.0;
qmin = param->qmin;
qmax = param->qmax;
cmin = cmax = 100.0;
self_d = s1+qi*(2.0*s2+qi*(3.0*s3+qi*4.0*s4));
if (qi ... | false | false | false | false | false | 0 |
get_ewscal_ids_for(struct ewscal_pvt *pvt)
{
char start[21], end[21];
struct ast_tm tm;
struct timeval tv;
struct ast_str *request;
struct xml_context ctx = {
.op = XML_OP_FIND,
.pvt = pvt,
};
ast_debug(5, "EWS: get_ewscal_ids_for()\n");
if (!pvt) {
ast_log(LOG_ERROR, "There is no private!\n");
return... | false | false | false | false | false | 0 |
efx_remove_eventq(struct efx_channel *channel)
{
netif_dbg(channel->efx, drv, channel->efx->net_dev,
"chan %d remove event queue\n", channel->channel);
efx_nic_remove_eventq(channel);
} | false | false | false | false | false | 0 |
writeSvgIdAttr(QXmlStreamWriter &writer, ViewLayer::ViewID view, QString connId) {
Q_UNUSED(view);
writer.writeAttribute("svgId",connId);
} | false | false | false | false | false | 0 |
viacam_do_try_fmt(struct via_camera *cam,
struct v4l2_pix_format *upix, struct v4l2_pix_format *spix)
{
int ret;
struct v4l2_subdev_pad_config pad_cfg;
struct v4l2_subdev_format format = {
.which = V4L2_SUBDEV_FORMAT_TRY,
};
struct via_format *f = via_find_format(upix->pixelformat);
upix->pixelformat = f->pi... | false | false | false | false | false | 0 |
_GImageGetPixelRGBA(struct _GImage *base,int x, int y) {
Color val;
if ( base->image_type==it_rgba ) {
val = ((uint32*) (base->data + y*base->bytes_per_line))[x] ;
return( val==base->trans?(val&0xffffff):val );
} else if ( base->image_type==it_true ) {
val = ((uint32*) (base->data + y*base->bytes_per_lin... | false | false | false | false | false | 0 |
dump_sam_usersegment (FILE *fp, Sequence_T usersegment,
char *sam_read_group_id, char *sam_read_group_name,
char *sam_read_group_library, char *sam_read_group_platform) {
fprintf(fp,"@SQ\tSN:%s",Sequence_accession(usersegment));
fprintf(fp,"\tLN:%u",Sequence_fulllength(usersegment));
fprintf(fp,"... | false | false | false | false | false | 0 |
initializeFactoryRegistry()
{
AppenderFactoryRegistry& reg = getAppenderFactoryRegistry();
REG_APPENDER (reg, ConsoleAppender);
REG_APPENDER (reg, NullAppender);
REG_APPENDER (reg, FileAppender);
REG_APPENDER (reg, RollingFileAppender);
REG_APPENDER (reg, DailyRollingFileAppender);
REG_APPEN... | false | false | false | false | false | 0 |
IReadBlock( int nBlockXOff, int nBlockYOff, void *pData )
{
int nXOff = nBlockXOff * nBlockXSize;
int nYOff = nBlockYOff * nBlockYSize;
int nXSize = nBlockXSize;
int nYSize = nBlockYSize;
if( nXOff + nXSize > nRasterXSize )
nXSize = nRasterXSize - nXOff;
if( nYOff + nYSize > nRasterYSize... | false | false | false | false | false | 0 |
button_press_cb (GocCanvas *canvas, GdkEventButton *event, G_GNUC_UNUSED gpointer data)
{
double x, y;
GocItem *item;
if (event->window != gtk_layout_get_bin_window (&canvas->base))
return TRUE;
x = (canvas->direction == GOC_DIRECTION_RTL)?
canvas->scroll_x1 + (canvas->width - event->x) / canvas->pixels_per_u... | false | false | false | false | false | 0 |
CreateAnother(void) const
{
::itk::LightObject::Pointer smartPtr;
Pointer copyPtr = Self::New();
copyPtr->m_Point = this->m_Point;
copyPtr->m_ForcePoint = this->m_ForcePoint;
copyPtr->SetGlobalNumber( this->GetGlobalNumber() );
smartPtr = static_cast<Pointer>(copyPtr);
return smartPtr;
} | false | false | false | false | false | 0 |
render_name(G_GNUC_UNUSED GtkTreeViewColumn *column,
GtkCellRenderer *renderer,
GtkTreeModel *model,
GtkTreeIter *iter,
gpointer user_data)
{
GtkTreeView *treeview = (GtkTreeView*)user_data;
PangoEllipsizeMode ellipsize;
PangoWeight weight;
GwyGrainValue *... | false | false | false | false | false | 0 |
h_endsingle(OMPragma* p, ostream& os) {
int n = RExit(p);
generate_call("end", "single", n, os);
if ( p->is_nowait() ) {
print_pragma(p, os);
} else {
if ( ! p->has_copypriv() ) p->add_nowait();
print_pragma(p, os);
generate_barrier(n, os);
}
generate_call("exit", "single... | false | false | false | false | false | 0 |
sis900_probe ( struct nic *nic, struct pci_device *pci ) {
int i;
int found=0;
int phy_addr;
u8 revision;
int ret;
if (pci->ioaddr == 0)
return 0;
nic->irqno = 0;
nic->ioaddr = pci->ioaddr;
ioaddr = pci->ioaddr;
vendor = pci->vendor;
dev_id = pci->device;
... | false | false | false | false | false | 0 |
internalHelp(ArSocket *socket)
{
std::map<std::string, std::string, ArStrCaseCmpOp>::iterator it;
socket->writeString("Commands:");
for (it = myHelpMap.begin(); it != myHelpMap.end(); ++it)
socket->writeString("%15s%10s%s", it->first.c_str(), "",
it->second.c_str());
} | false | false | false | false | false | 0 |
gen_split_249 (operands)
rtx *operands;
{
rtx operand0;
rtx operand1;
rtx operand2;
rtx operand3;
rtx operand4;
rtx operand5;
rtx operand6;
rtx _val = 0;
start_sequence ();
operands[3] = gen_rtx (REG, HImode, REGNO (operands[0]));
if (A_REG_P (operands[1]))
operands[5] = gen_rtx (REG... | false | false | false | false | false | 0 |
setAttributes(const gchar ** attributes)
{
if(!PP_AttrProp::setAttributes(attributes))
return false;
return _handleNestedRevAttr();
} | false | false | false | false | false | 0 |
FindCXAAtExit(Module &M) {
Function *Fn = M.getFunction("__cxa_atexit");
if (!Fn)
return 0;
FunctionType *FTy = Fn->getFunctionType();
// Checking that the function has the right return type, the right number of
// parameters and that they all have pointer types should be enough.
if (!FTy->get... | false | false | false | false | false | 0 |
parse_theme (win_struct *win) {
gchar *content=NULL;
gsize length=0;
GError *err=NULL;
GMarkupParseContext *ctx;
gchar *theme_file;
gchar *metacity_theme=NULL;
const char * const *system_data_dirs;
gint i;
metacity_theme=get_metacity_theme (win);
if (metacity_theme == NULL) {
printf ("\... | false | false | false | false | false | 0 |
GetNext (Record &fetchme) {
//The first thing to do is fetch through the current page.
//If the page returns 0, then we need to load the next page and get from there
//If the GPI > f's size, then we've reached the end of the records
if(p.GetFirst(&fetchme) == 0){ //Check to see if anything is returned by our curre... | false | false | false | false | false | 0 |
lookup_type_pair (tree t1, tree t2, htab_t *visited_p, struct obstack *ob_p)
{
struct type_pair_d pair;
type_pair_t p;
void **slot;
if (*visited_p == NULL)
{
*visited_p = htab_create (251, type_pair_hash, type_pair_eq, NULL);
gcc_obstack_init (ob_p);
}
pair.uid1 = TYPE_UID (t1);
pair.u... | false | false | false | false | false | 0 |
_dwarf_free_all_of_one_debug(Dwarf_Debug dbg)
{
Dwarf_Alloc_Hdr alloc_hdr = 0;
Dwarf_Shalf i = 0;
if (dbg == NULL) {
return (DW_DLV_ERROR);
}
/* To do complete validation that we have no surprising missing or
erroneous deallocs it is advisable to do the dwarf_deallocs here
... | false | false | false | false | false | 0 |
go7007_usb_release(struct go7007 *go)
{
struct go7007_usb *usb = go->hpi_context;
struct urb *vurb, *aurb;
int i;
if (usb->intr_urb) {
usb_kill_urb(usb->intr_urb);
kfree(usb->intr_urb->transfer_buffer);
usb_free_urb(usb->intr_urb);
}
/* Free USB-related structs */
for (i = 0; i < 8; ++i) {
vurb = usb->... | false | false | false | false | false | 0 |
rb_obj_call_init(obj, argc, argv)
VALUE obj;
int argc;
VALUE *argv;
{
PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
rb_funcall2(obj, init, argc, argv);
POP_ITER();
} | false | false | false | false | false | 0 |
bnxt_init_one_rx_ring(struct bnxt *bp, int ring_nr)
{
struct net_device *dev = bp->dev;
struct bnxt_rx_ring_info *rxr;
struct bnxt_ring_struct *ring;
u32 prod, type;
int i;
type = (bp->rx_buf_use_size << RX_BD_LEN_SHIFT) |
RX_BD_TYPE_RX_PACKET_BD | RX_BD_FLAGS_EOP;
if (NET_IP_ALIGN == 2)
type |= RX_BD_FLAG... | false | false | false | false | false | 0 |
ins_char(struct edwin *w, int c)
{
u8 buf[40];
int x, t;
xio_get_line(w->xw, w->y, buf);
for (x = w->x; x < W; ++x)
t = buf[x], buf[x] = c, c = t;
xio_put_line(w->xw, w->y, buf);
} | false | false | false | false | false | 0 |
hslider_draw_update(t_gobj *client, t_glist *glist)
{
t_hslider *x = (t_hslider *)client;
if (glist_isvisible(glist))
{
int r = text_xpix(&x->x_gui.x_obj, glist) + (x->x_val + 50)/100;
int ypos=text_ypix(&x->x_gui.x_obj, glist);
t_canvas *canvas=glist_getcanvas(glist);
sys_vg... | false | false | false | false | false | 0 |
gegl_color_get_rgba (GeglColor *self,
gdouble *r,
gdouble *g,
gdouble *b,
gdouble *a)
{
g_return_if_fail (GEGL_IS_COLOR (self));
*r = self->priv->rgba_color[0];
*g = self->priv->rgba_color[1];
*b = self->priv->rgba_colo... | false | false | false | false | false | 0 |
ajStrTokenAssign(AjPStrTok* Ptoken, const AjPStr str)
{
AjPStrTok tok;
if(*Ptoken)
tok = *Ptoken;
else
{
AJNEW0(tok);
*Ptoken = tok;
}
ajStrAssignS(&tok->String, str);
ajStrAssignClear(&tok->Delim);
tok->Pos = 0;
return ajTrue;
} | false | false | false | false | false | 0 |
goku_set_halt(struct usb_ep *_ep, int value)
{
struct goku_ep *ep;
unsigned long flags;
int retval = 0;
if (!_ep)
return -ENODEV;
ep = container_of (_ep, struct goku_ep, ep);
if (ep->num == 0) {
if (value) {
ep->dev->ep0state = EP0_STALL;
ep->dev->ep[0].stopped = 1;
} else
return -EINVAL;
/* d... | false | false | false | false | false | 0 |
ffu4fi4(unsigned long *input, /* I - array of values to be converted */
long ntodo, /* I - number of elements in the array */
double scale, /* I - FITS TSCALn or BSCALE value */
double zero, /* I - FITS TZEROn or BZERO value */
INT32BIT *outp... | false | false | false | false | false | 0 |
__pyx_array_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
__Pyx_RefNannyDeclarations
int __pyx_t_1;
__Pyx_RefNannySetupContext("__dealloc__", 0);
/* "View.MemoryView":210
*
* def __dealloc__(array self):
* if self.callback_free_data != NULL: # <<<<<<<<<<<<<<... | false | false | false | false | false | 0 |
is_implemented (tree name)
{
struct imp_entry *t;
for (t = imp_list; t; t = t->next)
if (TREE_CODE (t->imp_context) == CLASS_IMPLEMENTATION_TYPE
&& CLASS_NAME (t->imp_template) == name)
return true;
return false;
} | false | false | false | false | false | 0 |
HasUnsupportedPlugins() const
{
const_iterator b = begin(), e = end();
for( ; b != e; ++b ) {
if( (*b)->IsUnsupported() )
return true;
}
return false;
} | false | false | false | false | false | 0 |
raid0_make_request(struct mddev *mddev, struct bio *bio)
{
struct strip_zone *zone;
struct md_rdev *tmp_dev;
struct bio *split;
if (unlikely(bio->bi_rw & REQ_FLUSH)) {
md_flush_request(mddev, bio);
return;
}
do {
sector_t sector = bio->bi_iter.bi_sector;
unsigned chunk_sects = mddev->chunk_sectors;
u... | false | false | false | false | false | 0 |
fs2netd_spew_table_checksums(char *outfile)
{
char full_name[MAX_PATH_LEN];
int count;
FILE *out = NULL;
char description[512] = { 0 };
char filename[65] = { 0 };
size_t offset = 0;
char *p = NULL;
if ( Table_valid_status.empty() ) {
return;
}
cf_create_default_path_string(full_name, sizeof(full_name) - 1... | false | false | false | false | false | 0 |
nifti_set_iname_offset(nifti_image *nim)
{
int offset;
switch( nim->nifti_type ){
default: /* writing into 2 files */
/* we only write files with 0 offset in the 2 file format */
nim->iname_offset = 0 ;
break ;
/* NIFTI-1 single binary file - always update */
case NIFTI_FTYPE... | false | false | false | false | false | 0 |
set_acoustic(const MixtureModel &mm, const float *beats)
{
try {
Q q("INSERT OR REPLACE INTO A.Acoustic "
"('uid', 'mfcc', 'bpm') "
"VALUES (?, ?, ?);");
q << uid;
q.bind(&mm.gauss, MFCCKeeper::ResultSize);
q.bind(beats, sizeof(float) * BEATSSIZE);
... | false | false | false | false | false | 0 |
lsr_write_set(GF_LASeRCodec *lsr, SVG_Element *elt, SVG_Element *parent)
{
SVGAllAttributes atts;
gf_svg_flatten_attributes(elt, &atts);
lsr_write_id(lsr, (GF_Node *) elt);
lsr_write_rare(lsr, (GF_Node *) elt);
lsr_write_animatable(lsr, atts.attributeName, atts.xlink_href, "attributeName");
lsr_write_attribute_t... | false | false | false | false | false | 0 |
handle_to_path(int mountdirfd, struct file_handle __user *ufh,
struct path *path)
{
int retval = 0;
struct file_handle f_handle;
struct file_handle *handle = NULL;
/*
* With handle we don't look at the execute bit on the
* the directory. Ideally we would like CAP_DAC_SEARCH.
* But we don't have that
*... | false | false | false | false | false | 0 |
openconnect_set_xmlsha1 (struct openconnect_info *vpninfo, char *xmlsha1, int size)
{
if (size != sizeof (vpninfo->xmlsha1))
return;
memcpy (&vpninfo->xmlsha1, xmlsha1, size);
} | false | true | false | false | false | 1 |
sanity_check_entries(struct kvm_cpuid_entry2 __user *entries,
__u32 num_entries, unsigned int ioctl_type)
{
int i;
__u32 pad[3];
if (ioctl_type != KVM_GET_EMULATED_CPUID)
return false;
/*
* We want to make sure that ->padding is being passed clean from
* userspace in case we want to use it for somethin... | false | false | false | false | false | 0 |
Send(const Id &to, const QByteArray &data,
const QStringList &been)
{
if(to == _local_id) {
_rpc->HandleData(QSharedPointer<ISender>(
new ForwardingSender(GetSharedPointer(), _local_id, _local_id)), data);
return;
}
if(been.isEmpty() || !Reverse(to, data, QStringList(), been... | false | false | false | false | false | 0 |
__ecereDestructor___ecereNameSpace__ecere__gui__GuiApplication(struct __ecereNameSpace__ecere__com__Instance * this)
{
struct __ecereNameSpace__ecere__gui__GuiApplication * __ecerePointer___ecereNameSpace__ecere__gui__GuiApplication = (struct __ecereNameSpace__ecere__gui__GuiApplication *)(this ? (((char *)this) + __ec... | false | false | false | true | false | 1 |
load_partial_ctr(CPFB_BLOCK* block, const unsigned char* b, unsigned long long len, unsigned long long counter){
unsigned int i;
block->u64[0] = block->u64[1] = 0;
for (i = 0; i < len; i++)
block->u8[i] = b[i];
block->counter = htobe32((crypto_uint32)counter);
} | false | false | false | false | false | 0 |
opal_strerror(int errnum)
{
int ret;
const char* errmsg;
if (errnum == OPAL_ERR_IN_ERRNO) {
return strerror(errno);
}
ret = opal_strerror_int(errnum, &errmsg);
if (OPAL_SUCCESS != ret) {
char *ue_msg;
ret = opal_strerror_unknown(errnum, &ue_msg);
snprintf(unkno... | false | false | false | false | false | 0 |
state_new (glLabel *this,
const gchar *description)
{
State *state;
GList *p_obj;
glLabelObject *object;
gl_debug (DEBUG_LABEL, "START");
state = g_new0 (State, 1);
state->description = g_strdup (description);
state->template ... | false | false | false | false | false | 0 |
target_cmd_done(struct scsi_cmd *cmd)
{
struct mgmt_req *mreq;
mreq = cmd->mreq;
if (mreq && !--mreq->busy) {
mreq->result = mreq->function == ABORT_TASK ? -EEXIST : 0;
mreq->itn_id = cmd->cmd_itn_id;
tgt_drivers[cmd->c_target->lid]->mgmt_end_notify(mreq);
free(mreq);
}
cmd->dev->cmd_done(cmd->c_target, ... | false | false | false | false | false | 0 |
PlaceInX(deg)
real deg;
{
if (us.fVedic)
deg = -chouse[1]*(gi.nMode != gWheel)*2.0-deg-60.0;
return Mod(rDegHalf-deg+gi.rAsc);
} | false | false | false | false | false | 0 |
String(const char* str, rapidjson::SizeType length, bool copy) {
values.push_back(std::string{str,length});
return true;
} | false | false | false | false | false | 0 |
gbuf_cursor_home()
{
hide_gtab_pre_sel();
if (!ggg.gbufN)
return 0;
#if WIN32
if (test_mode)
return 1;
#endif
if (ggg.gtab_buf_select)
clear_gbuf_sel();
ggg.gbuf_cursor = 0;
disp_gbuf();
return 1;
} | false | false | false | false | false | 0 |
emit_thread_start (gpointer key, gpointer value, gpointer user_data)
{
if (GPOINTER_TO_INT (key) != debugger_thread_id)
process_profiler_event (EVENT_KIND_THREAD_START, value);
} | false | false | false | false | false | 0 |
gdl_dock_item_grip_set_label (GdlDockItemGrip *grip,
GtkWidget *label)
{
g_return_if_fail (grip != NULL);
if (grip->priv->label) {
gtk_widget_unparent(grip->priv->label);
g_object_unref (grip->priv->label);
grip->priv->label = NULL;
}
if (label) {
... | false | false | false | false | false | 0 |
RemoveOption(const char* opt, Option_type opttyp)
{
return OptionsArray[opttyp].erase(opt)!=0;//true if was there
} | false | false | false | false | false | 0 |
SquareShape(const double margin,
const double sumwidth, const double minwidth, int& nrows)
{
if (!nrows)
nrows = (int)(sqrt((1.0 + margin) * sumwidth / ROWHEIGHT) + 0.5);
double RowWidth = (double)((int)(((1.0 + margin) * sumwidth / (double)nrows) + 0.5));
if (RowWidth < minwidth)
return minwidth;
re... | false | false | false | false | false | 0 |
wordpress_get_post (Wordpress* self, const char* id) {
GHashTable* result = NULL;
GError * _inner_error_;
SoupMessage* message;
SoupSessionAsync* session;
guint return_code;
char* data;
GValue v = {0};
GHashTable* hash;
g_return_val_if_fail (self != NULL, NULL);
g_return_val_if_fail (id != NULL, NULL);
_inne... | false | false | false | false | false | 0 |
read_repeat_counts(const uschar *p, int *minp, int *maxp, int *errorcodeptr)
{
int min = 0;
int max = -1;
/* Read the minimum value and do a paranoid check: a negative value indicates
an integer overflow. */
while ((digitab[*p] & ctype_digit) != 0) min = min * 10 + *p++ - '0';
if (min < 0 || min > 65535)
{
*error... | false | false | false | false | false | 0 |
process (GeglOperation *op,
void *in_buf,
void *aux_buf,
void *out_buf,
glong n_pixels,
const GeglRectangle *roi,
gint level)
{
gint i;
gfloat * GEGL_ALIGNED in = in_buf;
... | false | false | false | false | false | 0 |
gl841_save_power(Genesys_Device * dev, SANE_Bool enable) {
uint8_t val;
DBG(DBG_proc, "gl841_save_power: enable = %d\n", enable);
if (enable)
{
if (dev->model->gpo_type == GPO_CANONLIDE35)
{
/* expect GPIO17 to be enabled, and GPIO9 to be disabled,
while GPIO8 is disabled*/
/* final state: GPIO8 ... | false | false | false | false | true | 1 |
buildPatientRecord(DcmDirectoryRecord *record,
DcmFileFormat *fileformat,
const OFString &sourceFilename)
{
/* create new patient record */
if (record == NULL)
record = new DcmDirectoryRec... | false | false | false | false | false | 0 |
istgt_md5init(ISTGT_MD5CTX *md5ctx)
{
int rc;
if (md5ctx == NULL)
return -1;
rc = MD5_Init(&md5ctx->md5ctx);
return rc;
} | false | false | false | false | false | 0 |
cb_dialog_so_size_destroy (SOSizeState *state)
{
if (state->so_size_needs_restore || state->so_pos_needs_restore)
sheet_object_set_anchor (state->so, state->old_anchor);
g_free (state->old_anchor);
g_free (state->active_anchor);
g_free (state->old_name);
if (state->so!= NULL)
g_object_unref (state->so);
if (s... | false | false | false | false | false | 0 |
string_remark(char *errmsg_txt)
{
unsigned int sav_lineno = lineno;
bool eof = skip_until('\n');
if ( ! eof )
{
eof = skip_ws();
}
if ( eof )
{
warn_unterm(WARNING, errmsg_txt, sav_lineno);
}
} | false | false | false | false | false | 0 |
inet6_opt_find (void *extbuf, socklen_t extlen, int offset, uint8_t type,
socklen_t *lenp, void **databufp)
{
if (offset == 0)
offset = sizeof (struct ip6_hbh);
else if (offset < sizeof (struct ip6_hbh))
return -1;
while (offset < extlen)
{
struct ip6_opt *opt = (struct ip6_opt *) ((uint8_t *... | false | false | false | false | false | 0 |
display_link_mode(struct happy_meal *hp, void __iomem *tregs)
{
printk(KERN_INFO "%s: Link is up using ", hp->dev->name);
if (hp->tcvr_type == external)
printk("external ");
else
printk("internal ");
printk("transceiver at ");
hp->sw_lpa = happy_meal_tcvr_read(hp, tregs, MII_LPA);
if (hp->sw_lpa & (LPA_100HAL... | false | false | false | false | false | 0 |
consider_arm_swap(struct predicate *p)
{
int left_cost, right_cost;
const char *reason = NULL;
struct predicate **pl, **pr;
if (BI_OP != p->p_type)
reason = "Not a binary operation";
if (!reason)
{
if (NULL == p->pred_left || NULL == p->pred_right)
reason = "Doesn't have two arms";
}
... | false | false | false | false | false | 0 |
Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromUSGS_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jdoubleArray jarg4, jint jarg5) {
jint jresult = 0 ;
OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
long arg2 ;
long arg3 ;
double *arg4 ;
... | false | false | false | false | false | 0 |
GetEyePosition(double eyePosition[3])
{
if(!eyePosition)
{
vtkErrorMacro(<< "ERROR: Invalid or NULL eye position\n");
return;
}
eyePosition[0] = this->EyeTransformMatrix->GetElement(0, 3);
eyePosition[1] = this->EyeTransformMatrix->GetElement(1, 3);
eyePosition[2] = this->EyeTransformMatrix->Ge... | false | false | false | false | false | 0 |
getMemsetStores(SelectionDAG &DAG, DebugLoc dl,
SDValue Chain, SDValue Dst,
SDValue Src, uint64_t Size,
unsigned Align, bool isVol,
const Value *DstSV, uint64_t DstSVOff) {
// Turn a memset of u... | false | false | false | false | false | 0 |
releaseAddr(long IAID, SPtr<TIPv6Addr> addr )
{
SPtr<TAddrIA> ptrIA = ClntAddrMgr().getIA(IAID);
if (ptrIA)
ptrIA->delAddr(addr);
else
Log(Warning) << "Unable to release addr: IA ("
<< IAID << ") not present in addrDB." << LogEnd;
} | false | false | false | false | false | 0 |
vTaskSwitchContext( void )
{
if( uxSchedulerSuspended != ( unsigned portBASE_TYPE ) pdFALSE )
{
/* The scheduler is currently suspended - do not allow a context
switch. */
xMissedYield = pdTRUE;
}
else
{
traceTASK_SWITCHED_OUT();
#if ( configGENERATE_RUN_TIME_STATS == 1 )
{
unsigned long ulTempCoun... | false | false | false | false | false | 0 |
EXP_create_experiment_query_window(AW_root *aw_root) {
static AW_window_simple_menu *aws = 0;
if (aws){
return (AW_window *)aws;
}
aws = new AW_window_simple_menu;
aws->init( aw_root, "EXPERIMENT_QUERY", "Experiment SEARCH and QUERY");
aws->create_menu("More functions","f");
aws->lo... | false | false | false | false | false | 0 |
db_do_replace(const db_con_t* _h, const db_key_t* _k, const db_val_t* _v,
const int _n, int (*val2str) (const db_con_t*, const db_val_t*, char*,
int*), int (*submit_query)(const db_con_t* _h, const str* _c))
{
int off, ret;
if (!_h || !_k || !_v || !val2str|| !submit_query) {
LM_ERR("invalid parameter value\n");... | false | false | false | false | false | 0 |
file_basename(const char *s) /* I - Filename or URL */
{
const char *basename; /* Pointer to directory separator */
static char buf[1024]; /* Buffer for files with targets */
if (s == NULL)
return (NULL);
if ((basename = strrchr(s, '/')) != NULL)
basename ++;
else if ((basename = strrchr(s, '\\')) ... | false | false | false | false | false | 0 |
drbd_bcast_event(struct drbd_device *device, const struct sib_info *sib)
{
static atomic_t drbd_genl_seq = ATOMIC_INIT(2); /* two. */
struct sk_buff *msg;
struct drbd_genlmsghdr *d_out;
unsigned seq;
int err = -ENOMEM;
seq = atomic_inc_return(&drbd_genl_seq);
msg = genlmsg_new(NLMSG_GOODSIZE, GFP_NOIO);
if (!m... | false | false | false | false | false | 0 |
star_as_specified(int c)
{
int immediate;
time_t now;
static int page_width;
if (!star_flag)
return;
if (!page_width)
page_width = page_width_get() - 1;
if (c & STAR_IMMEDIATE)
{
c &= ~STAR_IMMEDIATE;
immediate = 1;
}
else
... | false | false | false | false | false | 0 |
hw_sm750_inithw(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
{
struct init_status *parm;
parm = &sm750_dev->initParm;
if (parm->chip_clk == 0)
parm->chip_clk = (getChipType() == SM750LE) ?
DEFAULT_SM750LE_CHIP_CLOCK :
DEFAULT_SM750_CHIP_CLOCK;
if (parm->mem_clk == 0)
parm->mem_clk = parm->ch... | false | false | false | false | false | 0 |
git_reference__update_for_commit(
git_repository *repo,
git_reference *ref,
const char *ref_name,
const git_oid *id,
const git_signature *committer,
const char *operation)
{
git_reference *ref_new = NULL;
git_commit *commit = NULL;
git_buf reflog_msg = GIT_BUF_INIT;
int error;
if ((error = git_commit_lookup... | false | false | false | false | false | 0 |
PyMarshal_WriteObjectToString(PyObject *x, int version)
{
WFILE wf;
wf.fp = NULL;
wf.readable = NULL;
wf.str = PyBytes_FromStringAndSize((char *)NULL, 50);
if (wf.str == NULL)
return NULL;
wf.ptr = PyBytes_AS_STRING((PyBytesObject *)wf.str);
wf.end = wf.ptr + PyBytes_Size(wf.str);
... | false | true | false | false | true | 1 |
list_split(char *sep, char *str)
{
List new = list_create ((ListDelF) free);
char *tok;
if (sep == NULL)
sep = " \t";
while ((tok = _next_tok (sep, &str)) != NULL) {
if (strlen (tok) > 0)
list_append (new, strdup(tok));
}
return new;
} | false | false | false | false | false | 0 |
Increment_param_registered(Param_table_type *table)
{
int new_size;
void *dum_ptr;
int i;
int return_status = REG_SUCCESS;
table->num_registered++;
/* Allocate more memory if required */
if(table->num_registered == table->max_entries){
new_size = table->max_entries + REG_INITIAL_NUM_PARAMS;
... | false | false | false | false | false | 0 |
efx_ef10_filter_match_flags_from_mcdi(u32 mcdi_flags)
{
int match_flags = 0;
#define MAP_FLAG(gen_flag, mcdi_field) { \
u32 old_mcdi_flags = mcdi_flags; \
mcdi_flags &= ~(1 << MC_CMD_FILTER_OP_IN_MATCH_ ## \
mcdi_field ## _LBN); \
if (mcdi_flags != old_mcdi_flags) \
match_flags |= EFX_FILTER_MAT... | false | false | false | false | false | 0 |
readpchar(char** pc, int maxlength )
{
int actpos2 = 0;
int maxav = 100000;
if ( maxlength )
if ( maxav > maxlength )
maxav = maxlength;
CharBuf charbuf ( maxav );
maxav--;
char* pch2 = charbuf.buf;
int loop = 0;
do {
actpos2++;
if (... | false | false | false | false | false | 0 |
setLineProperties() {
QColor col;
GLEDrawObject* obj = getGLEObject();
GLEColor* color = obj->getProperties()->getColorProperty(GLEDOPropertyColor);
col.setRgbF(color->getRed(), color->getGreen(), color->getBlue());
setPropertyNoUpdate(LineColour, col);
setPropertyNoUpdate(LineWidth, obj->getProperties()->getReal... | false | false | false | false | false | 0 |
lam_port_close(int port)
{
port -= LAM_PORTLOW;
if (!((0 <= port) && (port < LAM_PORTMAX))) {
errno = EINVAL;
return(LAMERROR);
}
ports[port] = 0;
return(0);
} | false | false | false | false | false | 0 |
getCache(void *&PImpl) {
if (!PImpl)
PImpl = new LazyValueInfoCache();
return *static_cast<LazyValueInfoCache*>(PImpl);
} | false | false | false | false | false | 0 |
camel_imapx_job_matches (CamelIMAPXJob *job,
CamelFolder *folder,
const gchar *uid)
{
/* XXX CamelFolder can be NULL. I'm less sure about the
* message UID but let's assume that can be NULL too. */
g_return_val_if_fail (CAMEL_IS_IMAPX_JOB (job), FALSE);
if (... | false | false | false | false | false | 0 |
PIT_RadiusAttack (mobj_t* thing)
{
fixed_t dx;
fixed_t dy;
fixed_t dist;
if (!(thing->flags & MF_SHOOTABLE) )
return true;
// Boss spider and cyborg
// take no damage from concussion.
if (thing->type == MT_CYBORG
|| thing->type == MT_SPIDER)
return true;
dx = abs(thing->x - bom... | false | false | false | false | false | 0 |
RunEvals(void *UNUSED(notused))
{
int aanBoard[EVALS_PER_ITERATION][2][25];
int i, j, k;
double t;
float ar[NUM_OUTPUTS];
#if USE_MULTITHREAD
MT_Exclusive();
#endif
for (i = 0; i < EVALS_PER_ITERATION; i++) {
/* Generate a random board. Don't allow chequers on the bar
* or bor... | false | false | false | false | false | 0 |
nfs3_mknod (rpcsvc_request_t *req, struct nfs3_fh *fh, char *name,
mknoddata3 *nodedata)
{
xlator_t *vol = NULL;
nfsstat3 stat = NFS3ERR_SERVERFAULT;
int ret = -EFAULT;
struct nfs3_state *... | 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.