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 |
|---|---|---|---|---|---|---|
iwl_pcie_tx_init(struct iwl_trans *trans)
{
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
int ret;
int txq_id, slots_num;
bool alloc = false;
if (!trans_pcie->txq) {
ret = iwl_pcie_tx_alloc(trans);
if (ret)
goto error;
alloc = true;
}
spin_lock(&trans_pcie->irq_lock);
/* Turn ... | false | false | false | false | false | 0 |
bind_socket(struct TCP_Server_Info *server)
{
int rc = 0;
if (server->srcaddr.ss_family != AF_UNSPEC) {
/* Bind to the specified local IP address */
struct socket *socket = server->ssocket;
rc = socket->ops->bind(socket,
(struct sockaddr *) &server->srcaddr,
sizeof(server->srcaddr));
if ... | false | false | false | false | false | 0 |
get_c_jd(union DateData *x)
{
assert(complex_dat_p(x));
if (!have_jd_p(x)) {
int jd, ns;
assert(have_civil_p(x));
#ifndef USE_PACK
c_civil_to_jd(x->c.year, x->c.mon, x->c.mday,
c_virtual_sg(x), &jd, &ns);
#else
c_civil_to_jd(x->c.year, EX_MON(x->c.pc), EX_MDAY(x->c.pc),
c_virtual_sg(x), &jd... | false | false | false | false | false | 0 |
_e2pcr_get_tempname (VPATH *localpath, gchar *custom)
{
gchar *temppath, *s;
guint i = 0;
E2_ERR_DECLARE
#ifdef E2_VFS
VPATH tdata;
tdata.spacedata = localpath->spacedata;
#endif
while (TRUE)
{
temppath = g_strdup_printf ("%s%s~%d", VPSTR(localpath), custom, i);
if (i == 0)
{ //first try without any "~N" s... | false | false | false | false | false | 0 |
get_module_filename (gpointer process, gpointer module,
gunichar2 *basename, guint32 size)
{
int pid, len;
gsize bytes;
char *path;
gunichar2 *proc_path;
size *= sizeof (gunichar2); /* adjust for unicode characters */
if (basename == NULL || size == 0)
return 0;
pid = GetProcessId (process);
path =... | false | true | false | false | false | 1 |
dpm_apiinit(thip)
struct dpm_api_thread_info **thip;
{
Cglobals_get (&dpm_api_key,
(void **) thip, sizeof(struct dpm_api_thread_info));
if (*thip == NULL) {
serrno = ENOMEM;
return (-1);
}
if(! (*thip)->initialized) {
(*thip)->initialized = 1;
}
return (0);
} | false | false | false | false | false | 0 |
zfillCIDMap(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
ref *Decoding = op - 4, *TT_cmap = op - 3, *SubstNWP = op - 2,
*GDBytes = op - 1, *CIDMap = op;
int code;
check_type(*Decoding, t_dictionary);
check_type(*TT_cmap, t_dictionary);
check_type(*SubstNWP, t_array);
check_type(*GDBytes, t_... | false | false | false | false | false | 0 |
vox2mm(unsigned int sz) const
{
Matrix rmat = IdentityMatrix(sz);
rmat(1,1) = Vxs_x();
rmat(2,2) = Vxs_y();
rmat(3,3) = Vxs_z();
rmat.Release();
return(rmat);
} | false | false | false | false | false | 0 |
load(std::string filename, imageStruct&result, gem::Properties&props)
{
Magick::Image image;
try {
::verbose(2, "reading '%s' with ImageMagick", filename.c_str());
// Read a file into image object
try {
image.read( filename );
} catch (Magick::Warning e) {
verbose(1, "magick loading prob... | false | false | false | false | false | 0 |
LoadBlob_TSS_KEY(UINT64 *offset, BYTE * blob, TSS_KEY * key)
{
if (key->hdr.key12.tag == TPM_TAG_KEY12) {
LoadBlob_UINT16(offset, key->hdr.key12.tag, blob);
LoadBlob_UINT16(offset, key->hdr.key12.fill, blob);
} else
LoadBlob_TCPA_VERSION(offset, blob, &key->hdr.key11.ver);
LoadBlob_UINT16(offset, key->keyUsage... | false | false | false | false | false | 0 |
dbiterator_origin(dns_dbiterator_t *iterator, dns_name_t *name) {
rbtdb_dbiterator_t *rbtdbiter = (rbtdb_dbiterator_t *)iterator;
dns_name_t *origin = dns_fixedname_name(&rbtdbiter->origin);
if (rbtdbiter->result != ISC_R_SUCCESS)
return (rbtdbiter->result);
return (dns_name_copy(origin, name, NULL));
} | false | false | false | false | false | 0 |
tktview_page(void){
const char *zScript;
char *zFullName;
const char *zUuid = PD("name","");
login_check_credentials();
if( !g.perm.RdTkt ){ login_needed(); return; }
if( g.perm.WrTkt || g.perm.ApndTkt ){
style_submenu_element("Edit", "Edit The Ticket", "%s/tktedit?name=%T",
g.zTop, PD("name","... | false | false | false | false | false | 0 |
canBeMerged(gTextAreaAction *prev)
{
if (!prev || prev->type != type)
return false;
if (!mergeable || !prev->mergeable)
return false;
if (type == ACTION_INSERT)
{
if (start != (prev->start + prev->length))
return false;
if (isspace(*text->str) != isspace(*prev->text->str))
return false;
}
else i... | false | false | false | false | false | 0 |
EliminateBlockCases(BasicBlock *BB,
std::vector<std::pair<ConstantInt*, BasicBlock*> > &Cases) {
for (unsigned i = 0, e = Cases.size(); i != e; ++i)
if (Cases[i].second == BB) {
Cases.erase(Cases.begin()+i);
--i; --e;
}
} | false | false | false | false | false | 0 |
netsnmp_container_table_handler_get(netsnmp_table_registration_info *tabreg,
netsnmp_container *container, char key_type)
{
container_table_data *tad;
netsnmp_mib_handler *handler;
if (NULL == tabreg) {
snmp_log(LOG_ERR, "bad param in netsnmp_container_table_regi... | false | false | false | false | false | 0 |
palettify_rows (rgba *rows[],unsigned ncols,unsigned nlines)
{
unsigned i ;
for( i=0; i<nlines; i++ ) {
if( !palettify_row(rows[i],ncols) ) {
while( i-- )
unpalettify_row(rows[i],ncols);
return 0 ;
}
}
return 1 ;
} | false | false | false | false | false | 0 |
update_window_names (rp_screen *s, char *fmt)
{
struct sbuf *bar_buffer;
int mark_start = 0;
int mark_end = 0;
if (s->bar_is_raised != BAR_IS_WINDOW_LIST) return;
bar_buffer = sbuf_new (0);
if(defaults.window_list_style == STYLE_ROW)
{
get_window_list (fmt, NULL, bar_buffer, &mark_start, &mark_... | false | false | false | false | false | 0 |
enum_first(PG_FUNCTION_ARGS)
{
Oid enumtypoid;
Oid min = InvalidOid;
CatCList *list;
int num,
i;
/*
* We rely on being able to get the specific enum type from the calling
* expression tree. Notice that the actual value of the argument isn't
* examined at all; in particular it might be NULL.
*... | false | false | false | false | true | 1 |
DTEDCreatePtStream( const char *pszPath, int nLevel )
{
DTEDPtStream *psStream;
int i;
VSIStatBuf sStat;
/* -------------------------------------------------------------------- */
/* Does the target directory already exist? If not try to */
/* create it. ... | false | false | false | false | false | 0 |
krb5_cccol_lock(krb5_context context)
{
krb5_error_code ret = 0;
k5_cc_mutex_lock(context, &cccol_lock);
k5_mutex_lock(&cc_typelist_lock);
k5_cc_mutex_lock(context, &krb5int_cc_file_mutex);
k5_cc_mutex_lock(context, &krb5int_mcc_mutex);
#ifdef USE_KEYRING_CCACHE
k5_cc_mutex_lock(context, &krb5i... | false | false | false | false | false | 0 |
compare_address (EContact *contact,
const gchar *str,
const gchar *region,
CompareFunc compare)
{
gint i;
gboolean rv = FALSE;
for (i = E_CONTACT_FIRST_ADDRESS_ID; i <= E_CONTACT_LAST_ADDRESS_ID; i++) {
EContactAddress *address = e_contact_get (contact, i);
if... | false | false | false | false | false | 0 |
table_MODE (struct GMTMATH_INFO *info, double **stack[], GMT_LONG *constant, double *factor, GMT_LONG last, GMT_LONG col, GMT_LONG n_row)
/*OPERATOR: MODE 1 1 Mode value (Least Median of Squares) of A. */
{
GMT_LONG i, GMT_mode_selection = 0, GMT_n_multiples = 0;
double mode;
if (constant[last]) { /* Trivial case ... | false | false | false | false | false | 0 |
Devices_CloseBasicFile(void)
{
if (BINLOAD_bin_file != NULL) {
fclose(BINLOAD_bin_file);
BINLOAD_bin_file = NULL;
/* "RUN" ENTERed program */
if (BINLOAD_loading_basic != 0 && BINLOAD_loading_basic != BINLOAD_LOADING_BASIC_SAVED) {
ready_ptr = ready_prompt;
ESC_AddEscRts(ehwrit_addr, ESC_EHWRIT, Devices_... | false | false | false | false | false | 0 |
asd_destroy_global_caches(void)
{
if (asd_dma_token_cache)
kmem_cache_destroy(asd_dma_token_cache);
asd_dma_token_cache = NULL;
if (asd_ascb_cache)
kmem_cache_destroy(asd_ascb_cache);
asd_ascb_cache = NULL;
} | false | false | false | false | false | 0 |
bit_from_pos (tree offset, tree bitpos)
{
if (TREE_CODE (offset) == PLUS_EXPR)
offset = size_binop (PLUS_EXPR,
fold_convert (bitsizetype, TREE_OPERAND (offset, 0)),
fold_convert (bitsizetype, TREE_OPERAND (offset, 1)));
else
offset = fold_convert (bitsizetype, offset);
return size_binop (PLUS_EXPR... | false | false | false | false | false | 0 |
transpa (a_pixel *source, a_pixel *dest, int xt, int yt, char coul)
{
int x, y;
for (y = yt; y > 0; y--) {
for (x = xt; x > 0; x--)
if (*source != coul)
*dest++ = *source++;
else {
dest++;
source++;
}
source += 320 - xt;
dest += xbuf - xt;
};
} | false | false | false | false | false | 0 |
profile_create_node(const char *name, const char *value,
struct profile_node **ret_node)
{
struct profile_node *new;
new = malloc(sizeof(struct profile_node));
if (!new)
return ENOMEM;
memset(new, 0, sizeof(struct profile_node));
new->name = strdup(name);
if (new->name == 0) {
profile_free_node(n... | false | false | false | false | false | 0 |
find_and_remove_object(unsigned long ptr, int alias)
{
unsigned long flags;
struct kmemleak_object *object;
write_lock_irqsave(&kmemleak_lock, flags);
object = lookup_object(ptr, alias);
if (object) {
rb_erase(&object->rb_node, &object_tree_root);
list_del_rcu(&object->object_list);
}
write_unlock_irqrestor... | false | false | false | false | false | 0 |
min(int min_)
{
if (min_!=min()&&min_<=max())
{
_min=min_;
if (value()<min()) _value=min();
configureElevator();
redrawElevator();
}
} | false | false | false | false | false | 0 |
childNode(unsigned long index)
{
unsigned long i;
NodeImpl *n = firstChild();
for (i = 0; n && i < index; i++)
n = n->nextSibling();
return n;
} | false | false | false | false | false | 0 |
amdmsOpenFitsFile(amdmsFITS **file, char *fileName)
{
amdmsFITS *hfile = NULL;
int status = 0;
int hdutype;
amdmsDebug(__FILE__, __LINE__, "amdmsOpenFitsFile(.., %s)", fileName);
if (*file == NULL) {
hfile = (amdmsFITS*)calloc((size_t)1, sizeof(amdmsFITS));
if (hfile == NULL) {
retu... | false | false | false | false | false | 0 |
on_stack_view_source_activate (GtkAction *action, gpointer user_data)
{
GtkTreeModel *model;
GtkTreeSelection *selection;
GtkTreeIter iter;
GtkTreeView *view;
gchar *uri;
gchar *line_str;
guint line;
gchar *adr_str;
gulong address;
StackTrace* st = (StackTrace*) user_data;
view = st->treeview;
selection =... | false | false | false | false | false | 0 |
loop_restr_fuse(Module_table *module_head,
Boolean log_out_flag)
{
Module_table *module;
Block *block_tail;
Boolean fuse_flag;
log_out = log_out_flag;
if (log_out) {
mainlog("--- loop restr fuse ---");
}
fuse_flag = FALSE;
retry:;
module = module_he... | false | false | false | false | false | 0 |
gnumeric_loginv (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
gnm_float p, mean, stddev;
p = value_get_as_float (argv[0]);
mean = value_get_as_float (argv[1]);
stddev = value_get_as_float (argv[2]);
if (p < 0 || p > 1 || stddev <= 0)
return value_new_error_NUM (ei->pos);
return value_new_float (qlnor... | false | false | false | false | false | 0 |
close()
{
// compress and write remaining data
z_streamp z = &iPriv->iFlate;
z->next_in = (Bytef *) iIn.data();
z->avail_in = iN;
int err;
do {
z->next_out = (Bytef *) iOut.data();
z->avail_out = iOut.size();
err = ::deflate(z, Z_FINISH);
if (err != Z_OK && err != Z_STREAM_END) {
ipeD... | false | false | false | false | false | 0 |
GMT_set_resolution (char *res, char opt)
{
/* Decodes the -D<res> option and returns the base integer value */
GMT_LONG base;
switch (*res) {
case 'f': /* Full */
base = 0;
break;
case 'h': /* High */
base = 1;
break;
case 'i': /* Intermediate */
base = 2;
break;
case 'l': /* Low */
ba... | true | true | false | false | false | 1 |
on_drag_end (ClutterDragAction *action,
ClutterActor *actor,
gfloat event_x,
gfloat event_y,
ClutterModifierType modifiers)
{
ClutterActor *handle = clutter_drag_action_get_drag_handle (action);
g_print ("Drag ended at: %.0f,... | false | false | false | false | false | 0 |
shdma_tx_submit(struct dma_async_tx_descriptor *tx)
{
struct shdma_desc *chunk, *c, *desc =
container_of(tx, struct shdma_desc, async_tx);
struct shdma_chan *schan = to_shdma_chan(tx->chan);
dma_async_tx_callback callback = tx->callback;
dma_cookie_t cookie;
bool power_up;
spin_lock_irq(&schan->chan_lock);
p... | false | false | false | false | false | 0 |
net_login(nut_ctype_t *client, int numarg, const char **arg)
{
upstype_t *ups;
if (numarg != 1) {
send_err(client, NUT_ERR_INVALID_ARGUMENT);
return;
}
if (client->loginups != NULL) {
upslogx(LOG_INFO, "Client %s@%s tried to login twice", client->username, client->addr);
send_err(client, NUT_ERR_ALREADY_L... | false | false | false | false | false | 0 |
o_cue_set_color(GSCHEM_TOPLEVEL *w_current, int color)
{
if (w_current->toplevel->override_color != -1 ) {
gschem_cairo_set_source_color (w_current, x_color_lookup (w_current->toplevel->override_color));
} else {
gschem_cairo_set_source_color (w_current, x_color_lookup (color));
}
} | false | false | false | false | false | 0 |
dataflush()
{
outc( '\n' );
if ( ++dataline >= NUMDATALINES )
{
/* Put out a blank line so that the table is grouped into
* large blocks that enable the user to find elements easily.
*/
outc( '\n' );
dataline = 0;
}
/* Reset the number of characters written on the current line. */
datapos = 0;
} | true | true | false | false | true | 1 |
GetDetails( int* nSigCount, DKIMVerifyDetails** pDetails )
{
Details.clear();
for (list<SignatureInfo>::iterator i = Signatures.begin(); i != Signatures.end(); ++i)
{
DKIMVerifyDetails d;
d.szSignature = (char*)i->Header.c_str();
d.szSignatureDomain = (char*)i->Domain.c_str();
d.szIdentityDomain = ... | false | false | false | false | false | 0 |
_xdg_ucs4_to_lower(xdg_unichar_t source)
{
/* FIXME: Do a real to_upper sometime */
/* CaseFolding-3.2.0.txt has a table of rules. */
if ((source & 0xFF) == source)
return (xdg_unichar_t) tolower((unsigned char) source);
return source;
} | false | false | false | false | false | 0 |
main(int argc, char **argv)
{
vtkPythonAppInitEnableMSVCDebugHook();
#ifdef VTK_COMPILED_USING_MPI
VTKMPICleanup.Initialize(&argc, &argv);
#endif // VTK_COMPILED_USING_MPI
int displayVersion = 0;
if ( argc > 1 )
{
int cc;
for ( cc = 1; cc < argc; cc ++ )
{
if ( strcmp(argv[cc], "-V") =... | false | false | false | false | false | 0 |
ocfs2_search_dirblock(struct buffer_head *bh,
struct inode *dir,
const char *name, int namelen,
unsigned long offset,
char *first_de,
unsigned int bytes,
struct ocfs2_dir_entry **res_dir)
{
struct ocfs2_dir_entry *de;
char *dlimit, *de_buf;
int de_len;
int ret = 0;
de_buf = first_de;... | false | false | false | false | false | 0 |
zend_do_fetch_global_variable(znode *varname, const znode *static_assignment, int fetch_type TSRMLS_DC) /* {{{ */
{
zend_op *opline;
znode lval;
znode result;
if (varname->op_type == IS_CONST) {
if (Z_TYPE(varname->u.constant) != IS_STRING) {
convert_to_string(&varname->u.constant);
}
}
opline = get_next... | false | false | false | false | false | 0 |
gen_inc1(
FILE *fp,
const char *type,
struct el *first,
struct el *last,
struct sig *sig_first,
struct sig *sig_last
)
{
/*
* Generate Header
*/
fprintf(fp, "/*\n");
fprintf(fp, " * WARNING:\n");
fprintf(fp, " *\n");
fprintf(fp, " * Automatically generated from %s.\n", inname);
fprintf(fp, " */\n");
f... | false | false | false | false | false | 0 |
checkIndex(int id)
{
if (obj_index.count(id)==0) return NULL;
return obj_index[id];
} | false | false | false | false | false | 0 |
http_handle_httpversion(int epfd, cache_connection* connection){
char* buffer;
int end, n;
state_action ret = continue_processing;
DEBUG("[#%d] Handling HTTP version\n", connection->client_sock);
RBUF_ITERATE(connection->input, n, buffer, end, ret, http_read_version(epfd, connection, buffer, n));
if (n != 0){
... | false | false | false | false | false | 0 |
CONF_get_number(LHASH_OF(CONF_VALUE) *conf,const char *group,
const char *name)
{
int status;
long result = 0;
if (conf == NULL)
{
status = NCONF_get_number_e(NULL, group, name, &result);
}
else
{
CONF ctmp;
CONF_set_nconf(&ctmp, conf);
status = NCONF_get_number_e(&ctmp, group, name, &result)... | false | false | false | false | false | 0 |
gst_stream_splitter_sink_getcaps (GstPad * pad, GstCaps * filter)
{
GstStreamSplitter *stream_splitter =
(GstStreamSplitter *) GST_PAD_PARENT (pad);
guint32 cookie;
GList *tmp;
GstCaps *res = NULL;
/* Return the combination of all downstream caps */
STREAMS_LOCK (stream_splitter);
resync:
if (G_U... | false | false | false | false | false | 0 |
ui_choicemenupos(struct uih_context *uih, int *x, int *y, int *width,
int *height, void *data)
{
struct ui_choicedata *choice = (struct ui_choicedata *) data;
if (filevisible || helpvisible) {
*x = *y = *width = *height = 0;
return;
}
*x = choice->x;
*y = choice->y;
*width = choice->width;
... | false | false | false | false | false | 0 |
job_stdout_predecessors_requested_started(job_handler_t* handler, lList **alpp)
{
qstat_stdout_ctx_t *ctx = (qstat_stdout_ctx_t*)handler->ctx;
DENTER(TOP_LAYER, "job_stdout_predecessors_requested_started");
ctx->predecessor_requested_count = 0;
printf(" Predecessor Jobs (request): ");
DEXIT;
... | false | false | false | false | false | 0 |
index_readchild(const struct index_node_f *parent,
int ch)
{
if (parent->first <= ch && ch <= parent->last) {
return index_read(parent->file,
parent->children[ch - parent->first]);
}
return NULL;
} | false | false | false | false | true | 1 |
applyPostLoadEffects()
{
foreach (const PictureEffect & effect, m_afterLoadEffects)
m_photo->addEffect(effect);
m_afterLoadEffects.clear();
update();
GFX_CHANGED();
} | false | false | false | false | false | 0 |
read_db(struct res_db *db, const char *fn)
{
FILE *fp;
char line[1024];
if (!fn) {
return ;
}
fp = fopen(fn, "r");
if (!fp) {
return ;
}
while (fgets(line, 1024, fp)) {
parse_line(db, line);
}
} | true | true | false | false | true | 1 |
task_no_data_intr(ide_drive_t *drive)
{
ide_hwif_t *hwif = drive->hwif;
struct ide_cmd *cmd = &hwif->cmd;
struct ide_taskfile *tf = &cmd->tf;
int custom = (cmd->tf_flags & IDE_TFLAG_CUSTOM_HANDLER) ? 1 : 0;
int retries = (custom && tf->command == ATA_CMD_INIT_DEV_PARAMS) ? 5 : 1;
u8 stat;
local_irq_enable_in_ha... | false | false | false | false | false | 0 |
on_clone_item1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
if(fpm_valid_edit_data()) {
fpm_data* new_data;
new_data = g_malloc0(sizeof(fpm_data));
state->new_entry = TRUE;
new_data->title=g_strdup(glb_edit_data->title);
... | false | false | false | false | false | 0 |
px_resize(PERM *px, int new_size)
#endif
{
int i;
if (new_size < 0)
error(E_NEG,"px_resize");
if ( ! px )
return px_get(new_size);
/* nothing is changed */
if (new_size == px->size)
return px;
if ( new_size > px->max_size )
{
if (mem_info_is_on()) {
mem_bytes(TYPE_P... | false | false | false | true | false | 1 |
writebyte_internal( libspectrum_word address, libspectrum_byte b )
{
libspectrum_word bank = address >> MEMORY_PAGE_SIZE_LOGARITHM;
memory_page *mapping = &memory_map_write[ bank ];
if( spectranet_paged ) {
/* all writes need to be parsed by the flash rom emulation */
spectranet_flash_rom_write(address... | false | false | false | false | false | 0 |
AcpiReleaseGlobalLock (
UINT32 Handle)
{
ACPI_STATUS Status;
if (!Handle || (Handle != AcpiGbl_GlobalLockHandle))
{
return (AE_NOT_ACQUIRED);
}
Status = AcpiExReleaseMutexObject (AcpiGbl_GlobalLockMutex);
return (Status);
} | false | false | false | false | false | 0 |
cik_sdma_sw_init(void *handle)
{
struct amdgpu_ring *ring;
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
int r, i;
r = cik_sdma_init_microcode(adev);
if (r) {
DRM_ERROR("Failed to load sdma firmware!\n");
return r;
}
/* SDMA trap event */
r = amdgpu_irq_add_id(adev, 224, &adev->sdma.trap_ir... | false | false | false | false | false | 0 |
initRelativeUnit(
const UResourceBundle *resource,
const char *path,
QuantityFormatter *relativeUnit,
UErrorCode &status) {
LocalUResourceBundlePointer topLevel(
ures_getByKeyWithFallback(resource, path, NULL, &status));
if (U_FAILURE(status)) {
return;
}
... | false | false | false | false | false | 0 |
find_cmd_start (start)
int start;
{
register int s, os;
os = 0;
while (((s = skip_to_delim (rl_line_buffer, os, COMMAND_SEPARATORS, SD_NOJMP|SD_NOSKIPCMD)) <= start) &&
rl_line_buffer[s])
os = s+1;
return os;
} | false | false | false | false | false | 0 |
mailimap_crlf_parse(mailstream * fd, MMAPString * buffer,
size_t * indx)
{
size_t cur_token = * indx;
int r;
#ifdef UNSTRICT_SYNTAX
mailimap_space_parse(fd, buffer, &cur_token);
#endif
r = mailimap_token_case_insensitive_parse(fd, buffer, &cur_token, "\r\n");
if (r == MAILIMAP_NO_ERROR) {
* ... | false | false | false | false | false | 0 |
glue_chk_controls ( Operation *op, SlapReply *rs )
{
slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
BackendDB *b0 = op->o_bd;
BackendInfo *bi0 = op->o_bd->bd_info;
int rc = SLAP_CB_CONTINUE;
op->o_bd = glue_back_select (b0, &op->o_req_ndn);
if ( op->o_bd == b0 )
return SLAP_CB_CONTINUE;
b0->bd_info ... | false | false | false | false | false | 0 |
test_limited_ascii(char* in_string, unsigned int str_len) {
char* test_str = in_string;
while (test_str < in_string+str_len) {
if ( *test_str < 32 || *test_str > 126) {
return false;
}
test_str++;
}
return true;
} | false | false | false | false | false | 0 |
eaptype_call(EAP_TYPES *atype, EAP_HANDLER *handler)
{
int rcode = 1;
REQUEST *request = handler->request;
const char *module = request->module;
RDEBUG2("processing type %s", atype->typename);
request->module = atype->typename;
rad_assert(atype != NULL);
switch (handler->stage) {
case INITIATE:
if (!atype-... | false | false | false | false | false | 0 |
compose_cb(GtkAction *action, gpointer data)
{
MessageView *messageview = (MessageView *)data;
PrefsAccount *ac = NULL;
FolderItem *item = NULL;
if (messageview->msginfo)
item = messageview->msginfo->folder;
if (item) {
ac = account_find_from_item(item);
if (ac && ac->protocol == A_NNTP &&
FOLDER_TYP... | false | false | false | false | false | 0 |
processspecials(void)
{
int i;
if(allowspecial) return; /* Only dump attributes if using netcdf-3 */
for(i=0;i<listlength(vardefs);i++) {
Symbol* vsym = (Symbol*)listget(vardefs,i);
processspecial1(vsym);
}
} | false | false | false | false | false | 0 |
poppler_layer_get_radio_button_group_id (PopplerLayer *poppler_layer)
{
g_return_val_if_fail (POPPLER_IS_LAYER (poppler_layer), FALSE);
return GPOINTER_TO_INT (poppler_layer->rbgroup);
} | false | false | false | false | false | 0 |
setLodCamera(const Camera* lodCam)
{
if (lodCam == this)
mLodCamera = 0;
else
mLodCamera = lodCam;
} | false | false | false | false | false | 0 |
sendrequest(isc_sockaddr_t *destaddr, dns_message_t *msg,
dns_request_t **request)
{
isc_result_t result;
nsu_requestinfo_t *reqinfo;
isc_sockaddr_t *srcaddr;
reqinfo = isc_mem_get(gmctx, sizeof(nsu_requestinfo_t));
if (reqinfo == NULL)
fatal("out of memory");
reqinfo->msg = msg;
reqinfo->addr = destaddr... | false | false | false | false | false | 0 |
make_uniting_coercion (NODE_T * n, MOID_T * q)
{
make_coercion (n, UNITING, derow (q));
if (IS (q, ROW_SYMBOL) || IS (q, FLEX_SYMBOL)) {
make_rowing_coercion (n, derow (q), q);
}
} | false | false | false | false | false | 0 |
ax88179_check_efuse(struct usbnet *dev, u16 *ledmode)
{
u8 i;
u8 efuse[64];
u16 csum = 0;
if (ax88179_read_cmd(dev, AX_ACCESS_EFUS, 0, 64, 64, efuse) < 0)
return -EINVAL;
if (*efuse == 0xFF)
return -EINVAL;
for (i = 0; i < 64; i++)
csum = csum + efuse[i];
while (csum > 255)
csum = (csum & 0x00FF) + (... | false | false | false | false | false | 0 |
_e_smart_monitor_modes_fill(E_Smart_Data *sd)
{
/* clear out any old modes */
if (sd->modes) eina_list_free(sd->modes);
/* if we have an assigned monitor, copy the modes from that */
if ((sd->output) && (sd->output->monitor))
sd->modes = eina_list_clone(sd->output->monitor->modes);
else if (sd->crt... | false | false | false | false | false | 0 |
checkArg(Object *arg, TchkType type) {
switch (type) {
case tchkBool: return arg->isBool();
case tchkInt: return arg->isInt();
case tchkNum: return arg->isNum();
case tchkString: return arg->isString();
case tchkName: return arg->isName();
case tchkArray: return arg->isArray();
case tchkProps... | false | false | false | false | false | 0 |
DFSDIsdginfo(int32 file_id)
{
DFdi ptr;
CONSTR(FUNC, "DFSDIsdginfo");
int32 aid;
intn ret_value = SUCCEED;
HEclear();
/* Perform global, one-time initialization */
if (library_terminate == FALSE)
if(DFSDIstart()==FAIL)
HGOTO_ERROR(DFE_CANTINIT, FAIL);
if (!... | false | false | false | false | false | 0 |
metric_id_get(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct mrvl_mesh_defaults defs;
int ret;
ret = mesh_get_default_parameters(dev, &defs);
if (ret)
return ret;
return snprintf(buf, 5, "%d\n", defs.meshie.val.active_metric_id);
} | false | false | false | false | false | 0 |
pdc202xx_dma_start(ide_drive_t *drive)
{
if (drive->current_speed > XFER_UDMA_2)
pdc_old_enable_66MHz_clock(drive->hwif);
if (drive->media != ide_disk || (drive->dev_flags & IDE_DFLAG_LBA48)) {
ide_hwif_t *hwif = drive->hwif;
struct request *rq = hwif->rq;
unsigned long high_16 = hwif->extra_base - 16;
unsi... | false | false | false | false | false | 0 |
drivers_vbar(int x, int y, int len, int promille, int pattern)
{
Driver *drv;
debug(RPT_DEBUG, "%s(x=%d, y=%d, len=%d, promille=%d, pattern=%d)",
__FUNCTION__, x, y, len, promille, pattern);
/* NEW FUNCTIONS
*
* We need more data in the widget. Requires language update...
*/
ForAllDrivers(drv) {
... | false | false | false | false | false | 0 |
smatch(s,t)
char *s, *t;
{
char a, b;
for (;;) {
while (*s == *t)
if (*s++ == '\0')
return 1;
else
t++;
a = *s++;
b = *t++;
if (isupper(a)) a = tolower(a);
if (isupper(b)) b = tolower(b);
if (a != b)
return 0;
}
} | false | false | false | false | false | 0 |
load_all_lots( GncSqlBackend* be )
{
GncSqlStatement* stmt;
GncSqlResult* result;
g_return_if_fail( be != NULL );
stmt = gnc_sql_create_select_statement( be, TABLE_NAME );
if ( stmt != NULL )
{
result = gnc_sql_execute_select_statement( be, stmt );
gnc_sql_statement_dispose( st... | false | false | false | false | false | 0 |
clj_put_params(
gx_device * pdev,
gs_param_list * plist
)
{
float mediasize[2];
bool rotate = false;
int have_pagesize = clj_media_size(mediasize, plist);
if (have_pagesize < 0)
return have_pagesize;
if (have_pagesize) ... | false | false | false | false | false | 0 |
verify_list (const struct format_arg_list *list)
{
unsigned int i;
unsigned int total_repcount;
ASSERT (list->initial.count <= list->initial.allocated);
total_repcount = 0;
for (i = 0; i < list->initial.count; i++)
{
verify_element (&list->initial.element[i]);
total_repcount += list->initial.... | false | false | false | false | false | 0 |
get_pen_pixbuf (GdkPixbuf **pixbuf,
gchar *color,
gdouble thickness,
gdouble arrow,
gdouble circle_width)
{
cairo_t *pen_cr = (cairo_t *) NULL;
cairo_surface_t *surface = (cairo_surface_t *) NULL;
cairo_surface_t *image_surface = (ca... | false | false | false | false | false | 0 |
panel_bindings_mouse_modifier_set_from_string (const char *str)
{
guint modifier_keysym;
guint modifier_keymask;
gtk_accelerator_parse (str, &modifier_keysym, &modifier_keymask);
if (modifier_keysym == 0 && modifier_keymask == 0) {
g_warning ("Unable to parse mouse modifier '%s'\n", str);
return;
}
if (mod... | false | false | false | false | false | 0 |
outwnd_init(int display_under_freespace_window)
{
outwnd_inited = true;
char pathname[MAX_PATH_LEN];
snprintf(pathname, MAX_PATH_LEN, "%s/%s/%s/%s", detect_home(), Osreg_user_dir, Pathtypes[CF_TYPE_DATA].path, FreeSpace_logfilename);
if (Log_fp == NULL) {
Log_fp = fopen(pathname, "wb");
if (Log_fp == NULL) ... | false | false | false | false | false | 0 |
EncryptString2(const string& str,const string &key)
{
unsigned char k=Kawa0001CalcKey(key);
string encodedstr;
encodedstr.reserve(str.size()+1);
encodedstr+=k;
for(unsigned int i=0,max=str.size();i<max;i++) {
encodedstr+=str[i]^k;
}
return(string("!KAWA0001")+EncodeBase64(encodedstr));
} | false | false | false | false | false | 0 |
byte_buffer_purge(void) {
int i;
#if 0
if (byte_buffer_data!=NULL) free(byte_buffer_data);
byte_buffer_data=calloc(BYTE_BUFF_SIZE, 1);
#endif
if (byte_buffer_data==NULL) {
if (!(byte_buffer_data=malloc(BYTE_BUFF_SIZE))) return;
}
if (byte_buffer_location==-1) {
for (i=0;i<(BYTE_BUFF_SIZE);i++) byte_buffer_da... | false | false | false | false | false | 0 |
hash(const char *p)
{
/* A 32-bit version of Peter Weinberger's (PJW) hash algorithm,
as used by ELF for hashing function names. */
unsigned g, h = 0;
while (*p != '\0') {
h = (h << 4) + *p++;
if ((g = h & 0xF0000000) != 0) {
h ^= g >> 24;
h &= 0x0FFFFFFF;
}
}
return h;
} | false | false | false | false | false | 0 |
write_16(IOBUF out, u16 a)
{
iobuf_put(out, a>>8);
if( iobuf_put(out,a) )
return -1;
return 0;
} | false | false | false | false | false | 0 |
event_box_realize_cb (GtkWidget *widget, GtkImage *icon)
{
GtkImageType type;
set_drag_cursor (widget);
type = gtk_image_get_storage_type (icon);
if (type == GTK_IMAGE_STOCK)
{
gchar *stock_id;
GdkPixbuf *pixbuf;
gtk_image_get_stock (icon, &stock_id, NULL);
pixbuf = gtk_widget_ren... | false | false | false | false | false | 0 |
qat_hal_get_uwords(struct icp_qat_fw_loader_handle *handle,
unsigned char ae, unsigned int uaddr,
unsigned int words_num, uint64_t *uword)
{
unsigned int i, uwrd_lo, uwrd_hi;
unsigned int ustore_addr, misc_control;
qat_hal_rd_ae_csr(handle, ae, AE_MISC_CONTROL, &misc_control);
qat_hal_wr_ae_csr... | false | false | false | false | false | 0 |
dump_ospf_hello(packet_t *pkt, u_int16_t length)
{
ospf_hello_header_t ospf_hello;
u_int8_t neighbor[4];
/*
* Get the header
*/
if (get_packet_bytes((u_int8_t *) &ospf_hello, pkt,
sizeof(ospf_hello_header_t)) == 0)
return;
/*
* Conversions
*/
ospf_hello.interval = ntohs(os... | false | false | false | false | false | 0 |
ParsePostfixExpression(bool* ok) {
// PostfixExpression ::
// LeftHandSideExpression ('++' | '--')?
Expression* expression = ParseLeftHandSideExpression(CHECK_OK);
if (!scanner().HasAnyLineTerminatorBeforeNext() &&
Token::IsCountOp(peek())) {
// Signal a reference error if the expression is an inva... | false | false | false | false | false | 0 |
update_current_entry (DialogData *data,
gboolean *update_selected_uri)
{
const char *name;
const char *location;
GFile *file;
char *uri;
GBookmarkFile *bookmarks;
if (update_selected_uri != NULL)
*update_selected_uri = TRUE;
if (data->last_selected_uri == NULL)
return;
if... | false | false | false | false | false | 0 |
gkrellm_chart_bg_piximage_override(GkrellmChart *cp,
GkrellmPiximage *bg_piximage, GkrellmPiximage *bg_grid_piximage)
{
if (!cp || !bg_piximage || !bg_grid_piximage)
return;
cp->bg_piximage = bg_piximage;
cp->bg_grid_piximage = bg_grid_piximage;
cp->bg_piximage_override = TRUE;
} | false | false | false | false | false | 0 |
re_compare(const char *s, const char *pattern)
{
bool find_target(const char *pattern, int *pindex, int plen, std::string& target, int *star, int *plus);
int slen = strlen(s);
int plen = strlen(pattern);
int sindex = 0;
int pindex = 0;
int star; // is s... | false | false | false | false | false | 0 |
turn_channel_bind(int verbose, uint16_t *chn,
app_ur_conn_info *clnet_info, ioa_addr *peer_addr) {
stun_buffer request_message, response_message;
beg_bind:
{
int cb_sent = 0;
if(negative_test) {
*chn = stun_set_channel_bind_request(&request_message, peer_addr, (u16bits)random());
} else {
*chn = st... | 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.