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 |
|---|---|---|---|---|---|---|
create_simple_permissions (NautilusPropertiesWindow *window, GtkGrid *page_grid)
{
gboolean has_directory;
gboolean has_file;
GtkLabel *group_label;
GtkLabel *owner_label;
GtkWidget *value;
GtkComboBox *group_combo_box;
GtkComboBox *owner_combo_box;
has_directory = files_has_directory (window);
has_file = fil... | false | false | false | false | false | 0 |
selectedAux() {
QList<QGraphicsItem*> selItems = scene()->selectedItems();
if(selItems.size() != 1) {
return NULL;
} else {
return selItems[0];
}
} | false | false | false | false | false | 0 |
decode_range (unsigned range_state, unsigned range_label, unsigned range_level,
word_t **domain, wfa_t *wfa)
/*
* Compute 'wfa' image of range (identified by 'state' and 'label')
* at 'range_level (works as function decode_image()).
*
* Return value:
* pointer to the pixels in SHORT format
*
* Side ef... | false | false | false | false | true | 1 |
get_block()
{
FLAC__ASSERT(is_valid());
Prototype *block = local::construct_block(::FLAC__metadata_iterator_get_block(iterator_));
if(0 != block)
block->set_reference(true);
return block;
} | false | false | false | false | false | 0 |
__ecereMethod___ecereNameSpace__ecere__sys__BufferedFile_Seek(struct __ecereNameSpace__ecere__com__Instance * this, int pos, int mode)
{
struct __ecereNameSpace__ecere__sys__BufferedFile * __ecerePointer___ecereNameSpace__ecere__sys__BufferedFile = (struct __ecereNameSpace__ecere__sys__BufferedFile *)(this ? (((char *)... | false | true | false | true | true | 1 |
cards_hand_get_area(CardsHand *hand, GtkWidget *widget, CardsImage *image, gint *x, gint *y, gint *width, gint *height, gboolean with_selected)
{
gint offset_x = 0;
gint offset_y = 0;
if (hand->direction == NORTH || hand->direction == SOUTH)
{
offset_x = image->width / 4;
if (with_selected)
offset_y = i... | false | false | false | false | false | 0 |
MemHashGrowTable(mem_hash_kv_engine *pEngine)
{
sxu32 nNewSize = pEngine->nBucket << 1;
mem_hash_record *pEntry;
mem_hash_record **apNew;
sxu32 n,iBucket;
/* Allocate a new larger table */
apNew = (mem_hash_record **)SyMemBackendAlloc(&pEngine->sAlloc, nNewSize * sizeof(mem_hash_record *));
if( apNew == 0 ){
/... | false | false | false | false | false | 0 |
upper_layer_checksum_ipv6(uint8_t *data, uint8_t proto)
{
uint16_t upper_layer_len;
uint16_t sum;
struct ip6_hdr *ipv6_hdr;
uint8_t *upper_layer;
uint32_t val;
ipv6_hdr = (struct ip6_hdr *)data;
upper_layer_len = ntohs(ipv6_hdr->ip6_plen);
/* First sum pseudoheader. */
sum = 0;
sum = chksum(sum, (const u8_... | false | false | false | false | false | 0 |
skipFreeList(skipList list) {
skipFlushDeleted(list, TRUE); /* flush deleted items */
skipFreeAllItems(list); /* free list items */
if(list->threaded) {
cDestroy(&list->flush);
cDestroy(&list->resume);
mDestroy(&list->write);
mDestroy(&lis... | false | false | false | false | false | 0 |
ReadAlignedBytesSafeAlloc( char ** outByteArray, unsigned int &inputLength, const unsigned int maxBytesToRead )
{
rakFree_Ex(*outByteArray, _FILE_AND_LINE_ );
*outByteArray=0;
if (ReadCompressed(inputLength)==false)
return false;
if (inputLength > maxBytesToRead)
inputLength=maxBytesToRead;
if (inputLe... | false | false | false | false | false | 0 |
isValid(){
bool retorno = false;
if (_a > 0 || _b > 0 || _c > 0 || _d > 0){
retorno = true;
}
return retorno;
} | false | false | false | false | false | 0 |
camel_folder_get_quota_info_finish (CamelFolder *folder,
GAsyncResult *result,
GError **error)
{
CamelFolderClass *class;
g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
class = CAMEL_FOLDER_GET_CLASS (folder);
g_return_val_if_fail (cl... | false | false | false | true | false | 1 |
hostap_init_ap_proc(local_info_t *local)
{
struct ap_data *ap = local->ap;
ap->proc = local->proc;
if (ap->proc == NULL)
return;
#ifndef PRISM2_NO_PROCFS_DEBUG
proc_create_data("ap_debug", 0, ap->proc, &ap_debug_proc_fops, ap);
#endif /* PRISM2_NO_PROCFS_DEBUG */
#ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT
proc_c... | false | false | false | false | false | 0 |
partitionMemory(struct IndexEntry *sortBuffer, int64_t lowerIdx, int64_t upperIdx)
{
int64_t pivotIndex = lowerIdx + (upperIdx-lowerIdx)/2; /* TODO: Median method. But: This is good enough since the data is either sorted or randomly distributed. */
struct IndexEntry pivotValue = sortBuffer[pivotIndex];
sort... | false | false | false | false | false | 0 |
optInfoEndElem (void *userData, const XML_Char *name) {
struct OptInfoData *data = (struct OptInfoData *)userData;
enum OptInfoElem elem = bsearchStr (name, OptInfoElems, OI_COUNT);
switch (elem) {
case OI_DRIINFO:
data->inDriInfo = GL_FALSE;
break;
case OI_SECTION:
data->inSection = GL_FALSE... | false | false | false | false | false | 0 |
pvr2_wm8775_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
{
if (hdw->input_dirty || hdw->force_dirty) {
u32 input;
switch (hdw->input_val) {
case PVR2_CVAL_INPUT_RADIO:
input = 1;
break;
default:
/* All other cases just use the second input */
input = 2;
break;
}
pvr2_trace(PV... | false | false | false | false | false | 0 |
printThreadsDump(Thread *self) {
char buffer[256];
Thread *thread;
suspendAllThreads(self);
jam_printf("\n------ JamVM version %s Full Thread Dump -------\n",
VERSION);
for(thread = &main_thread; thread != NULL; thread = thread->next) {
Object *jThread = thread->ee->thread;
... | true | true | false | false | false | 1 |
sh_mobile_ceu_clock_stop(struct soc_camera_host *ici)
{
struct sh_mobile_ceu_dev *pcdev = ici->priv;
/* disable capture, disable interrupts */
ceu_write(pcdev, CEIER, 0);
sh_mobile_ceu_soft_reset(pcdev);
/* make sure active buffer is canceled */
spin_lock_irq(&pcdev->lock);
if (pcdev->active) {
list_del_init... | false | false | false | false | false | 0 |
sb800_prefetch(struct device *dev, int on)
{
u16 misc;
struct pci_dev *pdev = to_pci_dev(dev);
pci_read_config_word(pdev, 0x50, &misc);
if (on == 0)
pci_write_config_word(pdev, 0x50, misc & 0xfcff);
else
pci_write_config_word(pdev, 0x50, misc | 0x0300);
} | false | false | false | false | false | 0 |
get_mountspec_from_uri (GDaemonVfs *vfs,
const char *uri,
GMountSpec **spec_out,
char **path_out)
{
GMountSpec *spec;
char *path;
GVfsUriMapper *mapper;
char *scheme;
scheme = g_uri_parse_scheme (uri);
if (scheme == NULL)
return FALSE;
/* convert the scheme to lower case since g_uri_parse_s... | false | false | false | false | false | 0 |
operator>>(QDataStream &in, QServiceInterfaceDescriptor &dc)
{
const quint32 magicNumber = 0x77AFAFA;
quint32 storedMagicNumber;
in >> storedMagicNumber;
if (storedMagicNumber != magicNumber) {
qWarning() << "Datastream doesn't provide searialized QServiceInterfaceDescriptor";
return in;... | false | false | false | false | false | 0 |
_illume_running(void)
{
/* hack to find out out if illume is running, dont grab if
this is the case... */
Eina_List *l;
E_Module *m;
EINA_LIST_FOREACH (e_module_list(), l, m)
if (!strcmp(m->name, "illume2") && m->enabled)
return EINA_TRUE;
return EINA_FALSE;
} | false | false | false | false | false | 0 |
kwsysProcessClosePipes(kwsysProcess* cp)
{
int i;
/* Close any pipes that are still open. */
for(i=0; i < KWSYSPE_PIPE_COUNT; ++i)
{
if(cp->PipeReadEnds[i] >= 0)
{
#if KWSYSPE_USE_SELECT
/* If the pipe was reported by the last call to select, we must
read from it. This is needed to... | false | true | false | false | true | 1 |
event_trigger_callback(struct event_command *cmd_ops,
struct trace_event_file *file,
char *glob, char *cmd, char *param)
{
struct event_trigger_data *trigger_data;
struct event_trigger_ops *trigger_ops;
char *trigger = NULL;
char *number;
int ret;
/* separate the trigger from the filter (t:n [i... | false | false | false | false | false | 0 |
PlaceWidget(double bds[6])
{
int i;
double bounds[6], center[3];
this->AdjustBounds(bds, bounds, center);
for (i=0; i<6; i++)
{
this->InitialBounds[i] = bounds[i];
}
this->InitialLength = sqrt((bounds[1]-bounds[0])*(bounds[1]-bounds[0]) +
(bounds[3]-bounds[2])*(bounds... | false | false | false | false | false | 0 |
_update_cache_vginfo_lock_state(struct lvmcache_vginfo *vginfo,
int locked)
{
struct lvmcache_info *info;
int cached_vgmetadata_valid = 1;
dm_list_iterate_items(info, &vginfo->infos)
_update_cache_info_lock_state(info, locked,
&cached_vgmetadata_valid);
if (!cached_vgmetadata_valid)
_free_... | false | false | false | false | false | 0 |
_cdio_strsplit(const char str[], char delim) /* fixme -- non-reentrant */
{
int n;
char **strv = NULL;
char *_str, *p;
char _delim[2] = { 0, 0 };
cdio_assert (str != NULL);
_str = strdup(str);
_delim[0] = delim;
cdio_assert (_str != NULL);
n = 1;
p = _str;
while(*p)
if (*(p++) == delim)
... | false | false | false | true | true | 1 |
adv7511_encoder_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adj_mode)
{
struct adv7511 *adv7511 = encoder_to_adv7511(encoder);
unsigned int low_refresh_rate;
unsigned int hsync_polarity = 0;
unsigned int vsync_polarity = 0;
if (adv7511->embedded_... | false | false | false | false | false | 0 |
WriteHeader(OBConversion* pConv)
{
ostream& ofs = *pConv->GetOutStream();
set<string> elements;
vector<string> species;
MolSet::iterator itr;
for(itr= OMols.begin();itr!=OMols.end();++itr)
{
const char* title = (*itr)->GetTitle();
if(strcmp(title, "M"))
species.push_back(title);
FOR_ATOMS... | false | false | false | false | false | 0 |
remove_backend(struct Backend_head *head, struct Backend *backend) {
STAILQ_REMOVE(head, backend, Backend, entries);
free_backend(backend);
} | false | false | false | false | false | 0 |
clipToStrokePath(GfxState *state) {
SplashPath *path, *path2;
path = convertPath(state, state->getPath());
path2 = splash->makeStrokePath(path);
delete path;
splash->clipToPath(path2, gFalse);
delete path2;
} | false | false | false | false | false | 0 |
serialize(std::stringstream& ss, size_t indentLevel) const
{
ss << "[";
for (size_t i = 1; i < data.size(); ++i)
{
data[i - 1]->serialize(ss, indentLevel);
ss << ", ";
}
if (data.size() > 0)
{
data[size() - 1]->serialize(ss, indentLevel);
}
ss << "]";
} | false | false | false | false | false | 0 |
endTable()
{
coverSpannedRows();
delete tableStack_.get();
} | false | false | false | false | false | 0 |
gpk_modal_dialog_make_progressbar_pulse (GpkModalDialog *dialog)
{
GtkProgressBar *progress_bar;
if (dialog->priv->pulse_timer_id == 0) {
progress_bar = GTK_PROGRESS_BAR (gtk_builder_get_object (dialog->priv->builder, "progressbar_percent"));
gtk_progress_bar_set_pulse_step (progress_bar, 0.04);
dialog->priv->p... | false | false | false | false | false | 0 |
pqGetErrorNotice2(PGconn *conn, bool isError)
{
PGresult *res = NULL;
PQExpBufferData workBuf;
char *startp;
char *splitp;
/*
* Since the message might be pretty long, we create a temporary
* PQExpBuffer rather than using conn->workBuffer. workBuffer is intended
* for stuff that is expected to be s... | false | false | false | false | false | 0 |
vmw_resource_alloc_id(struct vmw_resource *res)
{
struct vmw_private *dev_priv = res->dev_priv;
int ret;
struct idr *idr = &dev_priv->res_idr[res->func->res_type];
BUG_ON(res->id != -1);
idr_preload(GFP_KERNEL);
write_lock(&dev_priv->resource_lock);
ret = idr_alloc(idr, res, 1, 0, GFP_NOWAIT);
if (ret >= 0)
... | false | false | false | false | false | 0 |
mono_aot_init_llvm_method (gpointer aot_module, guint32 method_index)
{
MonoAotModule *amodule = (MonoAotModule *)aot_module;
gboolean res;
// FIXME: Handle failure
res = init_llvm_method (amodule, method_index, NULL, NULL, NULL);
g_assert (res);
} | false | false | false | false | false | 0 |
e_cell_combo_dispose (GObject *object)
{
ECellCombo *ecc = E_CELL_COMBO (object);
if (ecc->popup_window != NULL) {
gtk_widget_destroy (ecc->popup_window);
ecc->popup_window = NULL;
}
if (ecc->grabbed_keyboard != NULL) {
gdk_device_ungrab (ecc->grabbed_keyboard, GDK_CURRENT_TIME);
g_object_unref (ecc->grab... | false | false | false | false | false | 0 |
qt_reset_color_avail()
{
int i;
for ( i = 0; i < screencount; i++ ) {
screendata[i]->colors_avail = true;
screendata[i]->g_carr_fetch = true; // do XQueryColors if !colors_avail
}
} | false | false | false | false | false | 0 |
utils_unlock(GeanyDocument *doc)
{
if (utils_attrib(doc, SCOPE_LOCK))
{
doc_lock_unlock(doc, FALSE);
g_object_steal_data(G_OBJECT(doc->editor->sci), SCOPE_LOCK);
}
line_mark_unmark(doc, FALSE);
tooltip_remove(doc->editor);
} | false | false | false | false | false | 0 |
test_cant_write_private_without_login (Test *test, gconstpointer unused)
{
GkmDataResult res;
res = gkm_gnome2_file_create_entry (test->data_file, "identifier_private", GKM_GNOME2_FILE_SECTION_PRIVATE);
g_assert (res == GKM_DATA_SUCCESS);
res = gkm_gnome2_file_write_fd (test->data_file, test->write_fd, NULL);
g_... | false | false | false | false | false | 0 |
gst_caps_to_string (const GstCaps * caps)
{
guint i, slen, clen;
GString *s;
/* NOTE: This function is potentially called by the debug system,
* so any calls to gst_log() (and GST_DEBUG(), GST_LOG(), etc.)
* should be careful to avoid recursion. This includes any functions
* called by gst_caps_to_stri... | false | false | false | false | false | 0 |
get_dict_file_name(const DictInfo * mi,
String & main_wl, String & flags)
{
const DictInfoNode * node = reinterpret_cast<const DictInfoNode *>(mi);
if (node->direct) {
main_wl = node->info_file;
flags = "";
return no_err;
} else {
FStream f;
RET_ON_ERR(f.open(node-... | false | false | false | false | false | 0 |
DebugString() const {
string contents = "syntax = \"proto2\";\n\n";
for (int i = 0; i < dependency_count(); i++) {
strings::SubstituteAndAppend(&contents, "import \"$0\";\n",
dependency(i)->name());
}
if (!package().empty()) {
strings::SubstituteAndAppend(&contents, "p... | false | false | false | false | false | 0 |
knh_inferMapObject(CTX ctx, const knh_ClassTBL_t *sct, const knh_ClassTBL_t *tct)
{
if(sct->p1 == CLASS_String) {
return new_TypeMap(ctx, 0, sct->cid, tct->cid, Map_Object);
}
return NULL;
} | false | false | false | false | false | 0 |
ptr_message(struct spptr *pp, const int code)
{
struct remote *rp;
struct sp_omsg rq;
if (!(rp = inl_find_connected(pp->spp_netid)))
return;
rq.spr_act = htons((USHORT) code);
rq.spr_pid = 0;
rq.spr_seq = htons(rp->ht_seqto);
rq.spr_jobno = 0;
rq.spr_arg1 = 0;
rq.spr_arg2 = 0;
rq.spr_netid = myhostid;
... | false | false | false | false | false | 0 |
frame_outbuffer(mpg123_handle *fr)
{
size_t size = mpg123_safe_buffer()*AUDIOBUFSIZE;
if(!fr->own_buffer) fr->buffer.data = NULL;
if(fr->buffer.data != NULL && fr->buffer.size != size)
{
free(fr->buffer.data);
fr->buffer.data = NULL;
}
fr->buffer.size = size;
if(fr->buffer.data == NULL) fr->buffer.data = (un... | false | false | false | false | false | 0 |
v4l2_buffers_mapped(int index)
{
unsigned int i;
if (!v4l2_needs_conversion(index)) {
/* Normal (no conversion) mode */
struct v4l2_buffer buf;
for (i = 0; i < devices[index].no_frames; i++) {
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
buf.memory = V4L2_MEMORY_MMAP;
buf.index = i;
if (devices[index].... | false | false | false | false | false | 0 |
chise_make_hash_table (size_t size)
{
CHISE_HASH_TABLE* hash
= (CHISE_HASH_TABLE*)malloc (sizeof (CHISE_HASH_TABLE));
if (hash == NULL)
return NULL;
hash->data
= (CHISE_HASH_TABLE_ENTRY*) malloc (sizeof (CHISE_HASH_TABLE_ENTRY)
* size);
if (hash->data == NULL)
{
free (hash);
r... | false | true | false | false | false | 1 |
numericoidValidate(
Syntax *syntax,
struct berval *in )
{
struct berval val = *in;
if( BER_BVISEMPTY( &val ) ) {
/* disallow empty strings */
return LDAP_INVALID_SYNTAX;
}
while( OID_LEADCHAR( val.bv_val[0] ) ) {
if ( val.bv_len == 1 ) {
return LDAP_SUCCESS;
}
if ( val.bv_val[0] == '0' && !OID_SEP... | false | false | false | false | false | 0 |
print_key_purpose (gnutls_buffer_st * str, const char *prefix, int type,
cert_type_t cert)
{
int indx;
char *buffer = NULL;
size_t size;
int err;
for (indx = 0;; indx++)
{
size = 0;
if (type == TYPE_CRT)
err = gnutls_x509_crt_get_key_purpose_oid (cert.crt, indx, buf... | false | false | false | false | false | 0 |
parse_str(const char* buf, const char* tag, char* dest, int destlen) {
string str;
const char* p;
int len;
p = strstr(buf, tag);
if (!p) return false;
p = strchr(p, '>');
p++;
const char* q = strchr(p, '<');
if (!q) return false;
len = (int)(q-p);
if (len >= destlen) len = d... | false | false | false | false | false | 0 |
lan87xx_read_status(struct phy_device *phydev)
{
int err = genphy_read_status(phydev);
int i;
if (!phydev->link) {
/* Disable EDPD to wake up PHY */
int rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS);
if (rc < 0)
return rc;
rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS,
rc & ~MII_LAN83C18... | false | false | false | false | false | 0 |
image_load_set_signals(ImageWindow *imd, gboolean override_old_signals)
{
g_assert(imd->il);
if (override_old_signals)
{
/* override the old signals */
g_signal_handlers_disconnect_matched(G_OBJECT(imd->il), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, imd);
}
g_signal_connect(G_OBJECT(imd->il), "area_ready", (GC... | false | false | false | false | false | 0 |
HPCC_FreeBuckets (Bucket_Ptr Buckets, int numPEs)
{
Update_Ptr ptr1, ptr2;
int i;
HPCC_ra_Heap_Free();
for (i = 0; i < numPEs; i ++) {
ptr1 = Buckets[i].updateList;
while (ptr1 != NULL_UPDATE_PTR) {
ptr2 = ptr1;
ptr1 = ptr1->forward;
HPCC_PoolReturnObj(Update_Pool, ptr2);
}
}
... | false | false | false | false | false | 0 |
test_config_read__local_config_overrides_global_config_overrides_system_config(void)
{
git_config *cfg;
int32_t i;
cl_git_pass(git_config_new(&cfg));
cl_git_pass(git_config_add_file_ondisk(cfg, cl_fixture("config/config9"),
GIT_CONFIG_LEVEL_SYSTEM, 0));
cl_git_pass(git_config_add_file_ondisk(cfg, cl_fixture("co... | false | false | false | false | false | 0 |
getLength() const
{
if (address_family==AF_INET)
{
if (ipv4.s_addr == INADDR_BROADCAST) return addressLengthBits();
if (ipv4.s_addr == 0) return 0;
unsigned int n = ntohl(ipv4.s_addr);
int i=0;
while (n)
{
n=n<<1;
i++;
}
... | false | false | false | false | false | 0 |
nmea_cksum(const char* const buf)
{
int x = 0 ;
const char* p;
for (p = buf; *p; p++) {
x ^= *p;
}
return x;
} | false | false | false | false | false | 0 |
scsi_inq_str(unsigned char *buf, unsigned char *inq,
unsigned first, unsigned end)
{
unsigned term = 0, idx;
for (idx = 0; idx + first < end && idx + first < inq[4] + 5; idx++) {
if (inq[idx+first] > ' ') {
buf[idx] = inq[idx+first];
term = idx+1;
} else {
buf[idx] = ' ';
}
}
buf[term] = 0;
... | false | false | false | false | false | 0 |
ParseVarDeclarations(bool is_global)
{
while (scan.GetToken().IsVar())
{
ParseVarDeclarationFactory(is_global ? SYM_VAR_GLOBAL : SYM_VAR_LOCAL);
CheckTokOrDie(TOK_SEMICOLON);
}
} | false | false | false | false | false | 0 |
EvaluateAttributeFilter(OGRFeature* poFeature)
{
return (m_poAttrQuery == NULL
|| m_poAttrQuery->Evaluate( poFeature ));
} | false | false | false | false | false | 0 |
scan(struct jv_parser* p, char ch, jv* out) {
p->column++;
if (ch == '\n') {
p->line++;
p->column = 0;
}
presult answer = 0;
if (p->st == JV_PARSER_NORMAL) {
chclass cls = classify(ch);
if (cls != LITERAL) {
TRY(check_literal(p));
if (check_done(p, out)) answer = OK;
}
swit... | false | false | false | false | false | 0 |
bnx2x_restart_autoneg(struct bnx2x_phy *phy,
struct link_params *params,
u8 enable_cl73)
{
struct bnx2x *bp = params->bp;
u16 mii_control;
DP(NETIF_MSG_LINK, "bnx2x_restart_autoneg\n");
/* Enable and restart BAM/CL37 aneg */
if (enable_cl73) {
CL22_RD_OVER_CL45(bp, phy,
MDIO_REG_BANK_CL73_IEE... | false | false | false | false | false | 0 |
atp_on_tool_delete (GtkButton *button, gpointer user_data)
{
ATPToolDialog *this = (ATPToolDialog *)user_data;
ATPUserTool *tool;
tool = get_current_tool (this);
if ((tool != NULL) && (atp_user_tool_get_storage (tool) > ATP_TSTORE_GLOBAL))
{
if (anjuta_util_dialog_boolean_question (GTK_WINDOW (this->dialog), FA... | false | false | false | false | false | 0 |
plot_x_errorbar (double x, double y, double delta_x, double error_width2, GMT_LONG line) {
double x_1, x_2, y_1, y_2;
GMT_LONG tip1, tip2;
tip1 = tip2 = (error_width2 > 0.0);
GMT_geo_to_xy (x - delta_x, y, &x_1, &y_1);
GMT_geo_to_xy (x + delta_x, y, &x_2, &y_2);
if (GMT_is_dnan (x_1)) {
fprintf (stderr, "%s: W... | false | false | false | false | false | 0 |
qr_imag_cost(const Operand* op0, const Operand* op1)
{
if (! (is_float(op0->tbl.v->type) && is_complex(op1->tbl.v->type))) {
ERROR_TYPE_MISMATCH("IMAG");
}
return load_operand_with_alias_cost(op1, 1, op0->tbl.v->type, op0, 0);
} | false | false | false | false | false | 0 |
setup_peak_filter (GstIirEqualizer * equ, GstIirEqualizerBand * band)
{
gint rate = GST_AUDIO_FILTER_RATE (equ);
g_return_if_fail (rate);
{
gdouble gain, omega, bw;
gdouble alpha, alpha1, alpha2, b0;
gain = arg_to_scale (band->gain);
omega = calculate_omega (band->freq, rate);
bw = calculat... | false | false | false | false | false | 0 |
bfa_flash_sem_get(void __iomem *bar)
{
u32 n = FLASH_BLOCKING_OP_MAX;
while (!bfa_raw_sem_get(bar)) {
if (--n <= 0)
return BFA_STATUS_BADFLASH;
mdelay(10);
}
return BFA_STATUS_OK;
} | false | false | false | false | false | 0 |
gst_mpeg_video_packet_parse_picture_header (const GstMpegVideoPacket * packet,
GstMpegVideoPictureHdr * hdr)
{
GstBitReader br;
if (packet->size < 4)
goto failed;
gst_bit_reader_init (&br, &packet->data[packet->offset], packet->size);
/* temperal sequence number */
if (!gst_bit_reader_get_bits_uint... | false | false | false | false | false | 0 |
stp_set_boolean_parameter(stp_vars_t *v, const char *parameter, int ival)
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_BOOLEAN];
value_t *val;
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
stp_deprintf(STP_DBG_VARS, "stp_set_boolean_parameter(0x%p, %s, %d)\n",
(const void *) v... | false | false | false | false | false | 0 |
mos7810_check(struct usb_serial *serial)
{
int i, pass_count = 0;
u8 *buf;
__u16 data = 0, mcr_data = 0;
__u16 test_pattern = 0x55AA;
int res;
buf = kmalloc(VENDOR_READ_LENGTH, GFP_KERNEL);
if (!buf)
return 0; /* failed to identify 7810 */
/* Store MCR setting */
res = usb_control_msg(serial->dev, usb_rcvc... | false | false | false | false | false | 0 |
snmp_callback_available(int major, int minor)
{
if (major >= MAX_CALLBACK_IDS || minor >= MAX_CALLBACK_SUBIDS) {
return SNMPERR_GENERR;
}
if (_callback_need_init)
init_callbacks();
if (thecallbacks[major][minor] != NULL) {
return SNMPERR_SUCCESS;
}
return SNMPERR_G... | false | false | false | false | false | 0 |
pixConvertToPdfData(PIX *pix,
l_int32 type,
l_int32 quality,
l_uint8 **pdata,
size_t *pnbytes,
l_int32 x,
l_int32 y,
l_int32 res,
... | false | false | false | false | false | 0 |
ex_scriptnames(eap)
exarg_T *eap UNUSED;
{
int i;
for (i = 1; i <= script_items.ga_len && !got_int; ++i)
if (SCRIPT_ITEM(i).sn_name != NULL)
smsg((char_u *)"%3d: %s", i, SCRIPT_ITEM(i).sn_name);
} | false | false | false | false | false | 0 |
__ecereMethod___ecereNameSpace__ecere__gfx3D__Camera_Project(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__gfx3D__Vector3D * vector, struct __ecereNameSpace__ecere__gfx3D__Vector3D * point)
{
struct __ecereNameSpace__ecere__gfx3D__Camera * __ecerePointer___ecereNameSpace__ecere__... | false | false | false | true | false | 1 |
sendBody()
{
// If we have cached data, the it is either a repost or a DAV request so send
// the cached data...
if (m_POSTbuf)
return sendCachedBody();
if (m_iPostDataSize == NO_SIZE) {
// Try the old approach of retireving content data from the job
// before giving up.
if (retrieveAllData())
... | false | false | false | false | false | 0 |
openssl_post_errors(JCR *jcr, int code, const char *errstring)
{
char buf[512];
unsigned long sslerr;
/* Pop errors off of the per-thread queue */
while((sslerr = ERR_get_error()) != 0) {
/* Acquire the human readable string */
ERR_error_string_n(sslerr, buf, sizeof(buf));
Dmsg3(50, "jcr=... | false | false | false | false | false | 0 |
writeData( const char *data /*0 to finish*/, qint64 len )
{
KFilterBase* filter = d->filter;
Q_ASSERT ( filter->mode() == QIODevice::WriteOnly );
// If we had an error, return 0.
if ( d->result != KFilterBase::Ok )
return 0;
bool finish = (data == 0L);
if (!finish)
{
filter-... | false | false | false | false | false | 0 |
DetachGlobal() {
if (IsDeadCheck("v8::Context::DetachGlobal()")) return;
ENTER_V8;
i::Object** ctx = reinterpret_cast<i::Object**>(this);
i::Handle<i::Context> context =
i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx));
i::Bootstrapper::DetachGlobal(context);
} | false | false | false | false | false | 0 |
is_sdma_eng_name(char *buf, size_t bsize, unsigned int source)
{
/* what interrupt */
unsigned int what = source / TXE_NUM_SDMA_ENGINES;
/* which engine */
unsigned int which = source % TXE_NUM_SDMA_ENGINES;
if (likely(what < 3))
snprintf(buf, bsize, "%s%u", sdma_int_names[what], which);
else
snprintf(buf, ... | false | false | false | false | false | 0 |
timerEvent( QTimerEvent *ev )
{
if( ev->timerId() == m_trackBarAnimationTimer )
animateTrackLabels();
else
QToolBar::timerEvent( ev );
} | false | false | false | false | false | 0 |
mod_secdownload_patch_connection(server *srv, connection *con, plugin_data *p) {
size_t i, j;
plugin_config *s = p->config_storage[0];
PATCH(secret);
PATCH(doc_root);
PATCH(uri_prefix);
PATCH(timeout);
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
data_config *dc... | false | false | false | false | false | 0 |
gx_forward_include_color_space(gx_device *dev, gs_color_space *cspace,
const byte *res_name, int name_length)
{
gx_device_forward * const fdev = (gx_device_forward *)dev;
gx_device *tdev = fdev->target;
/* Note that clist sets fdev->target == fdev,
so this function is unapplicable to cli... | false | false | false | false | false | 0 |
iodbcdm_drvconn_dialbox (
HWND hwnd,
LPSTR szInOutConnStr,
DWORD cbInOutConnStr,
int * sqlStat,
SQLUSMALLINT fDriverCompletion,
UWORD *config)
{
RETCODE retcode = SQL_ERROR;
wchar_t *_string_w = NULL;
if (cbInOutConnStr > 0)
{
if ((_string_w = malloc (cbInOutConnStr * sizeof(wch... | false | true | false | false | false | 1 |
main(int argc, char* argv[])
{
if( argc < 3 )
return printhelp(NULL);
bool vertexShader = false, freename = false;
const char* source = 0;
char* dest = 0;
for( int i=1; i < argc; i++ )
{
if( argv[i][0] == '-' )
{
if( 0 == strcmp("-v", argv[i]) )
vertexShader = true;
if( 0 == strcmp("-f", argv[i]... | false | false | false | false | false | 0 |
gf_odf_write_od_update(GF_BitStream *bs, GF_ODUpdate *odUp)
{
GF_Err e;
GF_Descriptor *tmp;
u32 size, i;
if (! odUp) return GF_BAD_PARAM;
e = gf_odf_size_od_update(odUp, &size);
if (e) return e;
gf_odf_write_base_descriptor(bs, odUp->tag, size);
if (e) return e;
i=0;
while ((tmp = (GF_Descriptor *)gf_list_e... | false | false | false | false | false | 0 |
cpl_table_get_column_names(const cpl_table *table)
{
cpl_array *names;
cpl_size i;
if (table == NULL) {
cpl_error_set_(CPL_ERROR_NULL_INPUT);
return NULL;
}
names = cpl_array_new(table->nc, CPL_TYPE_STRING);
for (i = 0; i < table->nc; i++)
cpl_array_set_string(names... | false | false | false | false | false | 0 |
sensor_hub_resume(struct hid_device *hdev)
{
struct sensor_hub_data *pdata = hid_get_drvdata(hdev);
struct hid_sensor_hub_callbacks_list *callback;
unsigned long flags;
hid_dbg(hdev, " sensor_hub_resume\n");
spin_lock_irqsave(&pdata->dyn_callback_lock, flags);
list_for_each_entry(callback, &pdata->dyn_callback_l... | false | false | false | false | false | 0 |
j2k_destroy_compress(opj_j2k_t *j2k) {
int tileno;
if(!j2k) return;
if(j2k->cp != NULL) {
opj_cp_t *cp = j2k->cp;
if(cp->comment) {
opj_free(cp->comment);
}
if(cp->matrice) {
opj_free(cp->matrice);
}
for (tileno = 0; tileno < cp->tw * cp->th; tileno++) {
opj_free(cp->tcps[tileno].tccps);
}
... | false | false | false | false | false | 0 |
IsLynxScanEqui( LynxEqui, Name )
chain_list *LynxEqui;
char *Name;
{
chain_list *Index;
rdsbegin();
for ( Index = LynxEqui;
Index != (chain_list *)0;
Index = Index->NEXT )
{
if ( (char *)(Index->DATA) == Name ) break;
}
rdsend();
return ( Index != (chain_list *)0 );
} | false | false | false | false | false | 0 |
init_handles_slot (int idx)
{
int thr_ret;
thr_ret = mono_os_mutex_lock (&scan_mutex);
g_assert (thr_ret == 0);
if (_wapi_private_handles [idx] == NULL) {
_wapi_private_handles [idx] = g_new0 (struct _WapiHandleUnshared,
_WAPI_HANDLE_INITIAL_COUNT);
g_assert (_wapi_private_handles [idx]);
}
th... | false | false | false | false | false | 0 |
gst_implements_interface_cast (gpointer from, GType iface_type)
{
GstImplementsInterface *iface;
/* check cast, give warning+fail if it's invalid */
if (!(iface = G_TYPE_CHECK_INSTANCE_CAST (from, iface_type,
GstImplementsInterface))) {
return NULL;
}
/* if we're an element, take care that... | false | false | false | false | false | 0 |
free_data_refs (vec<data_reference_p> datarefs)
{
unsigned int i;
struct data_reference *dr;
FOR_EACH_VEC_ELT (datarefs, i, dr)
free_data_ref (dr);
datarefs.release ();
} | false | false | false | false | false | 0 |
run_all_rng_tests (const char *program)
{
static const char *options[] = {
"--early-rng-check",
"--early-rng-check --prefer-standard-rng",
"--early-rng-check --prefer-fips-rng",
"--early-rng-check --prefer-system-rng",
"--prefer-standard-rng",
"--prefer-fips-rng",
"--prefer-system-rng",
... | false | false | false | false | false | 0 |
__filter_xattrs (dict_t *dict)
{
struct list_head keys;
struct _xattr_key *key;
struct _xattr_key *tmp;
INIT_LIST_HEAD (&keys);
dict_foreach (dict, __gather_xattr_keys,
(void *) &keys);
list_for_each_entry_safe (key, tmp, &keys, list) {
... | false | false | false | false | false | 0 |
dup_node(struct node *p)
{
struct node *node_left, *node_right;
struct node *d;
if(!p)
return NULL;
d = cli_malloc(sizeof(*d));
if(!d) {
cli_errmsg("dup_node: Unable to allocate memory for duplicate node\n");
return NULL;
}
d->type = p->type;
d->parent = NULL;
switch(p->type) {
case leaf:
... | false | false | false | false | false | 0 |
deinit()
{
if(init_flag)
{
mem_del(firm_build_array);
mem_del(firm_bitmap_array);
res_bitmap.deinit();
init_flag = 0;
}
} | false | false | false | false | false | 0 |
main(int argc, char *argv[])
{
if (argc < 2) {
fprintf(stderr, "%s <file>\n", argv[0]);
return -1;
}
if (load_matrix(argv[1]) < 0) {
fprintf(stderr, "Error on reading intergers from file: %s\n", argv[1]);
return -1;
}
//vertex_vertices_dump ();
//edge_dump ();
... | false | false | false | false | false | 0 |
xfs_buf_item_pin(
struct xfs_log_item *lip)
{
struct xfs_buf_log_item *bip = BUF_ITEM(lip);
ASSERT(atomic_read(&bip->bli_refcount) > 0);
ASSERT((bip->bli_flags & XFS_BLI_LOGGED) ||
(bip->bli_flags & XFS_BLI_ORDERED) ||
(bip->bli_flags & XFS_BLI_STALE));
trace_xfs_buf_item_pin(bip);
atomic_inc(&... | false | false | false | false | false | 0 |
prestlv_print(register const u_char * pptr, register u_int len,
u_int16_t op_msk _U_, int indent)
{
const struct forces_tlv *tlv = (struct forces_tlv *)pptr;
register const u_char *tdp = (u_char *) TLV_DATA(tlv);
struct res_val *r = (struct res_val *)tdp;
u_int dlen;
/*
* pdatacnt_print() has ensured tha... | 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.