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 |
|---|---|---|---|---|---|---|
iscsi_handle_chap_c_value ( struct iscsi_session *iscsi,
const char *value ) {
char buf[3];
char *endp;
uint8_t byte;
unsigned int i;
/* Check and strip leading "0x" */
if ( ( value[0] != '0' ) || ( value[1] != 'x' ) ) {
DBGC ( iscsi, "iSCSI %p saw invalid CHAP challenge \"%s\"\n",
iscsi, v... | true | true | false | false | true | 1 |
identities_cleanup(void)
{
default_identity = NULL;
if(!list_empty(&identities))
{
struct list_head *ptr, *tmp;
list_for_each_safe(ptr, tmp, &identities)
{
identity_t *identity;
identity = list_entry(ptr, identity_t, list);
list_del(ptr);
identity_free(identity);
}
}
} | false | false | false | false | false | 0 |
ask_password_with_getpass (GSimpleAsyncResult *res,
GObject *object,
GCancellable *cancellable)
{
GTlsPassword *password;
GError *error = NULL;
password = g_simple_async_result_get_op_res_gpointer (res);
console_interaction_ask_pas... | false | false | false | false | false | 0 |
_buddy_alloc(unsigned order,
uint32_t* seg,
mca_memheap_buddy_heap_t *heap)
{
uint32_t o;
uint32_t m;
MEMHEAP_VERBOSE(20, "order=%d size=%d", order, 1<<order);
OPAL_THREAD_LOCK(&memheap_buddy.lock);
for (o = order; o <= heap->max_order; ++o) {
... | false | false | false | false | false | 0 |
cxgb_netpoll(struct net_device *dev)
{
struct port_info *pi = netdev_priv(dev);
struct adapter *adap = pi->adapter;
if (adap->flags & USING_MSIX) {
int i;
struct sge_eth_rxq *rx = &adap->sge.ethrxq[pi->first_qset];
for (i = pi->nqsets; i; i--, rx++)
t4_sge_intr_msix(0, &rx->rspq);
} else
t4_intr_handle... | false | false | false | false | false | 0 |
parse_plugin_type (const gchar *option_name,
const gchar *value,
gpointer data,
GError **error)
{
const char types[TOTEM_PLUGIN_TYPE_LAST][12] = {
"gmp",
"narrowspace",
"mully",
"cone",
"vegas"
};
TotemPluginType type;
for (type = 0; type < TOTEM_PLUGIN_TYPE_LAST; ++ty... | true | true | false | false | false | 1 |
test_simplewrite(void)
{
struct event ev;
/* Very simple write test */
setup_test("Simple write: ");
event_set(&ev, pair[0], EV_WRITE, simple_write_cb, &ev);
if (event_add(&ev, NULL) == -1)
exit(1);
event_dispatch();
cleanup_test();
} | false | false | false | false | false | 0 |
sample_process(struct proxy *px, struct session *l4, void *l7,
unsigned int opt,
struct sample_expr *expr, struct sample *p)
{
struct sample_conv_expr *conv_expr;
if (p == NULL) {
p = &temp_smp;
memset(p, 0, sizeof(*p));
}
if (!expr->fetch->process(p... | false | false | false | false | false | 0 |
list_object_tree(void)
{ int i;
printf("obj par nxt chl Object tree:\n");
for (i=0; i<no_objects; i++)
printf("%3d %3d %3d %3d\n",
i+1,objectsz[i].parent,objectsz[i].next, objectsz[i].child);
} | false | false | false | false | false | 0 |
PrintSelf( std::ostream& os, Indent indent ) const
{
Superclass::PrintSelf( os, indent );
os<<indent<<"Create swarm using [normal, uniform] distribution: ";
os<<"["<<this->m_InitializeNormalDistribution<<", ";
os<<!this->m_InitializeNormalDistribution<<"]\n";
os<<indent<<"Number of particles in swarm: "<<thi... | false | false | false | false | false | 0 |
Zseek(ZFILE *stream, long offset, int whence)
{
long newoffset;
RUNTIMECHECK;
if (ZS->errorencountered) return -1;
CACHEUPDATE;
if (whence == SEEK_SET)
{
newoffset = offset;
}
else if (whence == SEEK_CUR)
{
newoffset = ZS->fileposition + offset;
}
else if (whence == SEEK_END)
{
n... | false | false | false | false | false | 0 |
reloc_name(unsigned long r_type)
{
static const char *r_name[] = {
"R_X86_64_NONE",
"R_X86_64_64",
"R_X86_64_PC32",
"R_X86_64_GOT32",
"R_X86_64_PLT32",
"R_X86_64_COPY",
"R_X86_64_GLOB_DAT",
"R_X86_64_JUMP_SLOT",
"R_X86_64_RELATIVE",
"R_X86_64_GOTPCREL",
"R_X86_64_32",
"R_X86_64_32S",
"R_X86_64_16",
"R_X8... | false | false | false | false | false | 0 |
PrintSelf(std::ostream & os, Indent indent) const
{
Superclass::PrintSelf(os, indent);
os << indent << "Dimension: " << this->GetImageDimension() << std::endl;
os << indent << "Index: ";
for ( ImageIORegion::IndexType::const_iterator i = this->GetIndex().begin();
i != this->GetIndex().end(); ++i )
... | false | false | false | false | false | 0 |
initUIEvent(const DOMString &typeArg,
bool canBubbleArg,
bool cancelableArg,
AbstractViewImpl* viewArg,
long detailArg)
{
EventImpl::initEvent(typeArg,canBubbleArg,cancelableArg);
if (viewArg)
viewArg->ref();
if (m_view)
m_view->deref();
m_view = viewAr... | false | false | false | false | false | 0 |
flickcurl_build_tag_namespaces(flickcurl* fc, xmlXPathContextPtr xpathCtx,
const xmlChar* xpathExpr, int* namespace_count_p)
{
flickcurl_tag_namespace** tag_namespaces = NULL;
int nodes_count;
int tag_namespace_count;
int i;
xmlXPathObjectPtr xpathObj = NULL;
xmlNodeSetPtr nod... | false | true | true | false | true | 1 |
validatePage()
{
if (name->text() != "") {
DeviceConfigurations all;
DeviceConfiguration add;
// lets update 'here' with what we did then...
add.type = wizard->type;
add.name = name->text();
add.portSpec = port->text();
add.deviceProfile = profile->text();
... | false | false | false | false | false | 0 |
xmlSchemaAddAnnotation(xmlSchemaAnnotItemPtr annItem,
xmlSchemaAnnotPtr annot)
{
if ((annItem == NULL) || (annot == NULL))
return (NULL);
switch (annItem->type) {
case XML_SCHEMA_TYPE_ELEMENT: {
xmlSchemaElementPtr item = (xmlSchemaElementPtr) annItem;
... | false | false | false | false | false | 0 |
pyra_init_pyra_device_struct(struct usb_device *usb_dev,
struct pyra_device *pyra)
{
struct pyra_settings settings;
int retval, i;
mutex_init(&pyra->pyra_lock);
retval = pyra_get_settings(usb_dev, &settings);
if (retval)
return retval;
for (i = 0; i < 5; ++i) {
retval = pyra_get_profile_settings(usb_dev,... | false | false | false | false | false | 0 |
IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) {
int end = Length();
int spaceFlags = 0;
// Determines the indentation level of the current line and also checks for consistent
// indentation compared to the previous line.
// Indentation is judged consistent when the indentation whitespa... | false | false | false | false | false | 0 |
gf_odf_size_ipmp_tool_list(GF_IPMP_ToolList *ipmptl, u32 *outSize)
{
if (!ipmptl) return GF_BAD_PARAM;
*outSize = 0;
return gf_odf_size_descriptor_list(ipmptl->ipmp_tools, outSize);
} | false | false | false | false | false | 0 |
formatHex(
char * pszBuf,
FLMBYTE ucChar)
{
FLMUINT uiNibble = ((FLMUINT)ucChar >> 4) & 0xF;
*pszBuf++ = (char)(uiNibble <= 9
? (char)(uiNibble + '0')
: (char)(uiNibble - 10 + 'A'));
uiNibble = (FLMUINT)ucChar & 0xF;
*pszBuf = (char)(uiNibble <= 9
? (char)(uiNibble + '0')
... | false | false | false | false | false | 0 |
modify_param(int narg, char **arg)
{
if (strcmp(arg[0],"unwrap") == 0) {
if (narg < 2) error->all(FLERR,"Illegal dump_modify command");
if (strcmp(arg[1],"yes") == 0) unwrap_flag = 1;
else if (strcmp(arg[1],"no") == 0) unwrap_flag = 0;
else error->all(FLERR,"Illegal dump_modify command");
return 2... | false | false | false | false | false | 0 |
fcp_avc_transaction(struct fw_unit *unit,
const void *command, unsigned int command_size,
void *response, unsigned int response_size,
unsigned int response_match_bytes)
{
struct fcp_transaction t;
int tcode, ret, tries = 0;
t.unit = unit;
t.response_buffer = response;
t.response_size = response_size;
t.... | false | false | false | false | false | 0 |
panel_background_set_type (PanelBackground *background,
PanelBackgroundType type)
{
if (background->type == type)
return;
free_transformed_resources (background);
background->type = type;
panel_background_update_has_alpha (background);
panel_background_transform (background);
} | false | false | false | false | false | 0 |
gupnp_service_info_get_introspection (GUPnPServiceInfo *info,
GError **error)
{
GUPnPServiceIntrospection *introspection;
SoupSession *session;
SoupMessage *msg;
int status;
char *scpd_url;
xmlDoc *scpd;
g_return_val... | false | false | false | false | false | 0 |
checkValidMain(const Expr& e2)
{
Theorem thm;
QueryResult qres = checkValidRec(thm);
if (qres == SATISFIABLE && d_core->incomplete()) qres = UNKNOWN;
if (qres == SATISFIABLE) {
DebugAssert(d_goal.get().getExpr().isTrue(),
"checkValid: Expected true goal");
vector<Expr> a;
d_goal.g... | false | false | false | false | false | 0 |
lg4ff_deinit(struct hid_device *hid)
{
struct lg4ff_device_entry *entry;
struct lg_drv_data *drv_data;
drv_data = hid_get_drvdata(hid);
if (!drv_data) {
hid_err(hid, "Error while deinitializing device, no private driver data.\n");
return -1;
}
entry = drv_data->device_props;
if (!entry)
goto out; /* Nothi... | false | false | false | false | false | 0 |
Value() const {
if (IsDeadCheck(i::Isolate::Current(), "v8::External::Value()")) return 0;
i::Handle<i::Object> obj = Utils::OpenHandle(this);
return ExternalValueImpl(obj);
} | false | false | false | false | false | 0 |
fetchUser(int user_id) {
ostringstream userKey;
userKey << user_id;
return Users::fetchUser(userKey.str());
} | false | false | false | false | false | 0 |
embDbiSortClose(AjPFile* elistfile, AjPFile* alistfile, ajuint nfields)
{
ajuint ifield;
ajFileClose(elistfile);
for(ifield=0; ifield < nfields; ifield++)
ajFileClose(&alistfile[ifield]);
return;
} | false | false | false | false | false | 0 |
fill_buffer(char *content, int fill, int size)
{
char *end = content + size;
while (content < end)
{
if (fill > 0)
{
*content = FULL_CHAR;
fill--;
}
else
{
*content = FREE_CHAR;
}
content++;
}
} | false | false | false | false | false | 0 |
recurring_action_timer(gpointer data)
{
svc_action_t *op = data;
crm_debug("Scheduling another invokation of %s", op->id);
/* Clean out the old result */
free(op->stdout_data);
op->stdout_data = NULL;
free(op->stderr_data);
op->stderr_data = NULL;
services_action_async(op, NULL);
... | false | false | false | false | false | 0 |
spool_store_get_name (CamelService *service,
gboolean brief)
{
CamelLocalSettings *local_settings;
CamelSpoolStore *spool_store;
CamelSettings *settings;
gchar *name;
gchar *path;
spool_store = CAMEL_SPOOL_STORE (service);
settings = camel_service_ref_settings (service);
local_settings ... | false | false | false | false | false | 0 |
atkbd_set_scroll(struct atkbd *atkbd, const char *buf, size_t count)
{
struct input_dev *old_dev, *new_dev;
unsigned int value;
int err;
bool old_scroll;
err = kstrtouint(buf, 10, &value);
if (err)
return err;
if (value > 1)
return -EINVAL;
if (atkbd->scroll != value) {
old_dev = atkbd->dev;
old_scro... | false | false | false | false | false | 0 |
bcm_sysport_set_coalesce(struct net_device *dev,
struct ethtool_coalesce *ec)
{
struct bcm_sysport_priv *priv = netdev_priv(dev);
unsigned int i;
u32 reg;
/* Base system clock is 125Mhz, DMA timeout is this reference clock
* divided by 1024, which yield roughly 8.192 us, our maximum value has
* to fit ... | false | false | false | false | false | 0 |
hash_insert (Hash_table *table, const void *entry)
{
void *data;
struct hash_entry *bucket;
/* The caller cannot insert a NULL entry. */
if (! entry)
abort ();
/* If there's a matching entry already in the table, return that. */
if ((data = hash_find_entry (table, entry, &bucket, false)) != NULL)
... | false | false | false | false | false | 0 |
patch_stats(struct patch *patch)
{
int lines = patch->lines_added + patch->lines_deleted;
if (lines > max_change)
max_change = lines;
if (patch->old_name) {
int len = quote_c_style(patch->old_name, NULL, NULL, 0);
if (!len)
len = strlen(patch->old_name);
if (len > max_len)
max_len = len;
}
if (patch... | false | false | false | false | false | 0 |
RotationRueck( Point& X0, Matrix& R, double& mx, double& my, double& mz)
{
//Punkttransformation
Matrix x(3,1,Null);
x(0,0)=(*this).m_x;
x(1,0)=(*this).m_y;
x(2,0)=(*this).m_z;
Matrix X0_(3,1,Null);
X0_(0,0)=X0.m_x;
X0_(1,0)=X0.m_y;
X0_(2,0)=X0.m_z;
Matrix X =x.MatSub(X0_);
Ma... | false | false | false | false | false | 0 |
startRendering()
{
glGenTextures(1, &m_realTextureObj); // this crashes sometimes!!!! (jmz)
if(GLEW_VERSION_1_3) {
glActiveTexture(GL_TEXTURE0_ARB + m_texunit);
}
glBindTexture(m_textureType, m_realTextureObj);
m_textureObj=m_realTextureObj;
setUpTextureState();
m_dataSize[0] = m_dataSize[1] = m_data... | false | false | false | false | false | 0 |
parse_hex_byte (bmc_device_state_data_t *state_data,
char *from,
uint8_t *to,
char *str)
{
char *endptr;
int i;
assert (state_data);
assert (from);
assert (to);
assert (str);
if (strlen (from) >= 2)
{
if (!strncmp (from, "0x", 2))
from +=... | false | false | false | false | false | 0 |
skin_load_group (GtkWidget * window)
{
static int loaded = 0;
if (loaded)
return;
loaded = 1;
GdkPixbuf *tmp_pixbuf;
gchar skin_file[256];
sprintf (skin_file, "%s/group.png", Skin->dir);
tmp_pixbuf = gdk_pixbuf_new_from_file (skin_file, NULL);
skin_load_pixmap_1 (window, tmp_pixbuf, &(Skin->group.group));
... | false | false | false | false | false | 0 |
_del_FreeList(FreeList *fl, int force)
{
if(fl) {
/*
* Check whether any nodes are in use.
*/
if(!force && _busy_FreeListNodes(fl) != 0) {
errno = EBUSY;
return NULL;
};
/*
* Delete the list blocks.
*/
{
FreeListBlock *next = fl->block;
while(next) {
FreeListBlock *block = nex... | false | false | false | false | false | 0 |
X_productions(VOID)
{
switch(pp->cat)
{
case expr:
{
if(cat1==expr)SQUASH(pp,2,expr,0,5);
else if(cat1==semi)
{
b_app1(pp);
REDUCE(pp,2,stmt,-1,6);
}
}
break;
case stmt:
{
if(cat1==stmt)
{
b_app1(pp);
b_app(force);
b_app1(pp+1);
REDUCE(pp,2,stmt,-1,250);
}
}
break;
}
} | false | false | false | false | false | 0 |
gretl_bundle_get_series (gretl_bundle *bundle,
const char *key,
int *n, int *err)
{
double *x = NULL;
GretlType type;
void *ptr;
ptr = gretl_bundle_get_data(bundle, key, &type, n, err);
if (!*err && type != GRETL_TYPE_SERIES) {
*err = E_TYPES;
}
if (!*err) {
x = (double *) ptr;... | false | false | false | false | false | 0 |
Select()
{
vtkSelection* sel = 0;
if (this->CaptureBuffers())
{
sel = this->GenerateSelection();
this->ReleasePixBuffers();
}
return sel;
} | false | false | false | false | false | 0 |
resize(int newLength) {
char *s1 = s;
if (!s || (roundedSize(length) != roundedSize(newLength))) {
// requires re-allocating data for string
if (newLength < STR_STATIC_SIZE) {
s1 = sStatic;
} else {
// allocate a rounded amount
if (s == sStatic)
s1 = (char*)gmalloc(roundedSize(newLen... | false | false | false | false | true | 1 |
end_of_format (NODE_T * p, A68_REF ref_file)
{
/*
Format-items return immediately to the embedding format text. The outermost
format text calls "on format end".
*/
A68_FILE *file = FILE_DEREF (&ref_file);
NODE_T *dollar = SUB (BODY (&FORMAT (file)));
A68_FORMAT *save = (A68_FORMAT *) FRAME_LOCAL (frame_pointer, O... | false | false | false | false | false | 0 |
rhash_transmit(unsigned msg_id, void* dst, rhash_uptr_t ldata, rhash_uptr_t rdata)
{
rhash ctx = (rhash)dst; /* for messages working with rhash context */
switch(msg_id) {
case RMSG_GET_CONTEXT:
{
unsigned i;
for(i = 0; i < ctx->hash_vector_size; i++) {
struct rhash_hash_info* info = ctx->vector[i].hash... | false | false | false | false | false | 0 |
multikey_qsort(StringPair **Begin, StringPair **End, int Pos) {
tailcall:
if (End - Begin <= 1)
return;
// Partition items. Items in [Begin, P) are greater than the pivot,
// [P, Q) are the same as the pivot, and [Q, End) are less than the pivot.
int Pivot = charTailAt(*Begin, Pos);
StringPair **P = Begi... | false | false | false | false | false | 0 |
setConfigMinMax(eConfigFloatValues index, char const* fieldname, float defvalue, float minvalue, float maxvalue)
{
setConfig(index, fieldname, defvalue);
if (getConfig(index) < minvalue)
{
sLog.outError("%s (%f) must be in range %f...%f. Using %f instead.", fieldname, getConfig(index), minvalue, max... | false | false | false | false | false | 0 |
checkValid(const Polygon *g)
{
checkInvalidCoordinates(g);
if (validErr != NULL) return;
checkClosedRings(g);
if (validErr != NULL) return;
GeometryGraph graph(0,g);
checkTooFewPoints(&graph);
if (validErr!=NULL) return;
checkConsistentArea(&graph);
if (validErr!=NULL) return;
if (!isSelfTouchingRingForm... | false | false | false | false | false | 0 |
cfi_staa_resume(struct mtd_info *mtd)
{
struct map_info *map = mtd->priv;
struct cfi_private *cfi = map->fldrv_priv;
int i;
struct flchip *chip;
for (i=0; i<cfi->numchips; i++) {
chip = &cfi->chips[i];
mutex_lock(&chip->mutex);
/* Go to known state. Chip may have been power cycled */
if (chip->state ==... | false | false | false | false | false | 0 |
ap_sta_info_defer_update(struct adapter *padapter, struct sta_info *psta)
{
if (psta->state & _FW_LINKED) {
/* add ratid */
add_RATid(padapter, psta, 0);/* DM_RATR_STA_INIT */
}
} | false | false | false | false | false | 0 |
valleyview_check_pctx(struct drm_i915_private *dev_priv)
{
unsigned long pctx_addr = I915_READ(VLV_PCBR) & ~4095;
WARN_ON(pctx_addr != dev_priv->mm.stolen_base +
dev_priv->vlv_pctx->stolen->start);
} | false | false | false | false | false | 0 |
gst_rtp_vorbis_depay_parse_inband_configuration (GstRtpVorbisDepay *
rtpvorbisdepay, guint ident, guint8 * configuration, guint size,
guint length)
{
GstBuffer *confbuf;
GstMapInfo map;
if (G_UNLIKELY (size < 4))
return FALSE;
/* transform inline to out-of-band and parse that one */
confbuf = gs... | false | false | false | false | false | 0 |
FDKaacEnc_getChannelAssignment(CHANNEL_MODE encMode, CHANNEL_ORDER co)
{
const CHANNEL_ASSIGNMENT_INFO_TAB *pTab;
int i;
if (co == CH_ORDER_MPEG)
pTab = assignmentInfoTabMpeg;
else if (co == CH_ORDER_WAV)
pTab = assignmentInfoTabWav;
else
pTab = assignmentInfoTabWg4;
for(i=MAX_MODES-1; i>0; i-... | false | false | false | false | false | 0 |
FLAC__window_bartlett_hann(FLAC__real *window, const FLAC__int32 L)
{
const FLAC__int32 N = L - 1;
FLAC__int32 n;
for (n = 0; n < L; n++)
window[n] = (FLAC__real)(0.62f - 0.48f * fabs((float)n/(float)N+0.5f) + 0.38f * cos(2.0f * M_PI * ((float)n/(float)N+0.5f)));
} | false | false | false | false | false | 0 |
dwc2_deactivate_qh(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh,
int free_qtd)
{
int continue_split = 0;
struct dwc2_qtd *qtd;
if (dbg_qh(qh))
dev_vdbg(hsotg->dev, " %s(%p,%p,%d)\n", __func__,
hsotg, qh, free_qtd);
if (list_empty(&qh->qtd_list)) {
dev_dbg(hsotg->dev, "## QTD list empty ##\n");
... | false | false | false | false | false | 0 |
xMenu_Set (edict_t * ent)
{
int i;
//setting title
X_MENU->themenu[0].text = X_MENU->xmenuentries[0].name;
X_MENU->themenu[0].align = PMENU_ALIGN_CENTER;
X_MENU->themenu[1].text = NULL;
X_MENU->themenu[1].align = PMENU_ALIGN_CENTER;
X_MENU->themenu[2].text = X_MENU->xmenuentries[1].name;
X_MENU->themenu[2].ali... | false | false | false | false | false | 0 |
show_fontsel(GtkWidget *widget,gpointer *data){
const gchar *fontname=NULL;
LOG(LOG_DEBUG, "IN : show_fontsel()");
font_no = (gint)(intptr_t)data;
fontsel_dlg = gtk_font_selection_dialog_new("Please select font");
g_signal_connect(G_OBJECT (fontsel_dlg), "delete_event",
G_CALLBACK(delete_fontsel), NULL);
... | false | false | false | false | false | 0 |
jit_init (pTHX)
{
dSP;
SV *load, *save;
char *map_base;
char *load_ptr, *save_ptr;
STRLEN load_len, save_len, map_len;
int count;
eval_pv ("require 'Coro/jit-" CORO_JIT_TYPE ".pl'", 1);
PUSHMARK (SP);
#define VARx(name,expr,type) pushav_4uv (aTHX_ (UV)&(expr), sizeof (expr), offsetof (perl_slots, na... | false | false | false | false | false | 0 |
map_madt_entry(int type, u32 acpi_id)
{
unsigned long madt_end, entry;
phys_cpuid_t phys_id = PHYS_CPUID_INVALID; /* CPU hardware ID */
struct acpi_table_madt *madt;
madt = get_madt_table();
if (!madt)
return phys_id;
entry = (unsigned long)madt;
madt_end = entry + madt->header.length;
/* Parse all entries... | false | false | false | false | false | 0 |
test_container_bitarray(void)
{
bitarray_t *ba = NULL;
int i, j, ok=1;
ba = bitarray_init_zero(1);
test_assert(ba);
test_assert(! bitarray_is_set(ba, 0));
bitarray_set(ba, 0);
test_assert(bitarray_is_set(ba, 0));
bitarray_clear(ba, 0);
test_assert(! bitarray_is_set(ba, 0));
bitarray_free(ba);
ba... | false | false | false | false | false | 0 |
H5Pset_obj_track_times(hid_t plist_id, hbool_t track_times)
{
H5P_genplist_t *plist; /* Property list pointer */
uint8_t ohdr_flags; /* Object header flags */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(H5Pset_obj_track_times, FAIL)
H5TRACE2("e... | false | false | false | false | false | 0 |
win_kxkx(const board_t * board, int colour) {
int me, opp;
int att, def;
int dist;
int value;
ASSERT(board!=NULL);
ASSERT(colour==White||colour==Black);
ASSERT(board->piece_nb==4);
ASSERT(board->pawn_size[White]==0);
ASSERT(board->pawn_size[Black]==0);
// init
me = colour;
opp =... | false | false | false | false | false | 0 |
httpHeaderParseQuotedString(const char *start, String * val)
{
const char *end, *pos;
stringClean(val);
if (*start != '"') {
debug(66, 2) ("failed to parse a quoted-string header field near '%s'\n", start);
return 0;
}
pos = start + 1;
while (*pos != '"') {
int quoted = (*pos == '\\');
if (... | false | false | false | false | false | 0 |
dgl_initialize_V2(dglGraph_s * pgraph)
{
if (pgraph->pNodeTree == NULL)
pgraph->pNodeTree =
avl_create(dglTreeNode2Compare, NULL, dglTreeGetAllocator());
if (pgraph->pNodeTree == NULL) {
pgraph->iErrno = DGL_ERR_MemoryExhausted;
return -pgraph->iErrno;
}
if (pgraph->pEdgeTree == NULL)
pgraph->p... | false | false | false | false | false | 0 |
get_signal_opts(char *optarg, uint16_t *warn_signal, uint16_t *warn_time,
uint16_t *warn_flags)
{
char *endptr;
long num;
if (optarg == NULL)
return -1;
if (!strncasecmp(optarg, "B:", 2)) {
*warn_flags = KILL_JOB_BATCH;
optarg += 2;
}
endptr = strchr(optarg, '@');
if (endptr)
endptr[0] = '\0';
... | false | false | false | false | false | 0 |
rk_tsadcv2_control(void __iomem *regs, bool enable)
{
u32 val;
val = readl_relaxed(regs + TSADCV2_AUTO_CON);
if (enable)
val |= TSADCV2_AUTO_EN;
else
val &= ~TSADCV2_AUTO_EN;
writel_relaxed(val, regs + TSADCV2_AUTO_CON);
} | false | false | false | false | false | 0 |
maybe_transfer_grabs (saver_screen_info *ssi,
Window old_w, Window new_w,
int new_screen_no)
{
saver_info *si = ssi->global;
/* If the old window held our mouse grab, transfer the grab to the new
window. (Grab the server while so doing, to avoid a race condition.)
... | false | false | false | false | false | 0 |
r600_get_array_mode_alignment(struct array_mode_checker *values,
u32 *pitch_align,
u32 *height_align,
u32 *depth_align,
u64 *base_align)
{
u32 tile_width = 8;
u32 tile_height = 8;
u32 macro_tile_width = values->nbanks;
u32 macro_tile_height = values->npipes;
u32 tile_bytes = tile_width * ti... | false | false | false | false | false | 0 |
print_sinfo_reservation(reserve_info_msg_t *resv_ptr)
{
reserve_info_t *reserve_ptr = NULL;
char format[64];
int i, width = 9;
reserve_ptr = resv_ptr->reservation_array;
if (!params.no_header) {
for (i = 0; i < resv_ptr->record_count; i++)
width = MAX(width, _resv_name_width(&reserve_ptr[i]));
snprintf(for... | false | false | false | false | false | 0 |
rot(double az, double inc) {
normalize();
double th = acos(z);
double ph = atan2(y, x);
x = sin(th+inc)*cos(ph+az);
y = sin(th+inc)*sin(ph+az);
if(fabs(th+inc) > 0.01) z = cos(th+inc);
normalize();
} | false | false | false | false | false | 0 |
gli_delete_window(window_t *win)
{
window_t *prev, *next;
if (gli_unregister_obj)
(*gli_unregister_obj)(win, gidisp_Class_Window, win->disprock);
win->magicnum = 0;
win->echostr = NULL;
if (win->str)
{
gli_delete_stream(win->str);
win->str = NULL;
}
... | false | false | false | false | false | 0 |
notify_complete(EventSelector *es, int fd, char *buf,
int len, int flag, void *data)
{
Listener *l = (Listener *) data;
l->write_ev = NULL;
if (flag == EVENT_TCP_FLAG_TIMEOUT || flag == EVENT_TCP_FLAG_IOERROR) {
close_listener(l);
return;
}
if (l->msg[0]) {
/* Queued message -- send it now */
... | false | false | false | false | false | 0 |
alias_open(struct SRBRoot *bundle, const char *tag, UChar *value, int32_t len, const struct UString* comment, UErrorCode *status) {
struct SResource *res = res_open(bundle, tag, comment, status);
if (U_FAILURE(*status)) {
return NULL;
}
res->fType = URES_ALIAS;
if (len == 0 && gFormatVersion... | false | false | false | false | false | 0 |
nv_edit(cap)
cmdarg_T *cap;
{
/* <Insert> is equal to "i" */
if (cap->cmdchar == K_INS || cap->cmdchar == K_KINS)
cap->cmdchar = 'i';
#ifdef FEAT_VISUAL
/* in Visual mode "A" and "I" are an operator */
if (VIsual_active && (cap->cmdchar == 'A' || cap->cmdchar == 'I'))
v_visop(cap);
/* in Vis... | false | false | false | false | false | 0 |
encode_ginst (MonoAotCompile *acfg, MonoGenericInst *inst, guint8 *buf, guint8 **endbuf)
{
guint8 *p = buf;
int i;
encode_value (inst->type_argc, p, &p);
for (i = 0; i < inst->type_argc; ++i)
encode_klass_ref (acfg, mono_class_from_mono_type (inst->type_argv [i]), p, &p);
*endbuf = p;
} | false | false | false | false | false | 0 |
dump_symbols( void )
{
#define SSYMBOL_SIZE 16
#define SYMBOLS_PER_BLOCK COD_BLOCK_SIZE/SSYMBOL_SIZE
#define SR_LEN 0
#define SR_NAME 1
#define SR_TYPE 13
#define SR_VALUE 14
unsigned short i,j,start_block,end_block;
char b[16];
start_block = gp_getu16(&directory_block_data[COD_DIR_SYMTAB]... | false | false | false | false | false | 0 |
router_add_exit_policy(routerinfo_t *router, directory_token_t *tok)
{
addr_policy_t *newe;
newe = router_parse_addr_policy(tok);
if (!newe)
return -1;
if (! router->exit_policy)
router->exit_policy = smartlist_new();
if (((tok->tp == K_ACCEPT6 || tok->tp == K_REJECT6) &&
tor_addr_family(&newe... | false | false | false | false | false | 0 |
gth_image_info_unref (GthImageInfo *image_info)
{
if (image_info == NULL)
return;
image_info->ref_count--;
if (image_info->ref_count > 0)
return;
_g_object_unref (image_info->file_data);
cairo_surface_destroy (image_info->image);
cairo_surface_destroy (image_info->thumbnail_original);
cairo_surface_destroy... | false | false | false | false | false | 0 |
free_object(struct alisp_object * p)
{
switch (alisp_get_type(p)) {
case ALISP_OBJ_STRING:
case ALISP_OBJ_IDENTIFIER:
free(p->value.s);
alisp_set_type(p, ALISP_OBJ_INTEGER);
break;
default:
break;
}
} | false | false | false | false | false | 0 |
reserv_sets_are_intersected (reserv_sets_t operand_1,
reserv_sets_t operand_2)
{
set_el_t *el_ptr_1;
set_el_t *el_ptr_2;
set_el_t *cycle_ptr_1;
set_el_t *cycle_ptr_2;
if (operand_1 == NULL || operand_2 == NULL)
abort ();
for (el_ptr_1 = operand_1, el_ptr_2 = operand_2;
el_ptr_1 < operand... | false | false | false | false | false | 0 |
mark_obj(ScmObj obj)
{
#if SCM_USE_VECTOR
scm_int_t i, len;
ScmObj *vec;
#endif
mark_loop:
/* no need to mark immediates */
if (SCM_IMMP(obj))
return;
/* avoid cyclic marking */
if (SCM_MARKEDP(obj))
return;
/* mark this object */
SCM_MARK(obj);
/* mark recursivel... | false | false | false | false | false | 0 |
pairreplace(VALUE_PAIR **first, VALUE_PAIR *replace)
{
VALUE_PAIR *i, *next;
VALUE_PAIR **prev = first;
if (*first == NULL) {
*first = replace;
return;
}
/*
* Not an empty list, so find item if it is there, and
* replace it. Note, we always replace the first one, and
* we ignore any others that might e... | false | false | false | false | false | 0 |
ddf_ColumnReduce(ddf_ConePtr cone)
{
ddf_colrange j,j1=0;
ddf_rowrange i;
ddf_boolean localdebug=ddf_FALSE;
for (j=1;j<=cone->d;j++) {
if (cone->InitialRayIndex[j]>0){
j1=j1+1;
if (j1<j) {
for (i=1; i<=cone->m; i++) ddf_set(cone->A[i-1][j1-1],cone->A[i-1][j-1]);
cone->newcol[j]=... | false | false | false | false | false | 0 |
iwl_mvm_scan_uid_by_status(struct iwl_mvm *mvm, int status)
{
int i;
for (i = 0; i < mvm->max_scans; i++)
if (mvm->scan_uid_status[i] == status)
return i;
return -ENOENT;
} | false | false | false | false | false | 0 |
dualhash_new(hash_fn_t khash, eq_fn_t keq, hash_fn_t vhash, eq_fn_t veq)
{
dualhash_t *dh;
if (NULL == khash)
khash = pointer_hash;
if (NULL == vhash)
vhash = pointer_hash;
WALLOC(dh);
dh->magic = DUALHASH_MAGIC;
dh->kht = htable_create_any(khash, NULL, keq);
dh->vht = htable_create_any(vhash, NULL, veq);... | false | false | false | false | false | 0 |
sinfo_parse_cpl_input_ns(cpl_parameterlist * cpl_cfg, cpl_frameset* sof,
cpl_frameset** raw)
{
ns_config * cfg = sinfo_ns_cfg_create();
int status=0;
/*
* Perform sanity checks, fill up the structure with what was
* found in the ini file
*... | false | false | false | false | false | 0 |
Lstring_eq()
{
# line 267 "string.d"
int s1=0, e1=0, s2=0, e2=0;
int narg;
register object *DPPbase=vs_base;
#define string1 DPPbase[0]
#define string2 DPPbase[1]
#define start1 DPPbase[2+0+0]
#define end1 DPPbase[2+0+1]
#define start2 DPPbase[2+0+2]
#define end2 DPPbase[2+0+3]
narg = vs_top - vs_base;
if (narg ... | false | false | false | false | false | 0 |
alloca_call_p (const_tree exp)
{
if (TREE_CODE (exp) == CALL_EXPR
&& TREE_CODE (CALL_EXPR_FN (exp)) == ADDR_EXPR
&& (TREE_CODE (TREE_OPERAND (CALL_EXPR_FN (exp), 0)) == FUNCTION_DECL)
&& (special_function_p (TREE_OPERAND (CALL_EXPR_FN (exp), 0), 0)
& ECF_MAY_BE_ALLOCA))
return true;
return ... | false | false | false | false | true | 1 |
print_renames(struct fnode *x)/*{{{*/
{
struct fnode *e;
for (e = x->next; e != x; e = e->next) {
if (e->is_dir) {
print_renames(dir_children(e));
} else {
if (is_rename_file(e)) {
printf("R %s->%s\n", e->path, e->x.file.content_peer->path);
}
}
}
} | false | false | false | false | false | 0 |
property_factory (ccss_grammar_t const *grammar,
ccss_block_t *block,
char const *name,
CRTerm const *values,
void *user_data)
{
ccss_gtk_property_t s, *self;
g_return_val_if_fail (grammar, false);
g_return_val_if_fail (block, false);
g_return_val_if_fail (name, false);
g_return_val_if_fail (... | false | false | false | false | false | 0 |
removeDictRef(EnchantDict *dict)
{
int refs = m_dictRefs[dict];
--refs;
m_dictRefs[dict] = refs;
if (refs <= 0) {
m_dictRefs.remove(dict);
enchant_broker_free_dict(m_broker, dict);
}
} | false | false | false | false | false | 0 |
fr_perror(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
if (strchr(fmt, ':') == NULL)
fprintf(stderr, ": ");
fprintf(stderr, "%s\n", fr_strerror());
va_end(ap);
} | false | false | false | false | true | 1 |
convert_string_list (const iconveh_t *cd, string_list_ty *slp,
const struct conversion_context* context)
{
size_t i;
if (slp != NULL)
for (i = 0; i < slp->nitems; i++)
slp->item[i] = convert_string (cd, slp->item[i], context);
} | false | false | false | false | false | 0 |
isTiffType(BasicIo& iIo, bool advance)
{
const int32_t len = 8;
byte buf[len];
iIo.read(buf, len);
if (iIo.error() || iIo.eof()) {
return false;
}
TiffHeader tiffHeader;
bool rc = tiffHeader.read(buf, len);
if (!advance || !rc) {
... | false | false | false | false | false | 0 |
get_1pe_iteration_from_pestm(Pe_statement *pe_stm)
{
int k, n;
Quadruple *do_qr;
SemTree *i[3];
do_qr = search_do_qr_from_pe_stm(pe_stm);
for (k = 0; k < 3; k++)
i[k] = make_semtree_operand(pe_stm->block->module, do_qr->op[k+1], do_qr);
/* n = (i[1] - i[0]) / i[2] + 1; */
n = calc... | false | false | false | false | false | 0 |
skip_forwardCmd(int n)
{
Require(n >= 0,
err("Require positive (or zero) number of lines to skip"));
if (_dataFILE.back().get_type() == DataFile::from_cmdfile) {
warning("Cannot `skip' when data are embedded in command-file");
return true;
}
while (n-- > 0) {
if (_dataFILE.back().get_type() != DataFile::asc... | false | false | false | false | false | 0 |
vblast()
{
if (prop[ROD2] < 0 || !closed)
actspk(verb);
else {
bonus = 133;
if (loc == 115)
bonus = 134;
if (here(ROD2))
bonus = 135;
rspeak(bonus);
normend();
}
} | 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.