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 |
|---|---|---|---|---|---|---|
free_OCSPBasicOCSPResponse(OCSPBasicOCSPResponse *data)
{
free_OCSPResponseData(&(data)->tbsResponseData);
free_AlgorithmIdentifier(&(data)->signatureAlgorithm);
der_free_bit_string(&(data)->signature);
if((data)->certs) {
while(((data)->certs)->len){
free_Certificate(&((data)->certs)->val[((data)->certs)->len-1]);
((d... | false | false | false | false | false | 0 |
dump_union(char *s, ulong addr, unsigned radix)
{
unsigned restore_radix;
long len;
restore_radix = 0;
if ((len = UNION_SIZE(s)) < 0)
error(FATAL, "invalid union name: %s\n", s);
set_temporary_radix(radix, &restore_radix);
print_union(s, addr);
restore_current_radix(rest... | false | false | false | false | false | 0 |
rad_req_send(struct rad_req_t *req)
{
int r;
req->send = __rad_req_send;
if (req->try++ == conf_max_try) {
if (req->active)
rad_server_req_exit(req);
log_ppp_warn("radius: server(%i) not responding\n", req->serv->id);
if (rad_server_realloc(req)) {
if (req->rpd)
log_ppp_warn("radius: no a... | false | false | false | false | false | 0 |
wsgi_send_request(request_rec *r,
WSGIRequestConfig *config,
WSGIDaemonSocket *daemon)
{
int rv;
const apr_array_header_t *env_arr;
const apr_table_entry_t *elts;
int i;
struct iovec *vec;
struct iovec *vec_start;
... | false | false | false | false | false | 0 |
parse_dav_header(const char *value, ne_server_capabilities *caps)
{
char *tokens = ne_strdup(value), *pnt = tokens;
do {
char *tok = ne_qtoken(&pnt, ',', "\"'");
if (!tok) break;
tok = ne_shave(tok, " \r\t\n");
if (strcmp(tok, "1") == 0) {
caps->dav_class1 = 1;
} else if (strcmp(tok, "2") == ... | false | false | false | false | false | 0 |
main( int argc, char **argv ) {
#endif
struct EdOptions options;
srand( time(0) ); // init random number generator
parse_options( argc, argv, options );
// create options, save games, and maps directories if possible
create_config_dir();
string mapdir = get_home_levels_dir();
if ( mapdir.length() == 0 ... | false | false | false | false | false | 0 |
gst_dash_demux_get_buffering_time (GstDashDemux * demux)
{
GstClockTime buffer_time = GST_CLOCK_TIME_NONE;
GSList *iter;
for (iter = demux->streams; iter; iter = g_slist_next (iter)) {
GstClockTime btime = gst_dash_demux_stream_get_buffering_time (iter->data);
if (!GST_CLOCK_TIME_IS_VALID (buffer_time) ... | false | false | false | false | false | 0 |
lookup_commit_graft(const unsigned char *sha1)
{
int pos;
prepare_commit_graft();
pos = commit_graft_pos(sha1);
if (pos < 0)
return NULL;
return commit_graft[pos];
} | false | false | false | false | false | 0 |
gfx_v8_0_init_golden_registers(struct amdgpu_device *adev)
{
switch (adev->asic_type) {
case CHIP_TOPAZ:
amdgpu_program_register_sequence(adev,
iceland_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(iceland_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev,
golden_settings_iceland_a11,
(c... | false | false | false | false | false | 0 |
finishUpdate(void)
{
/* dump the rest of SWF */
findNextTag(0);
/* write movie end */
flputShort(0);
updateTmpLength(4, flength);
fclose(updateFile);
finalizeTemporaryFile(updateName);
if (compressAfter) {
updateFile = fopen(updateName, "rb");
getSWFHeader(updateFile);
compressSWF(upda... | false | false | false | false | true | 1 |
dlm_lockres_release_ast(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res)
{
if (!atomic_dec_and_lock(&res->asts_reserved, &res->spinlock))
return;
if (!res->migration_pending) {
spin_unlock(&res->spinlock);
return;
}
BUG_ON(res->state & DLM_LOCK_RES_MIGRATING);
res->migration_pending = 0;
res->... | false | false | false | false | false | 0 |
grab_person(const char *who, struct atom_value *val, int deref, struct object *obj, void *buf, unsigned long sz)
{
int i;
int wholen = strlen(who);
const char *wholine = NULL;
for (i = 0; i < used_atom_cnt; i++) {
const char *name = used_atom[i];
struct atom_value *v = &val[i];
if (!!deref != (*name == '*'))... | false | false | false | false | false | 0 |
goTime_checkTimer(const GoTime *time, GoTimer *timer) {
struct timeval now;
struct timezone tzone;
gettimeofday(&now, &tzone);
timer->usLeft -= (now.tv_usec - timer->startTime.tv_usec);
while (timer->usLeft <= 0) {
timer->usLeft += 1000000;
--timer->timeLeft;
}
timer->timeLeft -= (now.tv_sec -... | false | false | false | false | false | 0 |
nvkm_vm_unlink(struct nvkm_vm *vm, struct nvkm_gpuobj *mpgd)
{
struct nvkm_vm_pgd *vpgd, *tmp;
if (!mpgd)
return;
mutex_lock(&vm->mutex);
list_for_each_entry_safe(vpgd, tmp, &vm->pgd_list, head) {
if (vpgd->obj == mpgd) {
list_del(&vpgd->head);
kfree(vpgd);
break;
}
}
mutex_unlock(&vm->mutex);
} | false | false | false | false | false | 0 |
Command_PyReload(char *name)
{
PluginObject *plugin = Plugin_ByString(name);
if (!plugin) {
hexchat_print(ph, "Can't find a python plugin with that name");
} else {
char *filename = g_strdup(plugin->filename);
Command_PyUnload(filename);
Command_PyLoad(filename);
g_free(filename);
}
} | false | false | false | false | false | 0 |
getmyip(int sock)
/*
* Function: Find our ip.
* Returns: ip if OK
* -1 if lookup failed
*
* Returns ip in network byte order.
*
* If a sock number is specified, getsockbyname() is used to get the
* IP address associated with that socket.
*/
{
IP ip;
char s[MAXHOSTLENGTH];
/* getsockname() me... | false | false | false | false | false | 0 |
mk_proxy_from_ip(struct ip_addr* ip, unsigned short port,
unsigned short proto)
{
struct proxy_l* p;
p=(struct proxy_l*) pkg_malloc(sizeof(struct proxy_l));
if (p==0){
LM_CRIT("pkg memory allocation failure\n");
goto error;
}
memset(p,0,sizeof(struct proxy_l));
p->port=port;
p->proto=proto;
p->host.h_ad... | false | false | false | false | false | 0 |
asc_prt_asc_board_eeprom(struct seq_file *m, struct Scsi_Host *shost)
{
struct asc_board *boardp = shost_priv(shost);
ASC_DVC_VAR *asc_dvc_varp;
ASCEEP_CONFIG *ep;
int i;
#ifdef CONFIG_ISA
int isa_dma_speed[] = { 10, 8, 7, 6, 5, 4, 3, 2 };
#endif /* CONFIG_ISA */
uchar serialstr[13];
asc_dvc_varp = &boardp->dvc... | false | false | false | false | false | 0 |
Identify( GDALOpenInfo *poOpenInfo )
{
json_object * pJSONObject;
if (!EQUAL(CPLGetExtension(poOpenInfo->pszFilename), "arg")) {
return FALSE;
}
pJSONObject = GetJsonObject(poOpenInfo->pszFilename);
if (pJSONObject == NULL) {
return FALSE;
}
json_object_put(pJSONObject);
... | false | false | false | false | false | 0 |
transition_verifier_stack(struct verifier_stack *stc, struct verifier_stack *stn)
{
int err;
struct verifier_stack *cp, *np;
/* If the stack of the current state is smaller than the stack
* expected in the next state we know the states are
* imcompatible.
*/
if (list_size(&stc->slots) < list_size(&stn->slots... | false | false | false | false | false | 0 |
EnsurePathExists(const char * FileName)
{
char NewPath[PATH_MAX*2];
int a;
int LastSlash = 0;
//printf("\nEnsure exists:%s\n",FileName);
// Extract the path component of the file name.
strcpy(NewPath, FileName);
a = strlen(NewPath);
for (;;){
a--;
if (a == 0){
... | true | true | false | false | false | 1 |
inputmask(int ypos, int xpos, const int maxchars, char *getback,
char mask, char emptyc)
{
int x=0; /* Indexcounter for the current editing position */
int c; /* Character-buffer */
int i; /* counter for several purposes */
/* clear the part of the screen we'll need */
move(ypos, xp... | false | false | false | false | false | 0 |
ftglue_face_goto_table( FT_Face face,
FT_ULong the_tag,
FT_Stream stream )
{
FT_Error error;
LOG(( "ftglue_face_goto_table( %p, %c%c%c%c, %p )\n",
face,
(int)((the_tag >> 24) & 0xFF),
(int)((the_tag >> 16) & 0xFF... | false | false | false | false | false | 0 |
ipmi_sdr_parse_sensor_type (ipmi_sdr_parse_ctx_t ctx,
const void *sdr_record,
unsigned int sdr_record_len,
uint8_t *sensor_type)
{
fiid_obj_t obj_sdr_record = NULL;
uint32_t acceptable_record_types;
uint64_t val;
int rv = -1;
... | false | false | false | false | false | 0 |
ast_adsi_set_keys(unsigned char *buf, unsigned char *keys)
{
int res = 0;
ast_rwlock_rdlock(&func_lock);
if (installed_funcs && installed_funcs->set_keys) {
res = installed_funcs->set_keys(buf, keys);
}
ast_rwlock_unlock(&func_lock);
return res;
} | false | false | false | false | false | 0 |
brcmf_sdio_sendfromq(struct brcmf_sdio *bus, uint maxframes)
{
struct sk_buff *pkt;
struct sk_buff_head pktq;
u32 intstatus = 0;
int ret = 0, prec_out, i;
uint cnt = 0;
u8 tx_prec_map, pkt_num;
brcmf_dbg(TRACE, "Enter\n");
tx_prec_map = ~bus->flowcontrol;
/* Send frames until the limit or some other event *... | false | false | false | false | false | 0 |
ctime1(char *buf2)
{
time_t ti;
char *p;
ti = time(NULL);
p = ctime(&ti);
strcpy(buf2, p);
p = buf2 + strlen(p) - 1;
if (*p == '\n')
*p = '\0';
return buf2;
} | false | false | false | false | false | 0 |
PyLocale_strxfrm(PyObject* self, PyObject* args)
{
char *s, *buf;
size_t n1, n2;
PyObject *result;
if (!PyArg_ParseTuple(args, "s:strxfrm", &s))
return NULL;
/* assume no change in size, first */
n1 = strlen(s) + 1;
buf = PyMem_Malloc(n1);
if (!buf)
return PyErr_NoMemor... | false | false | false | false | false | 0 |
read_inner(void *data, size_t len)
{
if (eof)
return 0;
unsigned char *cp = (unsigned char *)data;
unsigned char *end = cp + len;
next_char:
while (cp < end)
{
int c = deeper->getch();
if (c < 0)
{
eof = true;
break;
}
if (c == ' ' || c == '\t')
{
static char *buf;
sta... | false | false | false | false | false | 0 |
update_openfiles_dialog (GtkWidget *tree)
{
ProcInfo *info;
GtkTreeModel *model;
glibtop_open_files_entry *openfiles;
glibtop_proc_open_files procmap;
GHashTable *new_maps;
guint i;
pid_t pid = GPOINTER_TO_UINT(static_cast<pid_t*>(g_object_get_data (G_OBJECT (tree), "selected_info")));
... | false | false | false | false | false | 0 |
gee_tree_map_sub_node_iterator_remove (GeeTreeMapSubNodeIterator* self) {
gboolean _tmp0_ = FALSE;
gboolean _tmp1_ = FALSE;
GeeTreeMapNodeIterator* _tmp2_ = NULL;
g_return_if_fail (self != NULL);
_tmp0_ = gee_tree_map_sub_node_iterator_get_valid (self);
_tmp1_ = _tmp0_;
_vala_assert (_tmp1_, "valid");
_tmp2_ = ... | false | false | false | false | false | 0 |
entry_clear_icon_release_cb(GtkEntry *entry, gint icon_pos,
GdkEvent *event, gpointer data)
{
if (event->button.button == 1 && icon_pos == 1)
{
gtk_entry_set_text(entry, "");
gtk_widget_grab_focus(GTK_WIDGET(entry));
}
} | false | false | false | false | false | 0 |
getSegmentNameByAddress(Address *Addr)
{
static char sectionname[1];
Location *loc = getFunctionByAddress(Addr);
if (loc && loc->label && loc->label->name) {
return loc->label->name;
} else {
sectionname[0] = 0;
return sectionname;
}
} | false | false | false | false | false | 0 |
HandleTriggerActiveCommand(char* /*args*/)
{
uint32 counter = 0; // Counter for figure out that we found smth.
Player* pl = m_session->GetPlayer();
// Search in AreaTable.dbc
for (uint32 id = 0; id < sAreaTriggerStore.GetNumRows(); ++id)
{
AreaTriggerEnt... | false | false | false | false | false | 0 |
bmp085_get_of_properties(struct bmp085_data *data)
{
#ifdef CONFIG_OF
struct device_node *np = data->dev->of_node;
u32 prop;
if (!np)
return;
if (!of_property_read_u32(np, "chip-id", &prop))
data->chip_id = prop & 0xff;
if (!of_property_read_u32(np, "temp-measurement-period", &prop))
data->temp_measuremen... | false | false | false | false | false | 0 |
regenerate_rod(object *rod) {
if (rod->stats.hp < rod->stats.maxhp) {
rod->stats.hp += 1+rod->stats.maxhp/10;
if (rod->stats.hp > rod->stats.maxhp)
rod->stats.hp = rod->stats.maxhp;
}
} | false | false | false | false | false | 0 |
uloc_kw_nextKeyword(UEnumeration* en,
int32_t* resultLength,
UErrorCode* /*status*/) {
const char* result = ((UKeywordsContext *)en->context)->current;
int32_t len = 0;
if(*result) {
len = (int32_t)uprv_strlen(((UKeywordsContext *)en->context)->current);
... | false | false | false | false | false | 0 |
validate(QString & input, int & ) const
{
if (input.length() > 6)
return Invalid;
input = input.toUpper();
return Acceptable;
} | false | false | false | false | false | 0 |
fl_set_idle_callback( FL_APPEVENT_CB callback,
void * user_data )
{
FL_APPEVENT_CB old =
fli_context->idle_rec ? fli_context->idle_rec->callback : NULL;
add_idle_callback( callback, user_data );
/* If we have idle callbacks, decrease the wait time */
... | false | false | false | false | false | 0 |
airo_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *pent)
{
struct net_device *dev;
if (pci_enable_device(pdev))
return -ENODEV;
pci_set_master(pdev);
if (pdev->device == 0x5000 || pdev->device == 0xa504)
dev = _init_airo_card(pdev->irq, pdev->resource[0].start, 0, pdev, &pdev->dev);
el... | false | false | false | false | false | 0 |
load_inklist(stp_mxml_node_t *node, stp_mxml_node_t *root, inklist_t *ikl)
{
const char *name;
stp_mxml_node_t *child = node->child;
int count = 0;
while (child)
{
if (child->type == STP_MXML_ELEMENT)
{
if (!strcmp(child->value.element.name, "InkName"))
count++;
else if (!strcmp(child->va... | false | false | false | false | false | 0 |
_tpl_action_chain_new_finish (GObject *source,
GAsyncResult *result,
GError **error)
{
TplActionChain *chain;
g_return_val_if_fail (g_simple_async_result_is_valid (result, source,
_tpl_action_chain_new_async), FALSE);
chain = g_object_get_data (G_OBJECT (result), "chain");
g_return_val_if_fai... | false | false | false | false | false | 0 |
sig_scsi_bus_phase_reselect(struct sig_scsi_bus *b, void *s, uint32_t id)
{
unsigned int nr;
int status;
for (nr = 0; ; nr++) {
if (nr == b->member_count) {
return 0;
}
if (b->member[nr].s == s) {
continue;
}
status = b->member[nr].f->phase_reselect(b->member[nr].s,
id);
if (status == 0) {
... | false | false | false | false | false | 0 |
xmlSecIOCallbackPtrListFind(xmlSecPtrListPtr list, const char* uri) {
xmlSecIOCallbackPtr callbacks;
xmlSecSize i, size;
xmlSecAssert2(xmlSecPtrListCheckId(list, xmlSecIOCallbackPtrListId), NULL);
xmlSecAssert2(uri != NULL, NULL);
size = xmlSecPtrListGetSize(list);
for(i = 0; i < size; ++i) {
... | false | false | false | false | false | 0 |
sigchld_signal_handler
___P((int sig),
(sig)
int sig;)
{
#ifdef USE_signal
___set_signal_handler (SIGCHLD, sigchld_signal_handler);
#endif
/*
* A SIGCHLD signal indicates that at least one child has changed
* status. There may be more than one because signals are not
* queued. For example dur... | false | false | false | false | false | 0 |
decrement (Time& timecode, uint32_t subframes_per_frame)
{
Wrap wrap = NONE;
if (timecode.negative || Timecode_IS_ZERO (timecode)) {
timecode.negative = false;
wrap = increment (timecode, subframes_per_frame);
timecode.negative = true;
return wrap;
} else if (Timecode_IS_AROUND_ZERO (timecode) && timecode... | false | false | false | false | false | 0 |
_parse_program(BITSTREAM *bits, CLPI_PROG_INFO *program)
{
int ii, jj;
// Skip the length field, and a reserved byte
bs_skip(bits, 5 * 8);
// Then get the number of sequences
program->num_prog = bs_read(bits, 8);
CLPI_PROG *progs;
progs = malloc(program->num_prog * sizeof(CLPI_PROG));
... | false | false | false | false | false | 0 |
gen_support_h (lf *file, insn_table *table)
{
/* output the definition of `SD_' */
if (options.gen.smp)
{
lf_printf (file, "#define SD CPU_STATE (cpu)\n");
lf_printf (file, "#define CPU cpu\n");
lf_printf (file, "#define CPU_ cpu\n");
}
else
{
lf_printf (file, "#define SD sd\n"... | false | false | false | false | false | 0 |
_raw_spin_lock_nested(raw_spinlock_t *lock, int subclass)
{
preempt_disable();
spin_acquire(&lock->dep_map, subclass, 0, _RET_IP_);
LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
} | false | false | false | false | false | 0 |
Jim_GetCallFrameByLevel(Jim_Interp *interp, Jim_Obj *levelObjPtr)
{
long level;
const char *str;
Jim_CallFrame *framePtr;
if (levelObjPtr) {
str = Jim_String(levelObjPtr);
if (str[0] == '#') {
char *endptr;
level = jim_strtol(str + 1, &endptr);
if (s... | false | false | false | false | false | 0 |
update_wmclass (MatewnckWindow *window)
{
if (!window->priv->need_update_wmclass)
return;
window->priv->need_update_wmclass = FALSE;
g_free (window->priv->res_class);
g_free (window->priv->res_name);
window->priv->res_class = NULL;
window->priv->res_name = NULL;
_matewnck_get_wmclass (window->priv... | false | false | false | false | false | 0 |
writeit(struct dos_name_t *dosname,
char *longname,
void *arg0,
direntry_t *entry)
{
Stream_t *Target;
time_t now;
int type, fat, ret;
time_t date;
mt_size_t filesize, newsize;
Arg_t *arg = (Arg_t *) arg0;
if (arg->mp.File->Class->get_data(arg->mp.File,
& date, &filesize, &type, 0) <... | false | false | false | false | false | 0 |
main (int argc, char *argv[])
{
GFile *file;
GFileInputStream *in;
GError *error;
gssize res;
gsize read_size;
guchar *buffer;
guchar start;
gboolean do_create_file;
do_create_file = FALSE;
if (argc > 1)
{
if (strcmp(argv[1], "-c") == 0)
{
do_create_file = TRUE;
argc--;
arg... | false | false | false | false | false | 0 |
Perl_PerlIO_flush(pTHX_ PerlIO *f)
{
dVAR;
if (f) {
if (*f) {
const PerlIO_funcs *tab = PerlIOBase(f)->tab;
if (tab && tab->Flush)
return (*tab->Flush) (aTHX_ f);
else
return 0; /* If no Flush defined, silently succeed. */
}
else {
PerlIO_debug("Cannot flush f=%p\n", (void*)f);
... | false | false | false | false | false | 0 |
deletePixelRegion(VimosPixelRegion *aPixelRegion)
{
VimosPixelRegion *tmpPRegion, *nextPRegion;
if (aPixelRegion == NULL)
{
return;
}
/* store start of the list */
tmpPRegion = aPixelRegion;
/* traverse list */
while (tmpPRegion)
{
deletePixelList(tmpPRegion->pixelList);
/* g... | false | false | false | false | false | 0 |
getCombinedName()
{
String name;
if (mVertexProgram)
{
name += "Vertex Program:" ;
name += mVertexProgram->getName();
}
if (mFragmentProgram)
{
name += " Fragment Program:" ;
name += mFragmentProgram->getName();
... | false | false | false | false | false | 0 |
copyKeys (const HDU& right)
{
// copy all keys that have already been read.
for (std::map<String,Keyword*>::const_iterator key = right.m_keyWord.begin();
key != right.m_keyWord.end(); key++)
{
std::map<String,Keyword*>::iterator itOld = m_keyWord.find(key->first);
if (itOld != m_key... | false | false | false | false | false | 0 |
uplink_close(connection_t *cptr)
{
channel_t *c;
mowgli_patricia_iteration_state_t state;
event_add_once("reconn", reconn, NULL, me.recontime);
me.connected = false;
if (curr_uplink->flags & UPF_ILLEGAL)
{
slog(LG_INFO, "uplink_close(): %s was removed from configuration, deleting", curr_uplink->name);
upli... | false | false | false | false | false | 0 |
CountRequiredAtoms_ (RuntimeS *runtimeSP, int residuesN)
{
int total_atomsN = 0;
int max_length;
int residueI;
char *curr_residue_nameP;
int template_residuesN, template_residueI;
ResidueS *template_residueSP;
AtomS *first_atomSP;
char *curr_template_nameP;
int atomsN;
/* The maximal residue name length: */
ma... | false | false | false | false | false | 0 |
_e_fm_op_update_progress_report(int percent, int eta, double elapsed, off_t done, off_t total, const char *src, const char *dst)
{
const int magic = E_FM_OP_MAGIC;
const int id = E_FM_OP_PROGRESS;
char *p, *data;
size_t size, src_len, dst_len;
if (!dst) return;
src_len = strlen(src);
dst_len = st... | false | true | false | false | false | 1 |
CommandMove_ (MolComplexS *mol_complexSP, int mol_complexesN,
RuntimeS *runtimeSP, char *stringP)
{
int move_bits = 0;
int mol_complexI;
MolComplexS *curr_mol_complexSP;
/* If keyword ALL is present, set all bits: */
if (strstr (stringP, "ALL"))
{
move_bits = STRUCTURE_MASK | PLANE_MASK | MEMBRANE_MASK;
}
/*... | false | true | false | false | false | 1 |
Move(int delta) {
int count = lb->Length();
int current = lb->GetSelection();
current += delta;
if (current >= count)
current = count - 1;
if (current < 0)
current = 0;
lb->Select(current);
} | false | false | false | false | false | 0 |
send_internal_base_duplicate_error(DBusConnection *conn, DBusMessage *req,
const char *text, const char *dup,
const char *arg1, const char *arg2)
{
DBusMessage *msg;
const char *args[] = {arg1, arg2, NULL};
msg = dbus_message_new_error_printf(req, CM_DBUS_ERROR_BASE_DUPLICATE,
text, dup);
if ... | false | false | false | false | false | 0 |
vzt_rd_get_fac_geometry(struct vzt_rd_trace *lt, vztint32_t facidx)
{
if((lt)&&(facidx<lt->numfacs))
{
lt->geometry.rows = lt->rows[facidx];
lt->geometry.msb = lt->msb[facidx];
lt->geometry.lsb = lt->lsb[facidx];
lt->geometry.flags = lt->flags[facidx];
lt->geometry.len = lt->len[facidx];
return(<->geometr... | false | false | false | false | false | 0 |
e_table_drag_dest_set (ETable *table,
GtkDestDefaults flags,
const GtkTargetEntry *targets,
gint n_targets,
GdkDragAction actions)
{
g_return_if_fail (E_IS_TABLE (table));
gtk_drag_dest_set (
GTK_WIDGET (table), flags, targ... | false | false | false | false | false | 0 |
cib_connect(gboolean full)
{
int rc = pcmk_ok;
static gboolean need_pass = TRUE;
CRM_CHECK(cib != NULL, return -EINVAL);
if (getenv("CIB_passwd") != NULL) {
need_pass = FALSE;
}
if (watch_fencing && st == NULL) {
st = stonith_api_new();
}
if (watch_fencing && st->stat... | false | false | false | false | true | 1 |
omapi_object_create (omapi_object_t **obj, omapi_object_t *id,
omapi_object_type_t *type)
{
if (!type -> create)
return ISC_R_NOTIMPLEMENTED;
return (*(type -> create)) (obj, id);
} | false | false | false | false | false | 0 |
ring_buffer_poll_wait(struct ring_buffer *buffer, int cpu,
struct file *filp, poll_table *poll_table)
{
struct ring_buffer_per_cpu *cpu_buffer;
struct rb_irq_work *work;
if (cpu == RING_BUFFER_ALL_CPUS)
work = &buffer->irq_work;
else {
if (!cpumask_test_cpu(cpu, buffer->cpumask))
return -EINVAL;
cpu... | false | false | false | false | false | 0 |
InsertEntry(GInt32 nXMin, GInt32 nYMin,
GInt32 nXMax, GInt32 nYMax,
GInt32 nBlockPtr)
{
if (m_eAccess != TABWrite && m_eAccess != TABReadWrite)
{
CPLError(CE_Failure, CPLE_AssertionFailed,
"Failed adding index ent... | false | false | false | false | false | 0 |
bfa_msgq_notify(void *cbarg, enum bfa_ioc_event event)
{
struct bfa_msgq *msgq = (struct bfa_msgq *)cbarg;
switch (event) {
case BFA_IOC_E_ENABLED:
bfa_wc_init(&msgq->init_wc, bfa_msgq_init, msgq);
bfa_wc_up(&msgq->init_wc);
bfa_fsm_send_event(&msgq->cmdq, CMDQ_E_START);
bfa_wc_up(&msgq->init_wc);
bfa_fsm... | false | false | false | false | false | 0 |
H5B2_hdr_dirty(H5B2_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(hdr);
/* Mark B-tree header as dirty in cache */
if(H5AC_mark_entry_dirty(hdr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to m... | false | false | false | false | false | 0 |
Java_ncsa_hdf_hdf5lib_H5_H5P1remove_1filter
(JNIEnv *env, jclass clss, jint obj_id, jint filter)
{
herr_t status;
status = H5Premove_filter ((hid_t)obj_id, (H5Z_filter_t)filter);
if (status < 0) {
h5libraryError(env);
}
return status;
} | false | false | false | false | false | 0 |
CheckOpts(int argc,char **argv)
{ extern char *optarg;
struct Item *actionList;
char *tmp, *suffix;
int optindex = 0;
int c;
while ((c=getopt_long(argc,argv,"f:hvVw",OPTIONS,&optindex)) != EOF)
{
switch ((char) c)
{
case 'f':
strncpy(USERKEYFILE, optarg, CF_BUFSIZE-1);
/*... | false | false | false | false | false | 0 |
dgap_tty_start(struct tty_struct *tty)
{
struct board_t *bd;
struct channel_t *ch;
struct un_t *un;
ulong lock_flags;
ulong lock_flags2;
if (!tty || tty->magic != TTY_MAGIC)
return;
un = tty->driver_data;
if (!un || un->magic != DGAP_UNIT_MAGIC)
return;
ch = un->un_ch;
if (!ch || ch->magic != DGAP_CHAN... | false | false | false | false | false | 0 |
stack_address_present_add_flags(const ObjectAddress *object,
int flags,
ObjectAddressStack *stack)
{
ObjectAddressStack *stackptr;
for (stackptr = stack; stackptr; stackptr = stackptr->next)
{
const ObjectAddress *thisobj = stackptr->object;
if (object->classId == thisobj->classId &&
object-... | false | false | false | false | false | 0 |
ay_msn_del_user(eb_account *ea)
{
ay_msn_local_account *mlad = ea->ela->protocol_local_account_data;
MsnBuddy *bud = ea->protocol_account_data;
if (bud)
msn_buddy_remove(mlad->ma, bud);
} | false | false | false | false | false | 0 |
mpt3sas_base_unmap_resources(struct MPT3SAS_ADAPTER *ioc)
{
struct pci_dev *pdev = ioc->pdev;
dexitprintk(ioc, printk(MPT3SAS_FMT "%s\n",
ioc->name, __func__));
_base_free_irq(ioc);
_base_disable_msix(ioc);
if (ioc->msix96_vector) {
kfree(ioc->replyPostRegisterIndex);
ioc->replyPostRegisterIndex = NULL;
... | false | false | false | false | false | 0 |
wr_monsters(void)
{
int i;
if (p_ptr->is_dead)
return;
/* Total monsters */
wr_u16b(mon_max);
/* Dump the monsters */
for (i = 1; i < mon_max; i++)
{
const monster_type *m_ptr = &mon_list[i];
wr_s16b(m_ptr->r_idx);
wr_byte(m_ptr->fy);
wr_byte(m_ptr->fx);
wr_s16b(m_ptr->hp);
wr_s16b(m_ptr->maxhp... | false | false | false | false | false | 0 |
ShapeFunctions(const VectorType & pt) const
{
/* Linear tetrahedral element has four shape functions */
VectorType shapeF(4);
/**
* Linear tetrahedral element has local coordinates
* (0,0,0), (1,0,0), (0,1,0), (0,0,1)
*/
/** given local point x=(r,s,t), where 0 <= r,s,t <= 1 */
/** N_1 = 1 - r - ... | false | false | false | false | false | 0 |
HandleFileUploadLengthError(rfbClientPtr cl, short fNameSize)
{
char *path = NULL;
int n = 0;
if((path = (char*) calloc(fNameSize, sizeof(char))) == NULL) {
rfbLog("File [%s]: Method [%s]: Fatal Error: Alloc failed\n",
__FILE__, __FUNCTION__);
return;
}
if((n = rfbReadExact(cl, path, fNameSize)) <= 0) {... | false | false | false | false | true | 1 |
touchDir(const char *dir) {
pid_t pid;
int e, status;
pid = fork();
if (pid == 0) {
close(terminationPipe[0]);
close(terminationPipe[1]);
if (chdir(dir) == -1) {
e = errno;
fprintf(stderr, ERROR_PREFIX
": cannot change working directory to %s: %s (errno %d)\n",
dir, strerror(e), e);
_exit(1)... | false | false | false | false | true | 1 |
test_locking(const char *lockproto, const char *locktable)
{
const char *c;
/* Translators: A lock table is a string identifying a gfs2 file system
* in a cluster, e.g. cluster_name:fs_name */
const char *errprefix = _("Invalid lock table:");
if (strcmp(lockproto, "lock_nolock") == 0) {
/* Nolock is always ok... | false | false | false | false | false | 0 |
get_config()
{
if (!config)
{
const char* home = getenv("HOME");
if (home == 0)
{
const struct passwd* pwent = getpwuid(getuid());
home = pwent->pw_dir;
}
avm::string s(home);
s += "/";
s += sConfigDir;
struct stat st;
if (stat(s.c_str(), &st))
{
AVM_WRITE("Registry", "creating ... | false | false | false | false | false | 0 |
jobacct_gather_remove_task(pid_t pid)
{
struct jobacctinfo *jobacct = NULL;
ListIterator itr = NULL;
if (!plugin_polling || jobacct_shutdown)
return NULL;
slurm_mutex_lock(&task_list_lock);
if (!task_list) {
error("no task list created!");
goto error;
}
itr = list_iterator_create(task_list);
while((job... | false | false | false | false | false | 0 |
ib_srp_open ( struct interface *block, struct ib_device *ibdev,
union ib_gid *dgid, union ib_guid *service_id,
union srp_port_id *initiator,
union srp_port_id *target, struct scsi_lun *lun ) {
struct ib_srp_device *ib_srp;
int rc;
/* Allocate and initialise structure */
ib_srp = zalloc ( sizeof ( *ib_s... | false | true | false | false | false | 1 |
LZWPostEncode(TIFF* tif)
{
register LZWCodecState *sp = EncoderState(tif);
tidata_t op = tif->tif_rawcp;
long nextbits = sp->lzw_nextbits;
long nextdata = sp->lzw_nextdata;
long outcount = sp->enc_outcount;
int nbits = sp->lzw_nbits;
if (op > sp->enc_rawlimit) {
... | false | false | false | false | false | 0 |
mono_dynamic_stream_reset (MonoDynamicStream* stream)
{
stream->alloc_size = stream->index = stream->offset = 0;
g_free (stream->data);
stream->data = NULL;
if (stream->hash) {
g_hash_table_destroy (stream->hash);
stream->hash = NULL;
}
} | false | false | false | false | false | 0 |
parse(ArDeviceConnection *dev)
{
int n = dev->read(myReadBuffer, sizeof(myReadBuffer));
#ifdef DEBUG_ARNMEAPARSER
std::cerr << "\t[ArNMEAParser: read " << n << " bytes of data from device connection:\n\t";
ArNMEAParser_printBuf(stderr, myReadBuffer, n);
#endif
if(n < 0) return ParseError;
if(n == 0) return P... | false | false | false | false | false | 0 |
crule_parseprimary(CRuleNodePtr* primrootp, int *next_tokp, const char** ruleptr)
{
CRuleNodePtr *insertionp;
int errcode = CR_NOERR;
*primrootp = NULL;
insertionp = primrootp;
while (errcode == CR_NOERR)
{
switch (*next_tokp)
{
case CR_OPENPAREN:
if ((errcode = crule_gettoken(next_to... | false | false | false | false | false | 0 |
SubtractGreenFromBlueAndRed(uint32_t* argb_data, int num_pixels) {
const __m128i mask = _mm_set1_epi32(0x0000ff00);
int i;
for (i = 0; i + 4 <= num_pixels; i += 4) {
const __m128i in = _mm_loadu_si128((__m128i*)&argb_data[i]);
const __m128i in_00g0 = _mm_and_si128(in, mask); // 00g0|00g0|...
const... | false | false | false | false | false | 0 |
compute_Xt_condition(ACE_HANDLE handle)
{
ACE_TRACE ("ACE_XtReactor::compute_Xt_condition");
// Retrieve current wait mask from base class.
// The returned value is either a combination of READ/WRITE/EXCEPT_MASK
// or -1.
int mask =this->bit_ops(handle,
0,
... | false | false | false | false | false | 0 |
multi_respawn_observer()
{
// make sure we should be respawning as an observer
Assert(!(Net_player->flags & NETINFO_FLAG_RESPAWNING) && (Net_player->flags & NETINFO_FLAG_LIMBO));
// respawn as an observer
multi_respawn_as_observer();
// clients should notify the server that they are doing so
if(!(Net_player->f... | false | false | false | false | false | 0 |
check_WDC_drive()
{
static __u8 atabuffer[4+512];
int i;
if (verbose) {
printf("Checking if Drive is a Western Digital Drive\n");
}
memset(atabuffer, 0, sizeof(atabuffer));
atabuffer[0] = ATA_OP_IDENTIFY;
atabuffer[3] = 1;
if (do_drive_cmd(fd, atabuffer)) {
perror(" HDIO_DRIVE_CMD(identify) fa... | false | false | false | false | false | 0 |
sl_efface(skiplist *l, const void *value, int (*compare)(const void*,const void*))
{
if (!l)
return 0;
if (!compare)
compare = default_compare;
int k, m, imid = -1;
node update[max_levels];
node p, q;
p = l->header;
for (k = l->level-1; k >= 0; k--)
{
int done = 0;
while ((q = p->forward[k]) != NULL... | false | false | false | false | true | 1 |
exo_icon_view_row_changed (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
ExoIconView *icon_view)
{
ExoIconViewItem *item;
item = g_list_nth_data (icon_view->priv->items, gtk_tree_path_get_indices(path)[0]);
/* stop ... | false | false | false | false | false | 0 |
getFeldKoord(int x, int y, int & xx, int & yy) const {
xx = x * gric;
yy = y * gric - mHochVerschiebung - (ld->mSechseck && (x & 1)) * gric / 2;
} | false | false | false | false | false | 0 |
ajFileNewOutappendNameS(const AjPStr name)
{
AjPFile thys;
AJNEW0(thys);
#ifdef WIN32
if(ajStrMatchC(name, "/dev/null"))
thys->fp = fopen("NUL", "ab");
else
#endif /* WIN32 */
thys->fp = fopen(ajStrGetPtr(name), "ab");
if(!thys->fp)
{
thys->Handle = 0;
return N... | false | false | false | false | true | 1 |
exec_rep_ectl_setup(struct st_t *stp)
{
register struct xstk_t *xsp;
register struct st_t *nxtstp, *astp;
struct delctrl_t *rdctp;
word32 val;
__num_addedexec++;
nxtstp = stp->stnxt;
/* DBG RELEASE remove --- */
if (nxtstp->stmttyp != S_DELCTRL) __misc_terr(__FILE__, __LINE__);
/* --- */
rdctp = nxtstp->st.... | false | false | false | false | false | 0 |
process_certificate(SSL *ssl, X509_CTX **x509_ctx)
{
int ret = SSL_OK;
uint8_t *buf = &ssl->bm_data[ssl->dc->bm_proc_index];
int pkt_size = ssl->bm_index;
int cert_size, offset = 5;
int total_cert_size = (buf[offset]<<8) + buf[offset+1];
int is_client = IS_SET_SSL_FLAG(SSL_IS_CLIENT);
X509_C... | false | false | false | false | false | 0 |
z_pause_timed_input(zwinid window)
{
event_t eep;
if(window->glk_input_pending) {
window->glk_input_pending = FALSE;
switch(window->pending_input_type) {
case evtype_CharInput:
glk_cancel_char_event(window->win);
break;
case evtype_LineInput:
glk_cancel_line_event(window->win, &ee... | 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.