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 |
|---|---|---|---|---|---|---|
ComputeVideoArea(VIDEOMODE_resolution_t const *res, VIDEOMODE_resolution_t const *screen_res,
VIDEOMODE_MODE_t display_mode, unsigned int out_w, unsigned int out_h,
double *mult_w, double *mult_h, int rotate)
{
double asp_ratio;
/* asp_ratio = <Atari pixel asp... | false | false | false | false | false | 0 |
readProfile() {
FILE * file = readOutputFilename();
int width = atoi(needNextToken());
WiggleIterator * regions = readIterator();
WiggleIterator * wig = readLastIterator();
Multiplexer * profiles = ProfileMultiplexer(regions, width, wig);
double * profile = calloc(width, sizeof(double));
for (; !profiles->done... | false | false | true | false | true | 1 |
atCloseExpand(desc)
int desc ;
{
at_read_desc *dp ;
dp = desc_table[desc] ;
if (dp != 0) {
if (dp->ar_expansion) {
free(dp->ar_expansion) ;
}
if (dp->ar_key) {
af_dropkey(dp->ar_key) ;
}
if (dp->ar_fp != 0) {
fclose(dp->ar_fp) ;
}
if (dp->ar_buffer != 0) {
free(dp->ar_buffer) ;
... | false | false | false | false | false | 0 |
unload_thread_main (void *arg)
{
unload_data *data = (unload_data*)arg;
MonoDomain *domain = data->domain;
MonoThread *thread;
int i;
/* Have to attach to the runtime so shutdown can wait for this thread */
/* Force it to be attached to avoid racing during shutdown. */
thread = mono_thread_attach_full (mono_get... | false | false | false | false | false | 0 |
get_default_tag_attrib() {
static Container result;
if (result.size() == 0) {
typedef std::pair<std::string, std::string> pair;
result.insert(pair("a", "href"));
result.insert(pair("applet", "codebase"));
result.insert(pair("area", "href"));
re... | false | false | false | false | false | 0 |
r3964_exit(void)
{
int status;
TRACE_M("cleanup_module()");
status = tty_unregister_ldisc(N_R3964);
if (status != 0) {
printk(KERN_ERR "r3964: error unregistering linediscipline: "
"%d\n", status);
} else {
TRACE_L("linediscipline successfully unregistered");
}
} | false | false | false | false | false | 0 |
gw_am_close_catalog ( gboolean save) {
gint result = -1;
GWDBContext * context = gw_am_get_current_catalog_context ( );
GWCatalogPlugin *plugin = NULL;
if ( context != NULL) {
if ( (plugin = (GWCatalogPlugin*)gw_db_context_get_plugin ( context)) != NULL) {
plugin->gw_db_catalog_close ( context);
result = ... | false | false | false | false | false | 0 |
flush_stream_mpeg_video(bgav_stream_t * s, int flush)
{
if(!s->data.video.decoder->decoder->parse)
return 0;
s->data.video.decoder->decoder->parse(s, flush);
return 1;
} | false | false | false | false | false | 0 |
check_refs (const char *name,
bfd_boolean global,
asection *sec,
bfd *abfd,
struct lang_nocrossrefs *ncrs)
{
struct check_refs_info info;
/* We need to look through the relocations for this BFD, to see
if any of the relocations which refer to this symbol are from
a prohibited section.... | false | false | false | false | false | 0 |
emit_buffered_bits (phuff_entropy_ptr entropy, char * bufstart,
unsigned int nbits)
{
if (entropy->gather_statistics)
return; /* no real work */
while (nbits > 0) {
emit_bits(entropy, (unsigned int) (*bufstart), 1);
bufstart++;
nbits--;
}
} | false | false | false | false | false | 0 |
update_file_status (gftp_transfer * tdata)
{
char totstr[150], winstr[150], dlstr[150];
unsigned long remaining_secs, lkbs;
int hours, mins, secs, pcent;
intptr_t show_trans_in_title;
gftp_file * tempfle;
g_static_mutex_lock (&tdata->statmutex);
tempfle = tdata->curfle->data;
remaining_secs = (tdata... | true | true | false | false | false | 1 |
gwy_axis_quantize_normal_tics(gdouble arg, gint guide)
{
gdouble power = gwy_axis_dbl_raise(10.0, (gint)floor(log10(arg)));
gdouble xnorm = arg / power; /* approx number of decades */
gdouble posns = guide / xnorm; /* approx number of tic posns per decade */
gdouble tics;
if (posns > 40)
... | false | false | false | false | false | 0 |
aisc_add_message_queue(aisc_com *link, long size)
{
long len;
char *buffer;
struct aisc_client_message_queue *msg,*mp;
msg = (struct aisc_client_message_queue *)
calloc(sizeof(struct aisc_client_message_queue),1);
buffer = (char *)calloc(sizeof(char),(size_t)size);
len = aisc_c_read(lin... | false | false | false | false | false | 0 |
BtildeIF(double beta0 ,double ombeta0 ,
double beta1 ,double ombeta1 ,
Energy en0 ,Energy en1 ,
Energy m0 ,Energy m1 ,
Energy2 t ,double charge ,
Energy emin ,bool includegamma,
Energy mgamma) {
// coefficient of the divergent piece
Energy2 mpro... | false | false | false | false | false | 0 |
secret_collection_set_property (GObject *obj,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
SecretCollection *self = SECRET_COLLECTION (obj);
switch (prop_id) {
case PROP_SERVICE:
collection_take_service (se... | false | false | false | false | false | 0 |
Float_init_1(JNIEnv *env, jobject *obj , const char* p0 , lList **alpp) {
jgdi_result_t ret = JGDI_SUCCESS;
static jmethodID mid = NULL;
jclass clazz = NULL; jstring p0_obj = NULL;
DENTER(BASIS_LAYER, "Float_init_1");
clazz = Float_find_class(env, alpp);
if (clazz == NULL) {
DRETURN(J... | false | false | false | false | false | 0 |
i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method,
ASN1_BIT_STRING *bits, STACK_OF(CONF_VALUE) *ret)
{
BIT_STRING_BITNAME *bnam;
for(bnam =method->usr_data; bnam->lname; bnam++) {
if(ASN1_BIT_STRING_get_bit(bits, bnam->bitnum))
X509V3_add_value(bnam->lname, NULL, &ret);
}
return ret;
} | false | false | false | false | false | 0 |
setCompletionModel(QAbstractItemModel *completionModel)
{
mCompletionModel = completionModel;
if(mCode)
setCompleter(new ScriptCompleter(mCompletionModel, this));
} | false | false | false | false | false | 0 |
nlm_file_inuse(struct nlm_file *file)
{
struct inode *inode = nlmsvc_file_inode(file);
struct file_lock *fl;
struct file_lock_context *flctx = inode->i_flctx;
if (file->f_count || !list_empty(&file->f_blocks) || file->f_shares)
return 1;
if (flctx && !list_empty_careful(&flctx->flc_posix)) {
spin_lock(&flct... | false | false | false | false | false | 0 |
free_service_descriptor_if_empty(struct cdbus_service_descriptor * service_ptr)
{
if (service_ptr->lifetime_hook_function != NULL)
{
return;
}
if (!list_empty(&service_ptr->hooks))
{
return;
}
dbus_connection_remove_filter(cdbus_g_dbus_connection, cdbus_signal_handler, service_ptr);
list_del(... | false | false | false | false | false | 0 |
rsaep(private_gmp_rsa_public_key_t *this, chunk_t data)
{
mpz_t m, c;
chunk_t encrypted;
mpz_init(c);
mpz_init(m);
mpz_import(m, data.len, 1, 1, 1, 0, data.ptr);
mpz_powm(c, m, this->e, this->n);
encrypted.len = this->k;
encrypted.ptr = mpz_export(NULL, NULL, 1, encrypted.len, 1, 0, c);
if (encrypted.ptr =... | false | false | false | false | false | 0 |
PyFFFont_condenseExtend(PyObject *self, PyObject *args) {
FontViewBase *fv = ((PyFF_Font *) self)->fv;
struct counterinfo ci;
memset(&ci,0,sizeof(ci));
ci.sb_factor = ci.sb_add = -10000;
ci.correct_italic = true;
if ( !PyArg_ParseTuple(args,"dd|ddi",&ci.c_factor, &ci.c_add, &ci.sb_factor, &ci.... | false | false | false | false | false | 0 |
add_to_supported_fields (EBookBackendLDAP *bl,
gchar **attrs,
GHashTable *attr_hash)
{
gint i;
for (i = 0; attrs[i]; i++) {
gchar *query_prop = g_hash_table_lookup (attr_hash, attrs[i]);
if (query_prop == NULL)
continue;
bl->priv->supported_fields = g_slist... | false | false | false | false | false | 0 |
entityfilter_new()
{
entityfilter_ctx *ctx;
ctx = CAST(entityfilter_ctx *,
malloc(sizeof(entityfilter_ctx)));
if (ctx == NULL)
return NULL;
ctx->buffer[0] = 0;
ctx->buffer_pos = 0;
ctx->in_entity = 0;
return ctx;
} | false | false | false | false | false | 0 |
server_statfs_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct statvfs *buf,
dict_t *xdata)
{
gfs3_statfs_rsp rsp = {0,};
rpcsvc_request_t *req = NULL;
req = frame->local;
GF_PROTOCOL_DICT_SERIALIZE... | false | false | false | false | false | 0 |
us_printraw_vprintf( us_print_t *self_, const char *fmt, va_list ap )
{
bool r = false;
us_printraw_t *self = (us_printraw_t *)self_;
if ( self )
{
char *cur_ptr = self->m_buffer + self->m_cur_length;
int max_len = self->m_max_length - self->m_cur_length;
if ( max_len > 0 )
... | false | false | false | false | false | 0 |
handle_wds_oper_queue(struct work_struct *work)
{
struct ap_data *ap = container_of(work, struct ap_data,
wds_oper_queue);
local_info_t *local = ap->local;
struct wds_oper_data *entry, *prev;
spin_lock_bh(&local->lock);
entry = local->ap->wds_oper_entries;
local->ap->wds_oper_entries = NULL;
spin_unlock_... | false | false | false | false | false | 0 |
fmt_dialog_init_align_radio (char const *const name,
int const val, int const target,
FormatState *state,
GCallback handler)
{
GtkWidget *tmp = go_gtk_builder_get_widget (state->gui, name);
if (tmp != NULL) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmp),
val == target);
... | false | false | false | false | false | 0 |
s_enable(UT_Worker * _w)
{
GR_Caret * c = static_cast<GR_Caret *>(_w->getInstanceData());
c->m_worker->stop();
c->_blink(true);
if (!c->m_bCursorIsOn)
c->_blink(true); // blink again
else
{
c->_blink(true); // ?? - MARCM
c->_blink(true);
}
c->m_worker->start();
c->m_enabler->stop();
} | false | false | false | false | false | 0 |
recv_func_prehandle(struct rtw_adapter *padapter,
struct recv_frame *rframe)
{
int ret;
/* check the frame crtl field and decache */
ret = validate_recv_frame(padapter, rframe);
if (ret != _SUCCESS) {
RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
"recv_func: validate_recv_frame fail! drop pkt\n");
... | false | false | false | false | false | 0 |
chp2200_print_page(gx_device_printer * pdev, FILE * prn_stream)
{
gs_memory_t *mem = pdev->memory;
int width_in_pixels = pdev->width;
int width_in_bytes = width_in_pixels * 3; /* assume 24 bits (3 bytes per pixel) */
byte *lbuf = gs_alloc_bytes(mem, width_in_bytes,
"(inpu... | false | true | false | false | false | 1 |
comp_zlib_decompress(unsigned char *prev_block, unsigned char *curr_block, unsigned char *out_block, int blk_size, int bufsize) {
unsigned long dest_size;
int real_blksize=blk_size;
unsigned char *tmpbuf;
int retval;
/* Replant the header. */
if (curr_block[0]==120 && curr_block[1]==218) {
tmpbuf=curr_block;
}... | false | true | false | false | false | 1 |
rtw_ips_pwr_up(struct adapter *padapter)
{
int result;
u32 start_time = jiffies;
DBG_88E("===> rtw_ips_pwr_up..............\n");
rtw_reset_drv_sw(padapter);
result = ips_netdrv_open(padapter);
rtw_led_control(padapter, LED_CTL_NO_LINK);
DBG_88E("<=== rtw_ips_pwr_up.............. in %dms\n", rtw_get_passing... | false | false | false | false | false | 0 |
trace_seq_putmem(struct trace_seq *s, const void *mem, unsigned int len)
{
if (s->full)
return;
__trace_seq_init(s);
if (len > TRACE_SEQ_BUF_LEFT(s)) {
s->full = 1;
return;
}
seq_buf_putmem(&s->seq, mem, len);
} | false | false | false | false | false | 0 |
setup_tables(void)
{
unsigned long inodes;
unsigned norm_firstzone;
unsigned sb_zmaps;
unsigned i;
/* memset(G.superblock_buffer, 0, BLOCK_SIZE); */
/* memset(G.boot_block_buffer, 0, 512); */
SB_MAGIC = G.magic;
SB_ZONE_SIZE = 0;
SB_MAXSIZE = version2 ? 0x7fffffff : (7 + 512 + 512 * 512) * 1024;
if (version2... | false | false | false | false | false | 0 |
arm_apply_result_size (void)
{
int size = 16;
if (TARGET_32BIT)
{
if (TARGET_HARD_FLOAT_ABI)
{
if (TARGET_VFP)
size += 32;
if (TARGET_FPA)
size += 12;
if (TARGET_MAVERICK)
size += 8;
}
if (TARGET_IWMMXT_ABI)
size += 8;
}
return size;
} | false | false | false | false | false | 0 |
CanReadFile(const char* fname)
{
std::string filename = fname;
if( filename == "" )
{
return false;
}
bool extensionFound = false;
std::string::size_type mhaPos = filename.rfind(".mha");
if ((mhaPos != std::string::npos)
&& (mhaPos == filename.length() - 4))
{
extensionFound = true... | false | false | false | false | false | 0 |
list_commands_in_dir(struct cmdnames *cmds,
const char *path,
const char *prefix)
{
int prefix_len;
DIR *dir = opendir(path);
struct dirent *de;
struct strbuf buf = STRBUF_INIT;
int len;
if (!dir)
return;
if (!prefix)
prefix = "git-";
prefix_len = strlen(prefix);
strbuf_addf(&buf, "%s/", path... | false | false | false | false | false | 0 |
mpegts_base_sink_activate_mode (GstPad * pad, GstObject * parent,
GstPadMode mode, gboolean active)
{
gboolean res;
MpegTSBase *base = GST_MPEGTS_BASE (parent);
switch (mode) {
case GST_PAD_MODE_PUSH:
base->mode = BASE_MODE_PUSHING;
res = TRUE;
break;
case GST_PAD_MODE_PULL:
i... | false | false | false | false | false | 0 |
garcon_menu_item_pool_insert (GarconMenuItemPool *pool,
GarconMenuItem *item)
{
g_return_if_fail (GARCON_IS_MENU_ITEM_POOL (pool));
g_return_if_fail (GARCON_IS_MENU_ITEM (item));
/* Insert into the hash table and remove old item (if any) */
g_hash_table_replace (pool->priv->it... | false | false | false | false | false | 0 |
normalize(int dir)
{
for (;;) {
if (normalize_eps(dir)) {
continue;
} else if (dynamic_cast<CatNode *>(child[dir])) {
// (ab)c -> a(bc)
rotate_node(this, dir);
} else {
break;
}
}
if (child[dir])
child[dir]->normalize(dir);
if (child[!dir])
child[!dir]->normalize(dir);
} | false | false | false | false | false | 0 |
CreateControls()
{
////@begin CAccountManagerInfoPage content construction
CAccountManagerInfoPage* itemWizardPage23 = this;
wxBoxSizer* itemBoxSizer24 = new wxBoxSizer(wxVERTICAL);
itemWizardPage23->SetSizer(itemBoxSizer24);
m_pTitleStaticCtrl = new wxStaticText;
m_pTitleStaticCtrl->Create( i... | false | false | false | false | false | 0 |
writeImage( ExifImageDesc &imgDesc )
{
ExifStatus status = EXIF_OK;
exif_uint32 length = imgDesc.numberOfRows ;
uint8* buf = imgDesc.components[0].theData ;
for (unsigned int row=0; row<length; row++)
{
if( (status = writeScanline(buf, row) ) != EXIF_OK )
return status... | false | false | false | false | false | 0 |
smsc911x_mac_read(struct smsc911x_data *pdata, unsigned int offset)
{
unsigned int temp;
SMSC_ASSERT_MAC_LOCK(pdata);
temp = smsc911x_reg_read(pdata, MAC_CSR_CMD);
if (unlikely(temp & MAC_CSR_CMD_CSR_BUSY_)) {
SMSC_WARN(pdata, hw, "MAC busy at entry");
return 0xFFFFFFFF;
}
/* Send the MAC cmd */
smsc911x_... | false | false | false | false | false | 0 |
gdl_dock_master_get_object (GdlDockMaster *master,
const gchar *nick_name)
{
gpointer *found;
g_return_val_if_fail (master != NULL, NULL);
if (!nick_name)
return NULL;
found = g_hash_table_lookup (master->dock_objects, nick_name);
return found ? GDL_DOCK... | false | false | false | false | false | 0 |
swf_bifs_remove_obj(SWFReader *read, u32 depth, u32 ID)
{
char szDEF[100];
GF_Command *com;
GF_CommandField *f;
com = gf_sg_command_new(read->load->scene_graph, GF_SG_INDEXED_REPLACE);
sprintf(szDEF, "CLIP%d_DL", read->current_sprite_id);
com->node = gf_sg_find_node_by_name(read->load->scene_graph, szDEF);
gf_n... | true | true | false | false | true | 1 |
overlap_level2_up3(jxr_image_t image, int use_my, int ch)
{
if (ch == 0) {
overlap_level2_up3_444(image, use_my, ch);
}
else {
switch (image->use_clr_fmt) {
case 1: /*YUV420*/
overlap_level2_up3_420(image, use_my, ch);
break;
case 2: /... | false | false | false | false | false | 0 |
gda_capi_recordset_new (GdaConnection *cnc, GdaCapiPStmt *ps, GdaSet *exec_params,
GdaDataModelAccessFlags flags, GType *col_types)
{
GdaCapiRecordset *model;
CapiConnectionData *cdata;
gint i;
GdaDataModelAccessFlags rflags;
g_return_val_if_fail (GDA_IS_CONNECTION (cnc), NULL);
g_... | false | false | false | false | false | 0 |
table_create_cb(AW_window *aww,GBDATA *gb_main){
char *dest = aww->get_root()->awar(AWAR_TABLE_DEST)->read_string();
GB_ERROR error = GB_begin_transaction(gb_main);
if (!error) {
error = GB_check_key(dest);
if (!error){
GBDATA *gb_table = GBT_open_table(gb_main,dest,GB_... | false | false | false | false | false | 0 |
merge_embed(gs_param_string_array * psa, gs_param_string_array * asa,
gs_memory_t *mem)
{
gs_param_string_array rsa;
gs_param_string *rdata;
int code;
rdata = gs_alloc_struct_array(mem, psa->size + asa->size,
gs_param_string,
... | false | true | false | false | false | 1 |
iface_get_props_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data)
{
NMSupplicantInfo *info = (NMSupplicantInfo *) user_data;
GHashTable *props = NULL;
GError *error = NULL;
if (dbus_g_proxy_end_call (proxy, call_id, &error,
DBUS_TYPE_G_MAP_OF_VARIANT, &props,
... | false | false | false | false | false | 0 |
netsnmp_free_all_list_data(netsnmp_data_list *head)
{
netsnmp_data_list *tmpptr;
for (; head;) {
netsnmp_free_list_data(head);
tmpptr = head;
head = head->next;
SNMP_FREE(tmpptr);
}
} | false | false | false | false | false | 0 |
on_keyframe_duration_change(GtkWidget *widget, gpointer user_data) {
/* The user just changed the current keyframe's duration.
* Update the tree model, and recalculate the size of our animation.
*/
Explorer *self = EXPLORER(user_data);
GtkTreeIter iter;
if (!self->allow_transition_changes)
r... | false | false | false | false | false | 0 |
g2_qht_search_add_word(const tchar_t *s, size_t start, size_t len)
{
struct search_hash_buffer *shb =
(struct search_hash_buffer *)qht_get_scratch1(QHT_DEFAULT_BYTES);
if(!shb || shb->num >= shb->size)
return;
shb->hashes[shb->num++] = g2_qht_search_number_word(s, start, len);
} | false | false | false | false | false | 0 |
throw_exception(JNIEnv *env, int errnum, const char *message)
{
const char *error = message;
jclass newExcCls = NULL;
if (error == NULL) {
error = drmaa_strerror(errnum);
}
newExcCls = get_exception_class(env, errnum, error);
if (newExcCls != NULL) {
(*env)->ThrowNew(env, newExcCls, err... | false | false | false | false | false | 0 |
mono_arch_setup_async_callback (MonoContext *ctx, void (*async_cb)(void *fun), gpointer user_data)
{
guint64 sp = ctx->rsp;
ctx->rdi = (guint64)user_data;
/* Allocate a stack frame below the red zone */
sp -= 128;
/* The stack should be unaligned */
if ((sp % 16) == 0)
sp -= 8;
#ifdef __linux__
/* Preserve t... | false | false | false | false | false | 0 |
visitSwitchInst(SwitchInst &I) {
ExecutionContext &SF = ECStack.back();
Value* Cond = I.getCondition();
Type *ElTy = Cond->getType();
GenericValue CondVal = getOperandValue(Cond, SF);
// Check to see if any of the cases match...
BasicBlock *Dest = 0;
unsigned NumCases = I.getNumCases();
// Skip the fir... | false | false | false | false | false | 0 |
read_whole_dir__wla(const char *path, string_list_ty *result)
{
char *data;
long data_len;
char *cp;
if (glue_read_whole_dir(path, &data, &data_len))
return -1;
for (cp = data; cp < data + data_len; )
{
string_ty *s;
s = str_from_c(cp);
cp += s->str_l... | false | false | false | false | false | 0 |
fix_register(const Operand* op, int part, symbol_type type)
{ int regno;
regno = search_register(op, part, type);
if (regno == -1)
{ OUTPUT_REGISTER_TABLE;
IERROR_REGISTER_NUMBER(regno);
}
#ifdef DEBUG_REGISTER_TABLE
printf(";# Fix Register : R%d\n", regno);
#endif
register_ta... | false | false | false | false | false | 0 |
tor_version_compare(tor_version_t *a, tor_version_t *b)
{
int i;
tor_assert(a);
tor_assert(b);
if ((i = a->major - b->major))
return i;
else if ((i = a->minor - b->minor))
return i;
else if ((i = a->micro - b->micro))
return i;
else if ((i = a->status - b->status))
return i;
else if ((i ... | false | false | false | false | false | 0 |
IDirectFBSurface_DrawString( IDirectFBSurface *thiz,
const char *text, int bytes,
int x, int y,
DFBSurfaceTextFlags flags )
{
DFBResult ret;
IDirectFBFont *font;
IDirectFBFont_data *font_data;
CoreF... | false | false | false | false | false | 0 |
wm8400_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
int source, unsigned int freq_in,
unsigned int freq_out)
{
struct snd_soc_codec *codec = codec_dai->codec;
struct wm8400_priv *wm8400 = snd_soc_codec_get_drvdata(codec);
struct fll_factors factors;
int ret;
u16 reg;
if (freq_in == wm... | false | false | false | false | false | 0 |
autohelperowl_defendpat342(int trans, int move, int color, int action)
{
int a, b, c, d, e, f, g;
UNUSED(color);
UNUSED(action);
a = AFFINE_TRANSFORM(721, trans, move);
b = AFFINE_TRANSFORM(722, trans, move);
c = AFFINE_TRANSFORM(720, trans, move);
d = AFFINE_TRANSFORM(759, trans, move);
e = AFFINE_TRA... | false | false | false | false | false | 0 |
krb5_free_sam_challenge_2_body_contents(krb5_context ctx,
krb5_sam_challenge_2_body *sc2)
{
if (!sc2)
return;
if (sc2->sam_type_name.data)
krb5_free_data_contents(ctx, &sc2->sam_type_name);
if (sc2->sam_track_id.data)
krb5_free_data_contents(ct... | false | false | false | false | false | 0 |
xfs_bmbt_to_iomap(
struct xfs_inode *ip,
struct iomap *iomap,
struct xfs_bmbt_irec *imap)
{
struct xfs_mount *mp = ip->i_mount;
if (imap->br_startblock == HOLESTARTBLOCK) {
iomap->blkno = IOMAP_NULL_BLOCK;
iomap->type = IOMAP_HOLE;
} else if (imap->br_startblock == DELAYSTARTBLOCK) {
iomap->blkno = IOMAP_... | false | false | false | false | false | 0 |
url_local_nntp(char *url)
{
char folder[2*MAILTMPLEN], *group;
int group_len;
long i, article_num;
/* no hostport, no url, end of story */
if((group = strchr(url + 7, '/')) != 0){
group++;
for(group_len = 0; group[group_len] && group[group_len] != '/';
group_len++)
if(!rfc1738_group(&... | true | true | false | false | true | 1 |
data_cal_dispose (GObject *object)
{
EDataCalPrivate *priv;
priv = E_DATA_CAL_GET_PRIVATE (object);
g_weak_ref_set (&priv->backend, NULL);
if (priv->connection != NULL) {
g_object_unref (priv->connection);
priv->connection = NULL;
}
g_hash_table_remove_all (priv->sender_table);
/* Chain up to parent's d... | false | false | false | false | false | 0 |
draw_magic_map(void)
{
int x=0, y=0;
/*
* This can happen if a person selects the magic map pane before actually
* getting any magic map data
*/
if (!cpl.magicmap) return;
/*
* Have to set this so that the gtk_widget_show below actually creates the
* widget. Switch to this pa... | false | false | false | false | false | 0 |
megasas_free_rdpq_fusion(struct megasas_instance *instance) {
int i;
struct fusion_context *fusion;
fusion = instance->ctrl_context;
for (i = 0; i < MAX_MSIX_QUEUES_FUSION; i++) {
if (fusion->reply_frames_desc[i])
pci_pool_free(fusion->reply_frames_desc_pool,
fusion->reply_frames_desc[i],
fusion->re... | false | false | false | false | false | 0 |
PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher)
{
int i;
PKCS7_ENC_CONTENT *ec;
i=OBJ_obj2nid(p7->type);
switch (i)
{
case NID_pkcs7_signedAndEnveloped:
ec=p7->d.signed_and_enveloped->enc_data;
break;
case NID_pkcs7_enveloped:
ec=p7->d.enveloped->enc_data;
break;
default:
PKCS7err(PKCS7_F_PKC... | false | false | false | false | false | 0 |
free_uid(struct user_struct *up)
{
unsigned long flags;
if (!up)
return;
local_irq_save(flags);
if (atomic_dec_and_lock(&up->__count, &uidhash_lock))
free_user(up, flags);
else
local_irq_restore(flags);
} | false | false | false | false | false | 0 |
ProcessCommandH(ICECAdapter * UNUSED(parser), const string &command, string & UNUSED(arguments))
{
if (command == "h" || command == "help")
{
ShowHelpConsole();
return true;
}
return false;
} | false | false | false | false | false | 0 |
cff_put_real(cff_writer_t *pcw, floatp f)
{
if (f == (int)f)
cff_put_int(pcw, (int)f);
else {
/* Use decimal representation. */
char str[50];
byte b = 0xff;
const char *p;
gs_sprintf(str, "%g", f);
sputc(pcw->strm, CD_REAL);
for (p = str; ; ++p) {... | false | false | false | false | false | 0 |
get_associated_ips(const struct lease *lease,
struct lease *(*next)(const struct lease *),
const struct lease *newest,
u_int32_t *associated_ips,
unsigned int associated_ips_size) {
const struct lease *p;
int cnt;
/* INSIST(next != NULL); */
/* INSIST(associated_ips != NULL); */
if (lease =... | false | true | false | false | false | 1 |
newcompobject(PyTypeObject *type)
{
compobject *self;
self = PyObject_New(compobject, type);
if (self == NULL)
return NULL;
self->eof = 0;
self->is_initialised = 0;
self->unused_data = PyBytes_FromStringAndSize("", 0);
if (self->unused_data == NULL) {
Py_DECREF(self);
... | false | false | false | false | false | 0 |
img_i2c_raw(struct img_i2c *i2c, u32 int_status,
u32 line_status)
{
if (int_status & INT_TIMING) {
if (i2c->raw_timeout == 0)
return img_i2c_raw_atomic_delay_handler(i2c,
int_status, line_status);
--i2c->raw_timeout;
}
return 0;
} | false | false | false | false | false | 0 |
list_connections(void)
{
char *buf;
char *__buf, *b;
int i = 0;
clear_new_conn_ind();
conn_list(NULL, &buf, conn_list_mac, conn_list_seq);
if (buf) {
__buf = buf;
while ((b = strtok(__buf, "\n"))) {
__buf = NULL;
printf("%s\n", b);
if (++i % lines_o == 0)
lines_o_press_key();
}
free(buf);
... | false | false | false | false | false | 0 |
gst_bz2dec_decompress_init (GstBz2dec * b)
{
g_return_if_fail (GST_IS_BZ2DEC (b));
gst_bz2dec_decompress_end (b);
b->offset = 0;
switch (BZ2_bzDecompressInit (&b->stream, 0, 0)) {
case BZ_OK:
b->ready = TRUE;
return;
default:
b->ready = FALSE;
GST_ELEMENT_ERROR (b, CORE, FAILED,... | false | false | false | false | false | 0 |
sys_unlisten_fd_event(int fd)
{
for (int i=0; i<fd_listeners; i++) {
if (fd_listener[i].fd == fd) {
memmove(fd_listener+i, fd_listener+i+1, (fd_listeners-i-1)*sizeof fd_listener[0]);
fd_listeners--;
updateFDSets();
return true;
}
}
return false;
} | false | false | false | false | false | 0 |
angleSet (graph_t* g, double* phi)
{
double ang;
char* p;
char* a = agget(g, "normalize");
if (!a || (*a == '\0'))
return 0;
ang = strtod (a, &p);
if (p == a) { /* no number */
if (mapbool(a))
ang = 0.0;
else
return 0;
}
while (ang > 180) ang -= 360;
while (ang <= -180... | false | false | false | false | false | 0 |
xkl_engine_try_call_state_func(XklEngine * engine,
XklEngineStateChange change_type,
XklState * old_state)
{
gint group = xkl_engine_priv(engine, curr_state).group;
gboolean restore = old_state->group == group;
xkl_debug(150,
"change_type: %d, group: %d, secondary_group_mask: %X, allowsecond... | false | false | false | false | false | 0 |
snic_ioreq_state_to_str(unsigned int state)
{
if (state >= ARRAY_SIZE(snic_req_state_str) ||
!snic_req_state_str[state])
return "Unknown";
return snic_req_state_str[state];
} | false | false | false | false | false | 0 |
vmballoon_lock_page(struct vmballoon *b, unsigned int num_pages,
bool is_2m_pages, unsigned int *target)
{
int locked, hv_status;
struct page *page = b->page;
struct vmballoon_page_size *page_size = &b->page_sizes[false];
/* is_2m_pages can never happen as 2m pages support implies batching */
locked = vmball... | false | false | false | false | false | 0 |
f_matcharg(argvars, rettv)
typval_T *argvars;
typval_T *rettv;
{
if (rettv_list_alloc(rettv) == OK)
{
#ifdef FEAT_SEARCH_EXTRA
int id = get_tv_number(&argvars[0]);
matchitem_T *m;
if (id >= 1 && id <= 3)
{
if ((m = (matchitem_T *)get_match(curwin, id)) != NULL)
{
list_append_string(... | false | false | false | false | false | 0 |
breakpoint_test(interp,cmd,bp)
Tcl_Interp *interp;
char *cmd; /* command about to be executed */
struct breakpoint *bp; /* breakpoint to test */
{
if (bp->re) {
int found = 0;
Tcl_Obj *cmdObj;
Tcl_RegExp re = Tcl_GetRegExpFromObj(NULL, bp->pat,
TCL_REG_ADVANCED);
cmdObj = Tcl_NewStringObj(cmd,-1);
Tc... | false | false | false | false | false | 0 |
refmpn_add_nc (mp_ptr rp, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size,
mp_limb_t carry)
{
AORS_NC (adc);
} | false | false | false | false | false | 0 |
e_xkb_layout_next(void)
{
Eina_List *l;
E_Config_XKB_Layout *cl;
l = eina_list_nth_list(e_config->xkb.used_layouts, e_config->xkb.cur_group);
l = eina_list_next(l);
if (!l) l = e_config->xkb.used_layouts;
e_config->xkb.cur_group = (e_config->xkb.cur_group + 1) % eina_list_count(e_config->xkb.used_la... | false | false | false | false | false | 0 |
bdf_lose_selection(bdf_glyph_grid_t *grid)
#else
bdf_lose_selection(grid)
bdf_glyph_grid_t *grid;
#endif
{
if (grid == 0)
return;
grid->sel.width = grid->sel.height = 0;
} | false | false | false | false | false | 0 |
ReadString(void) {
string inString;
getline(cin, inString);
if (!cin.good())
exit(5);
return inString;
} | false | false | false | false | false | 0 |
extract_ps_gz (const gchar *uri,
TrackerSparqlBuilder *preupdate,
TrackerSparqlBuilder *metadata)
{
FILE *fz;
gint fdz;
const gchar *argv[4];
gchar *filename;
GError *error = NULL;
filename = g_filename_from_uri (uri, NULL, NULL);
/* TODO: we should be using libz for this... | false | false | false | false | false | 0 |
bt_readchar(int fd, char* c, int timeout)
{
char buf[1];
*c = 0;
int rv = bt_read_tmo(fd, buf, 1, timeout);
/*if (rv != 0) {
sprintf(tmp, "bt_read_tmo returns: %d", rv);
logger(L_DBG, tmp);
}*/
if (rv == 1) {
*c = buf[0];
return 1;
}
if (rv == 0) {
r... | true | true | false | false | false | 1 |
CL_AddExplosions (void)
{
entity_t *ent;
explosion_t *ex, *next, *hnode;
float frac;
int f;
//memset (&ent, 0, sizeof(ent));
hnode = &cl_explosions_headnode;
for (ex = hnode->next; ex != hnode; ex = next)
{
next = ex->next;
ent = &ex->ent;
// translucent is prettier
ent->flags |= RF_TRANSLUCENT;
... | false | false | false | false | false | 0 |
unique_with_values_check(const char *s,
const struct edit_unique_with_values_ctx *unique_ctx)
{
const char *id;
struct value *values;
int n;
status_begin_reporting();
n = parse_var(s, &id, &values, unique_ctx->max_values);
if (n < 0)
return 0;
free_values(values, 0);
return unique_ctx->validate ?
un... | false | false | false | false | false | 0 |
weak_finish (void)
{
tree t;
for (t = weak_decls; t; t = TREE_CHAIN (t))
{
tree decl = TREE_VALUE (t);
#if defined (ASM_WEAKEN_DECL) || defined (ASM_WEAKEN_LABEL)
const char *const name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
#endif
if (! TREE_USED (decl))
continue;
#ifdef ASM_W... | false | false | false | false | false | 0 |
Wslen (s)
Wchar *s;
{
register Wchar *p = s;
while (*p)
p++;
return p - s;
} | false | false | false | false | false | 0 |
SetStateDisconnected() {
CBOINCBaseFrame* pFrame = wxGetApp().GetFrame();
if (pFrame && !m_bFrameShutdownDetected) {
wxASSERT(wxDynamicCast(pFrame, CBOINCBaseFrame));
m_bConnected = false;
m_bReconnecting = false;
m_pDocument->results.clear();
}
} | false | false | false | false | false | 0 |
NewSlot(
void *theEnv,
SYMBOL_HN *name)
{
SLOT_DESC *slot;
slot = get_struct(theEnv,slotDescriptor);
slot->dynamicDefault = 1;
slot->defaultSpecified = 0;
slot->noDefault = 0;
#if DEFRULE_CONSTRUCT
slot->reactive = 1;
#endif
slot->noInherit = 0;
slot->noWrite = 0;
slot->initializeOnly ... | false | false | false | false | false | 0 |
strcmp_n(const char *string, const char *buf, int n)
{
int i;
i = 0;
while(string[i] != '\0' && i < n) {
if(string[i] < buf[i])
return -1;
else if(string[i] > buf[i])
return 1;
i++;
}
if(string[i] == '\0' || i == n)
return 0;
else if(i == n... | false | false | false | false | false | 0 |
Get_Next_Device(void)
{
int result = -1;
/*
* Call the 'next device' function for the current
* type of device
*
* TODO: save the necessary information about that device
*/
if (current_type < HRDEV_TYPE_MAX && next_device[current_type] != NULL)
result = (*... | false | false | false | false | false | 0 |
fdset_add_fd(struct fdset *fds, int fd, void *handler, void *data)
{
struct fdset_node *fn;
if (fd < 0)
return -1;
if (handler == 0)
return -1;
for (fn = PTR fds->list->first; fn->node->next; fn = PTR fn->node->next)
if (fn->fd == fd)
return -1;
if (not(fn = malloc(sizeof(*fn))))
return ... | 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.