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 |
|---|---|---|---|---|---|---|
is_assign_op(operator op)
{
operator prec = PREC(op);
fix_assignment_prec(prec);
return prec == PREC(TOK_ASSIGN)
|| prec == PREC_PRE
|| prec == PREC_POST;
} | false | false | false | false | false | 0 |
account_widget_handle_params_valist (TpawAccountWidget *self,
const gchar *first_widget,
va_list args)
{
GObject *object;
const gchar *name;
for (name = first_widget; name; name = va_arg (args, const gchar *))
{
const gchar *param_name;
param_name = va_arg (args, const gchar *);
ob... | false | false | false | false | false | 0 |
exo_tree_view_move_cursor (GtkTreeView *view,
GtkMovementStep step,
gint count)
{
ExoTreeView *tree_view = EXO_TREE_VIEW (view);
/* be sure to cancel any pending single-click timeout */
if (G_UNLIKELY (tree_view->priv->single_click_timeout_id >=... | false | false | false | false | false | 0 |
mmc_test_profile_seq_read_perf(struct mmc_test_card *test)
{
struct mmc_test_area *t = &test->area;
unsigned long sz;
int ret;
for (sz = 512; sz < t->max_tfr; sz <<= 1) {
ret = mmc_test_seq_read_perf(test, sz);
if (ret)
return ret;
}
sz = t->max_tfr;
return mmc_test_seq_read_perf(test, sz);
} | false | false | false | false | false | 0 |
visorchannel_signalempty(struct visorchannel *channel, u32 queue)
{
unsigned long flags = 0;
struct signal_queue_header sig_hdr;
bool rc = false;
if (channel->needs_lock)
spin_lock_irqsave(&channel->remove_lock, flags);
if (!sig_read_header(channel, queue, &sig_hdr))
rc = true;
if (sig_hdr.head == sig_hdr.t... | false | false | false | false | false | 0 |
SetChannelMapEdit(gchar *ChannelMap)
{
GtkTreeModel *model = gtk_combo_box_get_model(ChannelMapEdit);
GtkTreeIter iter;
gboolean iter_valid = gtk_tree_model_get_iter_first(model, &iter);
while (iter_valid) {
gchar *string;
gtk_tree_model_get(model, &iter, 0, &string, -1);
if (strcmp(string, ChannelMap) == 0) ... | false | false | false | false | false | 0 |
get_default_tuner_type(struct pvr2_hdw *hdw)
{
int unit_number = hdw->unit_number;
int tp = -1;
if ((unit_number >= 0) && (unit_number < PVR_NUM)) {
tp = tuner[unit_number];
}
if (tp < 0) return -EINVAL;
hdw->tuner_type = tp;
hdw->tuner_updated = !0;
return 0;
} | false | false | false | false | false | 0 |
erts_pcre_free_restart_data(void *restart_data) {
PcreExecContext *top = (PcreExecContext *) restart_data;
/* We might be done, or we might not, so there might be some saved match_states here */
if (top != NULL) {
match_data *md = top->Xmd;
if (top->Xusing_temporary_offsets && md->offset_vector != NULL) {... | false | false | false | false | false | 0 |
stripe_free_xattr_str (stripe_local_t *local)
{
int32_t i = 0;
int32_t ret = -1;
stripe_xattr_sort_t *xattr = NULL;
if (!local || !local->xattr_list)
goto out;
for (i = 0; i < local->nallocs; i++) {
xattr = local->... | false | false | false | false | false | 0 |
str_substr_with_locker_unlocked(Locker *locker, const String *str, ssize_t index, ssize_t range)
{
String *ret;
if (!str)
return set_errnull(EINVAL);
if (index < 0)
index = str->length + index;
if (index < 0)
return set_errnull(EINVAL);
if (range < 0)
range = str->length + range - index;
if (range < ... | false | false | false | false | false | 0 |
ev_tally13_thr(Angle * const angle, const int i1, const int i3,
const int nlocal, const int newton_bond,
const double epair, const double fpair,
const double delx, const double dely,
const double delz, ThrDat... | false | false | false | false | false | 0 |
make_code_table (const char size_table[], int table_length,
unsigned int code_table[], int maxbits)
/* Make a code table from a length table. See rfc1951, section
* 3.2.2, for details on what this means. The size_table
* contains the length of the Huffman codes for each letter, and
* the cod... | false | false | false | false | false | 0 |
file_renamed_cb (GthMonitor *monitor,
GFile *file,
GFile *new_file,
GthBrowser *browser)
{
RenameData *rename_data;
GList *list;
gth_hook_invoke ("gth-browser-file-renamed", browser, file, new_file);
rename_data = g_new0 (RenameData, 1);
rename_data->browser = browser;
rename_data->file_... | false | false | false | false | false | 0 |
check_schema (const char *oid)
{
if (strcmp (oid, PBES2_OID) == 0)
return PBES2_GENERIC; /* ok */
if (strcmp (oid, PKCS12_PBE_3DES_SHA1_OID) == 0)
return PKCS12_3DES_SHA1;
if (strcmp (oid, PKCS12_PBE_ARCFOUR_SHA1_OID) == 0)
return PKCS12_ARCFOUR_SHA1;
if (strcmp (oid, PKCS12_PBE_RC2_40_SHA... | false | false | false | false | false | 0 |
ipmi_get_my_LUN(ipmi_user_t user,
unsigned int channel,
unsigned char *address)
{
if (channel >= IPMI_MAX_CHANNELS)
return -EINVAL;
*address = user->intf->channels[channel].lun;
return 0;
} | false | false | false | false | false | 0 |
unix_utimes(value path, value atime, value mtime)
{
struct utimbuf times, * t;
times.actime = Double_val(atime);
times.modtime = Double_val(mtime);
if (times.actime || times.modtime)
t = ×
else
t = (struct utimbuf *) NULL;
if (utime(String_val(path), t) == -1) uerror("utimes", path);
return... | false | false | false | false | false | 0 |
MinItem(struct icon_info *head)
{
struct icon_info *tmp, *i_min;
if (head == NULL)
return NULL;
i_min = head;
tmp = head->next;
while (tmp != NULL){
if (itemcmp(i_min, tmp) > 0)
i_min = tmp;
tmp = tmp->next;
}
return i_min;
} | false | false | false | false | false | 0 |
tvp514x_get_pad_format(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
struct v4l2_subdev_format *format)
{
struct tvp514x_decoder *decoder = to_decoder(sd);
__u32 which = format->which;
if (format->pad)
return -EINVAL;
if (which == V4L2_SUBDEV_FORMAT_ACTIVE) {
format->format = decoder... | false | false | false | false | false | 0 |
Create_TurnsTileBmpSource(
AVSValue args, void* user_data, IScriptEnvironment* env)
{
std::string filename = args[0].AsString(""),
pixel_type = args[1].AsString("RGB32");
return new TurnsTileBmpSource(filename, pixel_type, env);
} | false | false | false | false | false | 0 |
FreeImage_SetTagDescription(FITAG *tag, const char *description) {
if(tag && description) {
FITAGHEADER *tag_header = (FITAGHEADER *)tag->data;
if(tag_header->description) free(tag_header->description);
tag_header->description = (char*)malloc(strlen(description) + 1);
strcpy(tag_header->description, descriptio... | false | true | false | false | false | 1 |
generate_04(void)
{
FILE *f;
FLAC__int16 x[] = { -25, 500, 0, 400, 25, 300, 50, 200, 100, 100 };
unsigned i;
if(0 == (f = flac_fopen("test04.raw", "wb")))
return false;
for(i = 0; i < 10; i++)
if(!write_little_endian_int16(f, x[i]))
goto foo;
fclose(f);
return true;
foo:
fclose(f);
return false;
} | false | false | false | false | false | 0 |
slap_sb_uri(
struct berval *val,
void *bcp,
slap_cf_aux_table *tab0,
const char *tabmsg,
int unparse )
{
slap_bindconf *bc = bcp;
if ( unparse ) {
if ( bc->sb_uri.bv_len >= val->bv_len )
return -1;
val->bv_len = bc->sb_uri.bv_len;
AC_MEMCPY( val->bv_val, bc->sb_uri.bv_val, val->bv_len );
} else {
bc-... | false | false | false | false | false | 0 |
copystr2str(STRING *sstr, long ssi, long num, STRING *dstr, long dsi)
{
char *c, *c1;
if (num < 0 || (size_t)(ssi + num) > sstr->s_len)
num = sstr->s_len - ssi;
if (num <= 0)
return 0; /* Nothing to be copied */
if (dsi < 0) /* default destination index */
dsi = 0;
if ((size_t)(dsi + num) > dstr->s_len)
... | false | false | false | false | false | 0 |
jackctl_parameter_get_default_value(jackctl_parameter *parameter_ptr)
{
if (parameter_ptr) {
return *parameter_ptr->default_value_ptr;
} else {
union jackctl_parameter_value jackctl_value;
memset(&jackctl_value, 0, sizeof(jackctl_value));
return jackctl_value;
}
} | false | false | false | false | false | 0 |
SetIDRanges(vtkKdNode *kd, int &min, int &max)
{
int tempMin=0;
int tempMax=0;
if (kd->GetLeft() == NULL)
{
min = kd->GetID();
max = kd->GetID();
}
else
{
vtkBSPIntersections::SetIDRanges(kd->GetLeft(), min, max);
vtkBSPIntersections::SetIDRanges(kd->GetRight(), tempMin, tempMax);
... | false | false | false | false | false | 0 |
_gnutls_openpgp_crt_verify_peers (gnutls_session_t session,
unsigned int *status)
{
cert_auth_info_t info;
gnutls_certificate_credentials_t cred;
int peer_certificate_list_size, ret;
CHECK_AUTH (GNUTLS_CRD_CERTIFICATE, GNUTLS_E_INVALID_REQUEST);
info = _gnutls_get_auth_info... | false | false | false | false | false | 0 |
pch_can_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
struct net_device *ndev;
struct pch_can_priv *priv;
int rc;
void __iomem *addr;
rc = pci_enable_device(pdev);
if (rc) {
dev_err(&pdev->dev, "Failed pci_enable_device %d\n", rc);
goto probe_exit_endev;
}
rc = pci_request_regions(p... | false | false | false | false | false | 0 |
GetPosition() {
// Before any size allocated pretend its 1000 wide so not scrolled
PRectangle rc(0, 0, 1000, 1000);
if (wid) {
GtkAllocation allocation;
#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_get_allocation(PWidget(wid), &allocation);
#else
allocation = PWidget(wid)->allocation;
#endif
rc.left = allocation.... | false | false | false | false | false | 0 |
image_color_profile_get(ImageWindow *imd,
gint *input_type,
gboolean *use_image)
{
if (!imd) return FALSE;
if (input_type) *input_type = imd->color_profile_input;
if (use_image) *use_image = imd->color_profile_use_image;
return TRUE;
} | false | false | false | false | false | 0 |
ext2fs_add_journal_inode2(ext2_filsys fs, blk_t num_blocks,
blk64_t goal, int flags)
{
errcode_t retval;
ext2_ino_t journal_ino;
struct stat st;
char jfile[1024];
int mount_flags;
int fd = -1;
if (flags & EXT2_MKJOURNAL_NO_MNT_CHECK)
mount_flags = 0;
else if ((retval = ext2fs_check_mount_poi... | true | true | false | false | true | 1 |
on_toolbutton_add_crystal_clicked(void)
{
LOG;
HklSample *sample = hkl_sample_new("new_sample", HKL_SAMPLE_TYPE_MONOCRYSTAL);
if(sample){
hkl_sample_list_append(_samples, sample);
hkl_sample_list_select_current(_samples, "new_sample");
this->updateTreeViewCrystals();
// activate for edition the name of the... | false | false | false | false | false | 0 |
swap_short(char *from, char *to, int nbytes)
/*
char *from;
char *to;
int nbytes;
*/
{
register int i;
register char c;
for (i = 0; i < nbytes; i+=2)
{
c = from[i];
to[i] = from[i+1];
to[i+1] = c;
}
} | false | false | false | false | false | 0 |
CreateSharedProcArray(void)
{
bool found;
/* Create or attach to the ProcArray shared structure */
procArray = (ProcArrayStruct *)
ShmemInitStruct("Proc Array",
add_size(offsetof(ProcArrayStruct, pgprocnos),
mul_size(sizeof(int),
PROCARRAY_MAXPROCS)),
&found);
if (!found)
{
... | false | false | false | false | false | 0 |
atp_execution_context_free (ATPExecutionContext* this)
{
atp_output_context_destroy (&this->output);
atp_output_context_destroy (&this->error);
if (this->launcher)
{
g_object_unref (this->launcher);
}
if (this->name) g_free (this->name);
if (this->directory) g_free (this->directory);
g_free (this);
} | false | false | false | false | false | 0 |
putzeros(char * buffer)
{
int i=0;
while((buffer[i]!='\0')) {
if (buffer[i]==' ') buffer[i]='0';
i++;
}
} | false | false | false | false | false | 0 |
doCompare( int32_t start,
int32_t length,
const UChar *srcChars,
int32_t srcStart,
int32_t srcLength) const
{
// compare illegal string values
// treat const UChar *srcChars==NULL as an empty string
if(isBogus()) {
return -1;
}
// pin indices to l... | false | false | false | false | false | 0 |
yycompile0(VALUE arg, int tracing)
{
int n;
NODE *tree;
struct parser_params *parser = (struct parser_params *)arg;
if (!compile_for_eval && rb_safe_level() == 0) {
ruby_debug_lines = debug_lines(ruby_sourcefile);
if (ruby_debug_lines && ruby_sourceline > 0) {
VALUE str = STR_NEW0();
n = ru... | false | false | false | false | false | 0 |
mp3_type_find (GstTypeFind * tf, gpointer unused)
{
GstTypeFindProbability prob, mid_prob;
const guint8 *data;
guint layer, mid_layer;
guint64 length;
mp3_type_find_at_offset (tf, 0, &layer, &prob);
length = gst_type_find_get_length (tf);
if (length == 0 || length == (guint64) - 1) {
if (prob != 0)
... | false | false | false | false | false | 0 |
overMonad(K a, V *p, K b)
{
K u=b,c=0;I flag=0;
I useN=0,n=0,useB=0;
if(a) if(1 == a->t){useN=1; n=*kI(a);} else if(7==a->t){useB=1;}
P(n<0,IE)
if(useN) //n f/x
{
DO(n, c=dv_ex(0,p-1,u); if(b!=u)cd(u); U(u=c))
c=c?c:ci(b);
}
else if(useB) // b f/x
{
I t;
do
{
K*aa=&a;
... | false | false | false | false | false | 0 |
_IO_wsetb (f, b, eb, a)
_IO_FILE *f;
wchar_t *b;
wchar_t *eb;
int a;
{
if (f->_wide_data->_IO_buf_base && !(f->_flags2 & _IO_FLAGS2_USER_WBUF))
FREE_BUF (f->_wide_data->_IO_buf_base, _IO_wblen (f) * sizeof (wchar_t));
f->_wide_data->_IO_buf_base = b;
f->_wide_data->_IO_buf_end = eb;
if (... | false | false | false | false | false | 0 |
device_error_in_main (Ekiga::AudioInputDevice device,
Ekiga::AudioInputErrorCodes code)
{
device_error (device, code);
} | false | false | false | false | false | 0 |
intel_dp_max_lane_count(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct drm_device *dev = intel_dig_port->base.base.dev;
u8 source_max, sink_max;
source_max = 4;
if (HAS_DDI(dev) && intel_dig_port->port == PORT_A &&
(intel_dig_port->saved_port_bits & ... | false | false | false | false | false | 0 |
ll_name_to_index(char *name)
{
static char ncache[16];
static int icache;
struct idxmap *im;
int i;
if (name == NULL)
return 0;
if (icache && strcmp(name, ncache) == 0)
return icache;
for (i=0; i<16; i++) {
for (im = idxmap[i]; im; im = im->next) {
if (strcmp(im->name, name) == 0) {
icache = im->in... | true | true | false | false | false | 1 |
unuse_vma(struct vm_area_struct *vma,
swp_entry_t entry, struct page *page)
{
pgd_t *pgd;
unsigned long addr, end, next;
int ret;
if (page_anon_vma(page)) {
addr = page_address_in_vma(page, vma);
if (addr == -EFAULT)
return 0;
else
end = addr + PAGE_SIZE;
} else {
addr = vma->vm_start;
end = v... | false | false | false | false | false | 0 |
uninit(int immed)
{
if (esd_play_fd >= 0) {
e_close(esd_play_fd);
esd_play_fd = -1;
}
if (esd_svinfo) {
e_free_server_info(esd_svinfo);
esd_svinfo = NULL;
}
if (esd_fd >= 0) {
e_close(esd_fd);
esd_fd = -1;
}
} | false | false | false | false | false | 0 |
check_pers_file_xfer(PERS_FILE_XFER& p) {
if (p.fxp) check_file_xfer_pointer(p.fxp);
check_file_info_pointer(p.fip);
} | false | false | false | false | false | 0 |
func(uint i, bool execute)
{
switch (i) {
case 2:
if (execute) {
String fn;
if (!textfile->getFilename(fn).isEmpty()) {
sendmsg(cmd_file_save);
} else {
app->sendmsg(cmd_file_saveas);
bool dirty = true;
FileOfs start = 0;
FileOfs end = 0x7fffffff;
textfile->cntl(FCNTL_MODS_IS_DIRTY,... | false | false | false | false | false | 0 |
CouldBePositiveZero(AstNode* node) {
Literal* literal = node->AsLiteral();
if (literal != NULL) {
Handle<Object> handle = literal->handle();
if (handle->IsSmi()) {
if (Smi::cast(*handle) != Smi::FromInt(0)) {
return false;
}
} else if (handle->IsHeapNumber()) {
// Heap number l... | false | false | false | false | false | 0 |
nv40_backlight_init(struct drm_connector *connector)
{
struct nouveau_drm *drm = nouveau_drm(connector->dev);
struct nvif_object *device = &drm->device.object;
struct backlight_properties props;
struct backlight_device *bd;
if (!(nvif_rd32(device, NV40_PMC_BACKLIGHT) & NV40_PMC_BACKLIGHT_MASK))
return 0;
mems... | false | false | false | false | false | 0 |
intel_quark_unregister_i2c_clk(struct pci_dev *pdev)
{
struct intel_quark_mfd *quark_mfd = dev_get_drvdata(&pdev->dev);
if (!quark_mfd->i2c_clk || !quark_mfd->i2c_clk_lookup)
return;
clkdev_drop(quark_mfd->i2c_clk_lookup);
clk_unregister(quark_mfd->i2c_clk);
} | false | false | false | false | false | 0 |
job_completed (CkJob *job,
int status,
JobData *data)
{
g_debug ("Job status: %d", status);
if (status == 0) {
char *output;
GPtrArray *parameters;
output = NULL;
ck_job_get_stdout (job, &out... | false | false | false | false | false | 0 |
NotationImpl(DocumentImplPtr owner) : NodeImpl()
{
nodeType = NOTATION_NODE;
ownerDocument = owner;
} | false | false | false | false | false | 0 |
willNotRewind()
{
for (size_t i = 0; i < sov_.size(); i++)
if (sov_[i])
sov_[i]->willNotRewind();
mayRewind_ = 0;
} | false | false | false | false | false | 0 |
NewMessage ( GameMap* gamemap, Message* msg, bool reminder ) : ASC_PG_Dialog( NULL, PG_Rect( -1, -1, 600, 500 ), "new message" )
{
this->gamemap = gamemap;
message = msg;
if ( message )
reminder = message->reminder;
this->reminder = reminder;
int startY = 30;
if ( !reminder ) {
n... | false | false | false | false | false | 0 |
text_index_name_add_word (CamelIndexName *idn,
const gchar *word)
{
CamelTextIndexNamePrivate *p = ((CamelTextIndexName *) idn)->priv;
if (g_hash_table_lookup (idn->words, word) == NULL) {
gchar *w = camel_mempool_strdup (p->pool, word);
g_hash_table_insert (idn->words, w, w);
}
} | false | false | false | false | false | 0 |
change_param(const String &s, Element *e, void *vparam,
ErrorHandler *errh)
{
InfiniteSource *is = (InfiniteSource *)e;
switch ((intptr_t)vparam) {
case h_data: // data
is->_data = s;
is->setup_packet();
break;
case h_limit: { // limit
int limit;
if (!IntArg().parse(s, limit))
retu... | false | false | false | false | false | 0 |
chirp_reli_mkdir_recursive( const char *host, const char *path, INT64_T mode, time_t stoptime )
{
char mypath[CHIRP_PATH_MAX];
strcpy(mypath,path);
char *n = strchr(&mypath[1],'/');
while(n) {
*n = 0;
/* ignore the result here, because there are many reasons we might not have permission to make or view directo... | true | true | false | false | false | 1 |
listJobs()
{
QTreeWidgetItem *parentItem = mainWin->getFromHash(this);
mainWin->createPageJobList("", "", m_currentlyselected, "", parentItem);
} | false | false | false | false | false | 0 |
writeMeshASCII(io::IWriteFile* file, scene::IMesh* mesh, s32 flags)
{
// write STL MESH header
file->write("solid ",6);
const core::stringc name(SceneManager->getMeshCache()->getMeshName(mesh));
file->write(name.c_str(),name.size());
file->write("\n\n",2);
// write mesh buffers
for (u32 i=0; i<mesh... | false | false | false | false | false | 0 |
intel_panel_detect(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
/* Assume that the BIOS does not lie through the OpRegion... */
if (!i915.panel_ignore_lid && dev_priv->opregion.lid_state) {
return *dev_priv->opregion.lid_state & 0x1 ?
connector_status_connected :
connector... | false | false | false | false | false | 0 |
log_shutdown (MonoProfiler *prof)
{
void *res;
in_shutdown = 1;
#ifndef DISABLE_HELPER_THREAD
counters_and_perfcounters_sample (prof);
dump_coverage (prof);
if (prof->command_port) {
char c = 1;
ign_res (write (prof->pipes [1], &c, 1));
pthread_join (prof->helper_thread, &res);
}
#endif
#if USE_PERF_EVEN... | false | false | false | false | false | 0 |
snd_nm256_ac97_write(struct snd_ac97 *ac97,
unsigned short reg, unsigned short val)
{
struct nm256 *chip = ac97->private_data;
int tries = 2;
int idx = nm256_ac97_idx(reg);
u32 base;
if (idx < 0)
return;
base = chip->mixer_base;
snd_nm256_ac97_ready(chip);
/* Wait for the write to take, too. */
wh... | false | false | false | false | false | 0 |
slot_append_favorite()
{
CORE::DATA_INFO_LIST list_info;
const bool dir = true;
m_treeview.get_info_in_selection( list_info, dir );
if( list_info.size() ){
CORE::SBUF_set_list( list_info );
CORE::core_set_command( "append_favorite", URL_FAVORITEVIEW );
}
} | false | false | false | false | false | 0 |
clar_report_errors(void)
{
int i = 1;
struct clar_error *error, *next;
error = _clar.errors;
while (error != NULL) {
next = error->next;
clar_print_error(i++, error);
free(error->description);
free(error);
error = next;
}
_clar.errors = _clar.last_error = NULL;
} | false | false | false | false | false | 0 |
panel_menu_button_finalize (GObject *object)
{
PanelMenuButton *button = PANEL_MENU_BUTTON (object);
if (button->priv->menu) {
/* detaching the menu will kill our reference */
gtk_menu_detach (GTK_MENU (button->priv->menu));
button->priv->menu = NULL;
}
if (button->priv->settings_instance)
g_object_unref ... | false | false | false | false | false | 0 |
memory_set_opbase_handler(int cpunum, opbase_handler function)
{
opbase_handler old = cpudata[cpunum].opbase;
cpudata[cpunum].opbase = function;
if (cpunum == cpu_getactivecpu())
opbasefunc = function;
return old;
} | false | false | false | false | false | 0 |
gst_opencv_video_filter_finalize (GObject * obj)
{
GstOpencvVideoFilter *transform = GST_OPENCV_VIDEO_FILTER (obj);
if (transform->cvImage)
cvReleaseImage (&transform->cvImage);
if (transform->out_cvImage)
cvReleaseImage (&transform->out_cvImage);
G_OBJECT_CLASS (parent_class)->finalize (obj);
} | false | false | false | false | false | 0 |
svg_write_state(gx_device_svg *svg)
{
char line[SVG_LINESIZE];
/* has anything changed? */
if (!svg->dirty)
return 0;
/* close the current graphics state element, if any */
if (svg->mark > 1) {
svg_write(svg, "</g>\n");
svg->mark--;
}
/* write out the new current state */... | true | true | false | false | false | 1 |
asm_source_entry_parse_operand (AsmSourceEntry * entry, gint * value)
{
g_assert (entry);
return asm_source_entry_parse_not_operand_but_this (entry, value,
entry->s_opnd);
} | false | false | false | false | false | 0 |
hwrm_ring_alloc_send_msg(struct bnxt *bp,
struct bnxt_ring_struct *ring,
u32 ring_type, u32 map_index,
u32 stats_ctx_id)
{
int rc = 0, err = 0;
struct hwrm_ring_alloc_input req = {0};
struct hwrm_ring_alloc_output *resp = bp->hwrm_cmd_resp_addr;
u16 ring_id;
bnxt_hwrm_cmd_hdr_init(bp, &req... | false | false | false | false | false | 0 |
version_add (version_t v1, version_t v2)
{
int n;
for (n = 0 ; n < VERSION_LENGTH ; n++)
v1[n] += v2[n];
} | false | false | false | false | false | 0 |
setDelegate( KCompletionBase *delegate )
{
d->m_delegate = delegate;
if ( delegate ) {
delegate->d->m_bAutoDelCompObj = d->m_bAutoDelCompObj;
delegate->d->m_bHandleSignals = d->m_bHandleSignals;
delegate->d->m_bEmitSignals = d->m_bEmitSignals;
delegate->d->m_iCompletionMode ... | false | false | false | false | false | 0 |
GL_FreeUnusedImages (void)
{
int i;
image_t *image;
// never free r_notexture
r_notexture->registration_sequence = registration_sequence;
for (i=0, image=gltextures ; i<numgltextures ; i++, image++)
{
if (image->registration_sequence == registration_sequence)
continue; // used this sequence
... | false | false | false | false | false | 0 |
qos_pktrate_pc(conn_rec *c, qos_srv_config *sconf) {
if(sconf->qos_cc_prefer_limit) {
qos_ifctx_t *inctx = qos_get_ifctx(c->input_filters);
if(inctx == NULL) {
inctx = qos_create_ifctx(c, sconf);
ap_add_input_filter("qos-in-filter", inctx, NULL, c);
}
inctx->lowrate = 0;
}
} | false | false | false | false | false | 0 |
mkenv(void) {
if (isdirty || rebound) {
env->count = envmin;
gcdisable(); /* TODO: make this a good guess */
dictforall(vars, mkenv0, NULL);
gcenable();
env->vector[env->count] = NULL;
isdirty = FALSE;
rebound = FALSE;
if (sortenv == NULL || env->count > sortenv->alloclen)
sortenv = mkvector(env->c... | false | false | false | false | false | 0 |
init()
{
for (int col = 0; col <= Color_ignore; ++col) {
lcolors_[col] = QColor(lcolor.getX11Name(ColorCode(col)).c_str());
}
initialized_ = true;
} | false | false | false | false | false | 0 |
rinoo_socket_class_ssl_connect(t_socket *socket, const struct sockaddr *addr, socklen_t addrlen)
{
int ret;
BIO *sbio;
t_ssl *ssl = rinoo_ssl_get(socket);
if (unlikely(rinoo_socket_class_tcp_connect(socket, addr, addrlen) != 0)) {
return -1;
}
ssl->ssl = SSL_new(ssl->ctx->ctx);
if (unlikely(ssl->ssl == NULL))... | false | false | false | false | false | 0 |
merge_sort(uchar **begin, size_t size)
{
uchar **end = begin + size;
uchar **temp_str = new uchar*[size];
int *temp_lcps = new int[size];
int *lcps = new int[size];
std::fill(lcps, lcps + size, 0);
merge_sort(begin, end, lcps, temp_str, temp_lcps);
delete [] lcps; delete [] temp_str; delete [] temp_lcps;
} | false | false | false | false | false | 0 |
extcon_register_interest(struct extcon_specific_cable_nb *obj,
const char *extcon_name, const char *cable_name,
struct notifier_block *nb)
{
unsigned long flags;
int ret;
if (!obj || !cable_name || !nb)
return -EINVAL;
if (extcon_name) {
obj->edev = extcon_get_extcon_dev(extcon_name);
if (!o... | false | false | false | false | false | 0 |
static_centered (int *hkl, int order, gamgi_enum value)
{
int a, b, c, d;
/*********************************
* find centered node coordinate *
*********************************/
switch (value)
{
/*****************
* body-centered *
*****************/
case GAMGI_PHYS_111:
a = 2 * hkl[0];
b = 2 * hkl... | false | false | false | false | false | 0 |
vs_fill_borders_Y16 (const VSImage * dest, const uint16_t val)
{
int i;
int top = dest->border_top, bottom = dest->border_bottom;
int left = dest->border_left, right = dest->border_right;
int width = dest->width;
int height = dest->height;
int real_width = dest->real_width;
int stride = dest->stride;
in... | false | false | false | false | false | 0 |
get_file_name(const std::string & event_name, std::string & file_name, AudioOutputPS & ps)
{
PWaitAndSignal m(event_file_list_mutex);
file_name = "";
for (std::vector<EventFileName>::iterator iter = event_file_list.begin ();
iter != event_file_list.end ();
iter++) {
if (iter->event_name == ev... | false | false | false | false | false | 0 |
usc_start_transmitter( struct mgsl_struct *info )
{
u32 phys_addr;
unsigned int FrameSize;
if (debug_level >= DEBUG_LEVEL_ISR)
printk("%s(%d):usc_start_transmitter(%s)\n",
__FILE__,__LINE__, info->device_name );
if ( info->xmit_cnt ) {
/* If auto RTS enabled and RTS is inactive, then assert */
/* R... | false | false | false | false | false | 0 |
h8300_shift_costs (rtx x)
{
rtx operands[4];
if (GET_MODE (x) != QImode
&& GET_MODE (x) != HImode
&& GET_MODE (x) != SImode)
return 100;
operands[0] = NULL;
operands[1] = NULL;
operands[2] = XEXP (x, 1);
operands[3] = x;
return compute_a_shift_length (NULL, operands) / 2;
} | false | false | false | false | false | 0 |
debug_find_var_in_block_tree (tree var, tree block)
{
tree t;
for (t = BLOCK_VARS (block); t; t = TREE_CHAIN (t))
if (t == var)
return block;
for (t = BLOCK_SUBBLOCKS (block); t; t = TREE_CHAIN (t))
{
tree ret = debug_find_var_in_block_tree (var, t);
if (ret)
return ret;
}
retu... | false | false | false | false | false | 0 |
xstrsearch(void)
{
int start,end,pat_len,str_len;
unsigned char *pat,*str,*patptr,*strptr,*patend;
LVAL str1,str2;
/* get the strings */
str1 = xlgastring(); /* the pat */
str2 = xlgastring(); /* the string */
/* get the substring specifiers */
getbounds(str2, k_start, k_end, &start, &... | false | false | false | false | false | 0 |
copy_module_from_user(const void __user *umod, unsigned long len,
struct load_info *info)
{
int err;
info->len = len;
if (info->len < sizeof(*(info->hdr)))
return -ENOEXEC;
err = security_kernel_module_from_file(NULL);
if (err)
return err;
/* Suck in entire file: we'll want most of it. */
info->hdr ... | false | false | false | false | false | 0 |
set_handle_limit (int new_limit,
int increase_limit_only)
{
ACE_TRACE ("ACE::set_handle_limit");
int cur_limit = ACE::max_handles ();
int max_limit = cur_limit;
if (cur_limit == -1)
return -1;
#if !defined (ACE_LACKS_RLIMIT) && defined (RLIMIT_NOFILE)
struct rlimit rl;
ACE_OS::... | false | false | false | false | false | 0 |
rcu_torture_fqs(void *arg)
{
unsigned long fqs_resume_time;
int fqs_burst_remaining;
VERBOSE_TOROUT_STRING("rcu_torture_fqs task started");
do {
fqs_resume_time = jiffies + fqs_stutter * HZ;
while (ULONG_CMP_LT(jiffies, fqs_resume_time) &&
!kthread_should_stop()) {
schedule_timeout_interruptible(1)... | false | false | false | false | false | 0 |
stop_waiting_on_inquiry (Operation *operation)
{
g_mutex_lock (&operation->inquiry_lock);
if (operation->is_inquiring)
{
operation->is_inquiring = FALSE;
g_cond_signal (&operation->inquiry_finished_condition);
}
g_mutex_unlock (&operation->inquiry_lock);
} | false | false | false | false | false | 0 |
check_user_preference( int * vmode,
int * depth )
{
int reqv = -1,
reqd = 0;
reqv = fli_cntl.vclass;
reqd = fli_cntl.depth;
#if FL_DEBUG >= ML_WARN
M_warn( "check_user_preference", "UserRequest: %s %d",
reqv >= 0 ? fl_vclass_name( reqv ) : "None", reqd > 0 ? ... | false | false | false | false | false | 0 |
ath9k_init_queues(struct ath_softc *sc)
{
int i = 0;
for (i = 0; i < WME_NUM_AC; i++) {
sc->tx.txq_map[i] = ath_txq_setup(sc, ATH9K_TX_QUEUE_DATA, i);
sc->tx.txq_map[i]->mac80211_qnum = i;
}
return 0;
} | false | false | false | false | false | 0 |
ps_stats_text(ps_stats_t *stats, FILE *stream)
{
float secs = ((float) stats->utime) / 1000000.0f;
/* fprintf(stream, "ps_stats_text()\n"); */
fprintf(stream, " run time : %f secs\n", secs);
if ((stats->utime > 0) && (secs >= 0.5f)) {
fprintf(stream, " averages\n");
fprintf(stream, " written\n");
fprint... | false | false | false | false | false | 0 |
math_equation_toggle_bit (MathEquation* self, guint bit) {
Number* x = NULL;
Number* _tmp0_ = NULL;
Number* _tmp1_ = NULL;
Number* max = NULL;
guint64 _tmp2_ = 0ULL;
Number* _tmp3_ = NULL;
gboolean _tmp4_ = FALSE;
gboolean _tmp5_ = FALSE;
Number* _tmp6_ = NULL;
gboolean _tmp9_ = FALSE;
gboolean _tmp13_ = FAL... | false | false | false | false | false | 0 |
process_rmpp_stop(struct ib_mad_agent_private *agent,
struct ib_mad_recv_wc *mad_recv_wc)
{
struct ib_rmpp_mad *rmpp_mad;
rmpp_mad = (struct ib_rmpp_mad *)mad_recv_wc->recv_buf.mad;
if (rmpp_mad->rmpp_hdr.rmpp_status != IB_MGMT_RMPP_STATUS_RESX) {
abort_send(agent, mad_recv_wc, IB_MGMT_RMPP_STATUS_BAD_S... | false | false | false | false | false | 0 |
verify (NMSetting *setting, GSList *all_settings, GError **error)
{
NMSettingBluetoothPrivate *priv = NM_SETTING_BLUETOOTH_GET_PRIVATE (setting);
if (!priv->bdaddr) {
g_set_error (error,
NM_SETTING_BLUETOOTH_ERROR,
NM_SETTING_BLUETOOTH_ERROR_MISSING_PROPERTY,
NM_SETTING... | false | false | false | false | false | 0 |
sec_attr_choose_attr_value_template(void *src_or_dest, PRBool encoding)
{
const SEC_ASN1Template *theTemplate;
SEC_PKCS7Attribute *attribute;
SECOidData *oiddata;
PRBool encoded;
PORT_Assert (src_or_dest != NULL);
if (src_or_dest == NULL)
return NULL;
attribute = (SEC_PKCS7Attribute*)src... | false | false | false | false | false | 0 |
copyPts (pointf* pts, int* ptsize, xdot_point* inpts, int numpts)
{
int i, sz = *ptsize;
if (numpts > sz) {
sz = MAX(2*sz, numpts);
pts = RALLOC(sz, pts, pointf);
*ptsize = sz;
}
for (i = 0; i < numpts; i++) {
pts[i].x = inpts[i].x;
pts[i].y = inpts[i].y;
}
return pts;
} | false | false | false | false | false | 0 |
qmonJobHandleEnterLeave(
Widget w,
XtPointer cld,
XEvent *ev,
Boolean *ctd
) {
/*
int root_x, root_y, pos_x, pos_y;
Window root, child;
unsigned int keys_buttons;
*/
char line[BUFSIZ];
static int prev_row = -1;
int row, col;
String str;
int job_nr;
lListElem *jep;
DENTER(GUI_LAY... | true | true | false | false | true | 1 |
gst_element_class_add_metadata (GstElementClass * klass,
const gchar * key, const gchar * value)
{
g_return_if_fail (GST_IS_ELEMENT_CLASS (klass));
g_return_if_fail (key != NULL);
g_return_if_fail (value != NULL);
gst_structure_set ((GstStructure *) klass->metadata,
key, G_TYPE_STRING, value, NULL);
... | 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.