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 |
|---|---|---|---|---|---|---|
PrintModuleArrayRecord(void)
{
RfmArray array;
char *buf;
BUFFER_CLEAR(buf);
PrintGlobalArrayRecord();
for (array = RFM_ModuleCurrent->array_list;
array != NULL;
array = array->next) {
buf += sprintf(buf, " ");
if (array->is_const) {
buf += spri... | false | false | false | false | false | 0 |
GetDStemBounds( GlyphData *gd, StemData *stem, real *prev, real *next, int x_dir ) {
int i, maxact;
double roff, dstart, dend, hvstart, hvend, temp;
StemBundle *bundle;
StemData *hvstem;
roff = ( stem->right.x - stem->left.x ) * stem->unit.x +
( stem->right.y - stem->left.y ) * stem->unit... | false | false | false | false | false | 0 |
gsl_complex_tanh (complex_t const *a, complex_t *res)
{ /* z = tanh(a) */
gnm_float R = GSL_REAL (a), I = GSL_IMAG (a);
if (gnm_abs (R) < 1.0) {
gnm_float D =
gnm_pow (gnm_cos (I), 2.0) +
gnm_pow (gnm_sinh (R), 2.0);
complex_init (res, gnm_sinh (R) * cosh (R... | false | false | false | false | false | 0 |
DXNewPointLight(Point position, RGBColor color)
{
Light l = _NewLight(&_dxdlight_class);
if (!l)
return NULL;
l->kind = point;
l->relative = world;
l->position = position;
l->color = color;
return l;
} | false | false | false | false | false | 0 |
cs46xx_dsp_set_dac_volume (struct snd_cs46xx * chip, u16 left, u16 right)
{
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
struct dsp_scb_descriptor * scb;
mutex_lock(&chip->spos_mutex);
/* main output */
scb = ins->master_mix_scb->sub_list_ptr;
while (scb != ins->the_null_scb) {
cs46xx_dsp_scb_s... | false | false | false | false | false | 0 |
RegisterCleanup(NsServer *servPtr, Ns_TraceProc *proc, void *arg)
{
Trace *tracePtr;
if (servPtr == NULL) {
return NULL;
}
tracePtr = NewTrace(proc, arg);
tracePtr->nextPtr = servPtr->filter.firstCleanupPtr;
servPtr->filter.firstCleanupPtr = tracePtr;
return (void *) tracePtr;
} | false | false | false | false | false | 0 |
_PG_init(void)
{
/* Be sure we do initialization only once (should be redundant now) */
static bool inited = false;
if (inited)
return;
pg_bindtextdomain(TEXTDOMAIN);
DefineCustomEnumVariable("plpgsql.variable_conflict",
gettext_noop("Sets handling of conflicts between PL/pgSQL variable names and tabl... | false | false | false | false | false | 0 |
vect_vfa_segment_size (struct data_reference *dr, tree length_factor)
{
tree segment_length;
segment_length = size_binop (MULT_EXPR,
fold_convert (sizetype, DR_STEP (dr)),
fold_convert (sizetype, length_factor));
if (vect_supportable_dr_alignment (dr, false)
== dr_explicit_realign_opti... | false | false | false | false | false | 0 |
BN_bn2mpi(const BIGNUM *a, unsigned char *d)
{
int bits;
int num=0;
int ext=0;
long l;
bits=BN_num_bits(a);
num=(bits+7)/8;
if (bits > 0)
{
ext=((bits & 0x07) == 0);
}
if (d == NULL)
return(num+4+ext);
l=num+ext;
d[0]=(unsigned char)(l>>24)&0xff;
d[1]=(unsigned char)(l>>16)&0xff;
d[2]=(unsigned c... | false | false | false | false | false | 0 |
valueForShadow(const ShadowData *shadow)
{
if (!shadow)
return new CSSPrimitiveValueImpl(CSS_VAL_NONE);
CSSValueListImpl *list = new CSSValueListImpl(CSSValueListImpl::Comma);
for (const ShadowData *s = shadow; s; s = s->next) {
CSSPrimitiveValueImpl *x = new CSSPrimitiveValueImpl(s->x, CSSP... | false | false | false | false | false | 0 |
on_group_clicked (GtkButton *button,
gpointer user_data)
{
int result;
char **array;
result = msgbox_three(_("TiGroup"), _("Single/Group"), _("File type?"));
if(!result)
return;
array = create_fsels(inst_paths.home_dir, "", "*.73?;*.8... | false | false | false | false | false | 0 |
av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size){
int i, j;
uint32_t c;
if (bits < 8 || bits > 32 || poly >= (1LL<<bits))
return -1;
if (ctx_size != sizeof(AVCRC)*257 && ctx_size != sizeof(AVCRC)*1024)
return -1;
for (i = 0; i < 256; i++) {
if (le) {
... | false | false | false | false | false | 0 |
cis (const cl_R& x)
{
// Methode:
// (complex (cos x) (sin x))
var cos_sin_t trig = cos_sin(x);
return complex(trig.cos, trig.sin);
}
} | false | false | false | false | false | 0 |
ascendingSize(const FXIconItem* a,const FXIconItem* b){
register FXint diff=static_cast<const FXFileItem*>(b)->isDirectory() - static_cast<const FXFileItem*>(a)->isDirectory();
if(diff==0){
if(static_cast<const FXFileItem*>(a)->size > static_cast<const FXFileItem*>(b)->size) return 1;
if(static_cast<const F... | false | false | false | false | false | 0 |
hpmud_open_channel(HPMUD_DEVICE dd, const char *channel_name, HPMUD_CHANNEL *cd)
{
enum HPMUD_RESULT stat = HPMUD_R_INVALID_STATE;
DBG("[%d] hpmud_channel_open() dd=%d name=%s\n", getpid(), dd, channel_name);
if (dd <= 0 || dd > HPMUD_DEVICE_MAX || msp->device[dd].index != dd)
{
BUG("invalid channel... | false | false | false | false | false | 0 |
string(const char *pString_)
{
if (pString_!=0)
{
clearCursor();
text()=pString_;
if (firstMap()==MSTrue)
{
_firstLine=0;
_cursorPosition=0;
_cursorX=0;
_cursorY=0;
initLines(rows());
}
if (mapped()==MSTrue) refresh();
}
} | false | false | false | false | false | 0 |
parser_build_binary_op (location_t location, enum tree_code code,
struct c_expr arg1, struct c_expr arg2)
{
struct c_expr result;
enum tree_code code1 = arg1.original_code;
enum tree_code code2 = arg2.original_code;
tree type1 = (arg1.original_type
? arg1.original_type
: TREE... | false | false | false | false | false | 0 |
getSupportedPhonebooks() throw(GsmException)
{
Parser p(_at->chat("^SPBS=?", "^SPBS:"));
return p.parseStringList();
} | false | false | false | false | false | 0 |
copy_cursor_row (TableLayout *layout, CellBlock *to, CellBlock *from, int row)
{
int col;
for (col = 0; col < from->num_cols; col++)
{
BasicCell *cell;
cell = gnc_cellblock_get_cell (from, row, col);
if (!cell || !cell->cell_name)
continue;
gnc_table_layout_set... | false | false | false | false | false | 0 |
falcon_probe_board(struct efx_nic *efx, u16 revision_info)
{
struct falcon_board *board = falcon_board(efx);
u8 type_id = FALCON_BOARD_TYPE(revision_info);
int i;
board->major = FALCON_BOARD_MAJOR(revision_info);
board->minor = FALCON_BOARD_MINOR(revision_info);
for (i = 0; i < ARRAY_SIZE(board_types); i++)
i... | false | false | false | false | false | 0 |
compact_infopath (void)
{
int i, j, k, l;
int dl, pl;
char *dir, *p;
int chg = 0;
l = strlen (infopath_base);
for (i = 0; (dir = nextdir (infopath_base, l, &i, &dl)); )
{
for (j = k = i; (p = nextdir (infopath_base, l, &j, &pl)); k = j)
{
if (pl == dl && memcmp (dir, p, dl) == 0)
{
... | false | false | false | false | false | 0 |
imapx_parse_status_permanentflags (CamelIMAPXStream *is,
struct _status_info *sinfo,
GCancellable *cancellable,
GError **error)
{
guint32 flags;
/* We only care about \* for permanent flags, not user flags. */
i... | false | false | false | false | false | 0 |
profile( const std::string name_ ) const
{
size_t length=0;
const void *data=(const void *)
GetImageProfile(constImage(),name_.c_str(),&length);
if (data)
return Blob(data, length);
Blob blob;
Image temp_image = *this;
temp_image.write( &blob, name_ );
return blob;
} | false | false | false | false | false | 0 |
status_request(struct view *view, enum request request, struct line *line)
{
struct status *status = line->data;
switch (request) {
case REQ_STATUS_UPDATE:
if (!status_update(view))
return REQ_NONE;
break;
case REQ_STATUS_REVERT:
if (!status_revert(status, line->type, status_has_none(view, line)))
ret... | false | false | false | false | false | 0 |
ldapqry_free( LdapQuery *qry ) {
cm_return_if_fail( qry != NULL );
/* Clear out internal members */
ADDRQUERY_TYPE(qry) = ADDRQUERY_NONE;
ldapqry_clear( qry );
/* Free the mutex */
pthread_mutex_destroy( qry->mutexStop );
pthread_mutex_destroy( qry->mutexBusy );
pthread_mutex_destroy( qry->mutexEntry );
g_fr... | false | false | false | false | false | 0 |
SizeOf(const AsmPrinter *AP) const {
switch (Ty) {
case isNone:
llvm_unreachable("Expected valid DIEValue");
#define HANDLE_DIEVALUE(T) \
case is##T: \
return getDIE##T().SizeOf(AP, Form);
... | false | false | false | false | false | 0 |
mspace_track_large_chunks(mspace msp, int enable) {
int ret = 0;
mstate ms = (mstate)msp;
if (!PREACTION(ms)) {
if (!use_mmap(ms))
ret = 1;
if (!enable)
enable_mmap(ms);
else
disable_mmap(ms);
POSTACTION(ms);
}
return ret;
} | false | false | false | false | false | 0 |
ast_lookup_rgrp(uint64_t rgnum, struct gfs2_sbd *sbd)
{
uint64_t i = rgnum;
struct osi_node *n;
for (n = osi_first(&sbd->rgtree); n != NULL && i > 0; n = osi_next(n), i--);
if (n != NULL && i == 0)
return ((struct rgrp_tree *)n)->ri.ri_addr;
fprintf(stderr, "Resource group number out of range: %"PRIu64"\n", rgn... | false | false | false | false | false | 0 |
_nm_active_connection_type_for_path (DBusGConnection *connection,
const char *path)
{
DBusGProxy *proxy;
GError *error = NULL;
GValue value = {0,};
GType type;
proxy = dbus_g_proxy_new_for_name (connection,
NM_DBUS_SERVICE,
... | false | false | false | false | false | 0 |
get_symbol(LIBRARY *lib, const char *symbol, bool err)
{
void *sym;
sym = lt_dlsym(lib->handle, symbol);
if (sym == NULL && err)
{
strcpy(COMMON_buffer, lt_dlerror());
lt_dlclose(lib->handle);
lib->handle = NULL;
THROW(E_LIBRARY, lib->name, COMMON_buffer);
}
return sym;
} | false | false | false | false | false | 0 |
CheckDataElement( const Tag & t )
{
static const Tag pixeldata(0x7fe0,0x0010);
if( t != pixeldata ) return false;
CheckPixelDataElement = true;
return true;
} | false | false | false | false | false | 0 |
job_get_ja_tasks(const lListElem *job)
{
u_long32 ret = 0;
u_long32 n = 0;
DENTER(TOP_LAYER, "job_get_ja_tasks");
n = job_get_not_enrolled_ja_tasks(job);
ret += n;
DPRINTF(("Not enrolled ja_tasks: "sge_u32"\n", n));
n = job_get_enrolled_ja_tasks(job);
ret += n;
DPRINTF(("Enrolled ja_tasks... | false | false | false | false | false | 0 |
pvl_insert_after(pvl_list l,pvl_elem p,void *d)
{
struct pvl_list_t *L = (struct pvl_list_t *)l;
struct pvl_elem_t *P = (struct pvl_elem_t *)p;
struct pvl_elem_t *E = 0;
L->count++;
if (P == 0)
{
pvl_unshift(l,d);
return;
}
if ( P == L->tail)
{
E = pvl_new_element(d,0,P);
L->t... | false | false | false | false | false | 0 |
ERR_asm(CTX ctx, kStmtExpr *stmt)
{
int start = 0, espidx = DP(stmt)->espidx;
kTerm *tkERR = tkNN(stmt, 0);
CWB_t cwbbuf, *cwb = CWB_open(ctx, &cwbbuf);
DBG_ASSERT(DP(stmt)->size > 0);
DBG_ASSERT(TT_(tkERR) == TT_ERR);
if(GammaBuilder_inTry(ctx)) start = espidx;
DBG_ASSERT(IS_String((tkERR)->text));
knh_write_a... | false | false | false | false | false | 0 |
sasl_map_config_add(Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry* e, int *returncode, char *returntext, void *arg)
{
int ret = 0;
sasl_map_data *dp = NULL;
sasl_map_private *priv = sasl_map_get_global_priv();
LDAPDebug( LDAP_DEBUG_TRACE, "-> sasl_map_config_add\n", 0, 0, 0 );
ret = sasl_map_config_parse... | false | false | false | false | false | 0 |
resetManualFailover(void) {
if (server.cluster->mf_end && clientsArePaused()) {
server.clients_pause_end_time = 0;
clientsArePaused(); /* Just use the side effect of the function. */
}
server.cluster->mf_end = 0; /* No manual failover in progress. */
server.cluster->mf_can_start = 0;
... | false | false | false | false | false | 0 |
make_scalar_array_op(ParseState *pstate, List *opname,
bool useOr,
Node *ltree, Node *rtree,
int location)
{
Oid ltypeId,
rtypeId,
atypeId,
res_atypeId;
Operator tup;
Form_pg_operator opform;
Oid actual_arg_types[2];
Oid declared_arg_types[2];
List *args;
Oid rettype;
Sc... | false | false | false | false | false | 0 |
elm_naviframe_top_item_get(const Evas_Object *obj)
{
ELM_NAVIFRAME_CHECK(obj) NULL;
ELM_NAVIFRAME_DATA_GET(obj, sd);
if (!sd->stack) return NULL;
return (Elm_Object_Item *)(EINA_INLIST_CONTAINER_GET
(sd->stack->last, Elm_Naviframe_Item));
} | false | false | false | false | false | 0 |
atiixp_in_enable_transfer(struct atiixp_modem *chip, int on)
{
if (on) {
unsigned int data = atiixp_read(chip, CMD);
if (! (data & ATI_REG_CMD_MODEM_RECEIVE_EN)) {
data |= ATI_REG_CMD_MODEM_RECEIVE_EN;
atiixp_write(chip, CMD, data);
}
} else
atiixp_update(chip, CMD, ATI_REG_CMD_MODEM_RECEIVE_EN, 0);
} | false | false | false | false | false | 0 |
setupPopupMessage()
{
if (m_message == 0)
{
kDebug();
m_message = new KGamePopupItem();
connect(m_message,SIGNAL(linkActivated(QString)),this,SLOT(slotDisableHelp(QString)));
m_scene_world->addItem(m_message);
m_message->setSharpness(KGamePopupItem::Soft);
QColor color = QColor(102,102,255)... | false | false | false | false | false | 0 |
qtet_akm_set_regs(struct snd_akm4xxx *ak, unsigned char addr,
unsigned char mask, unsigned char value)
{
unsigned char tmp;
int chip;
for (chip = 0; chip < ak->num_chips; chip++) {
tmp = snd_akm4xxx_get(ak, chip, addr);
/* clear the bits */
tmp &= ~mask;
/* set the new bits */
tmp |= value;
snd_akm4xxx... | false | false | false | false | false | 0 |
ap_tcons0_array_add_dimensions_with(ap_tcons0_array_t* array,
ap_dimchange_t* dimchange)
{
size_t i;
for(i=0; i<array->size; i++){
ap_texpr0_t* expr = array->p[i].texpr0;
if (expr) ap_texpr0_add_dimensions_with(expr,dimchange);
}
} | false | false | false | false | false | 0 |
undo()
{
DEBUG_BLOCK
Playlist::ModelStack::instance()->bottom()->removeTracksCommand( m_cmdlist );
} | false | false | false | false | false | 0 |
findFirstMetadata(FREE_IMAGE_MDMODEL model, fipImage& image, fipTag& tag) {
FITAG *firstTag = NULL;
if(_mdhandle) FreeImage_FindCloseMetadata(_mdhandle);
_mdhandle = FreeImage_FindFirstMetadata(model, image, &firstTag);
if(_mdhandle) {
tag = FreeImage_CloneTag(firstTag);
return TRUE;
}
return FALSE;
... | false | false | false | false | false | 0 |
task_pointer_string(struct task_context *tc, ulong do_kstackp, char *buf)
{
struct bt_info bt_info, *bt;
char buf1[BUFSIZE];
if (do_kstackp) {
bt = &bt_info;
BZERO(bt, sizeof(struct bt_info));;
if (is_task_active(tc->task)) {
bt->stkptr = 0;
} else if (VALID_MEMBER(task_struct_thread_esp))... | false | false | false | false | false | 0 |
read_state_struct_type (type_p type)
{
struct state_token_st *t0;
type->kind = TYPE_STRUCT;
read_state_common_type_content (type);
t0 = peek_state_token (0);
if (state_token_kind (t0) == STOK_STRING)
{
if (state_token_is_name (t0, "nil"))
{
type->u.s.tag = NULL;
DBGPRINTF ("read anonymous st... | false | false | false | false | false | 0 |
OnFocusEvent( wxFocusEvent& event )
{
if ( event.GetEventType() == wxEVT_SET_FOCUS )
{
HandleFocusChange((wxWindow*)event.GetEventObject());
// Line changed to "else" when applying wxPropertyGrid patch #1675902
//else if ( event.GetWindow() )
}
else
{
HandleFocusChange(event.... | false | false | false | false | false | 0 |
create_action_list(ParasiteWindow *parasite)
{
GtkWidget *vbox;
GtkWidget *swin;
vbox = gtk_vbox_new(FALSE, 6);
gtk_widget_show(vbox);
gtk_container_set_border_width(GTK_CONTAINER(vbox), 12);
swin = gtk_scrolled_window_new(NULL, NULL);
gtk_widget_show(swin);
gtk_scrolled_window_set_pol... | false | false | false | false | false | 0 |
cc_screen_panel_init (CcScreenPanel *self)
{
GError *error;
GtkWidget *widget;
self->priv = SCREEN_PANEL_PRIVATE (self);
self->priv->builder = gtk_builder_new ();
error = NULL;
gtk_builder_add_from_file (self->priv->builder,
GNOMECC_UI_DIR "/screen.ui",
... | false | false | false | false | false | 0 |
perf_event_task_enable(void)
{
struct perf_event_context *ctx;
struct perf_event *event;
mutex_lock(¤t->perf_event_mutex);
list_for_each_entry(event, ¤t->perf_event_list, owner_entry) {
ctx = perf_event_ctx_lock(event);
perf_event_for_each_child(event, _perf_event_enable);
perf_event_ctx_unlock(e... | false | false | false | false | false | 0 |
GPS_Command_Send_Position(const char* port, double lat, double lon)
{
int32 ret=0;
switch (gps_position_transfer) {
case pA700:
ret = GPS_A700_Send(port, lat, lon);
break;
default:
GPS_Error("Send_Position: Unknown position protocol");
return PROTOCOL_ERROR;
}
return ret;
} | false | false | false | false | false | 0 |
inverse_quant_coeff (IMCContext* q, int stream_format_code) {
int i, j;
int middle_value, cw_len, max_size;
const float* quantizer;
for(i = 0; i < BANDS; i++) {
for(j = band_tab[i]; j < band_tab[i+1]; j++) {
q->CWdecoded[j] = 0;
cw_len = q->CWlengthT[j];
if ... | false | false | false | false | false | 0 |
gen_lowpart_for_combine (enum machine_mode omode, rtx x)
{
enum machine_mode imode = GET_MODE (x);
unsigned int osize = GET_MODE_SIZE (omode);
unsigned int isize = GET_MODE_SIZE (imode);
rtx result;
if (omode == imode)
return x;
/* Return identity if this is a CONST or symbolic reference. */
if (om... | false | false | false | false | false | 0 |
clampStackAlignment(bool ShouldClamp, unsigned Align,
unsigned StackAlign) {
if (!ShouldClamp || Align <= StackAlign)
return Align;
DEBUG(dbgs() << "Warning: requested alignment " << Align
<< " exceeds the stack alignment " << StackAlign
<... | false | false | false | false | false | 0 |
fcpcmd_recv_rsp ( struct fcp_command *fcpcmd,
struct io_buffer *iobuf,
struct xfer_metadata *meta __unused ) {
struct fcp_device *fcpdev = fcpcmd->fcpdev;
struct scsi_cmd *command = &fcpcmd->command;
struct fcp_rsp *rsp = iobuf->data;
struct scsi_sense *sense;
struct scsi_rsp response;
int rc;
/... | false | true | false | false | false | 1 |
GNUNET_SCHEDULER_add_select (enum GNUNET_SCHEDULER_Priority prio,
struct GNUNET_TIME_Relative delay,
const struct GNUNET_NETWORK_FDSet *rs,
const struct GNUNET_NETWORK_FDSet *ws,
GNUNET_SCHEDULER_Task tas... | false | false | false | false | false | 0 |
vm_brk(unsigned long addr, unsigned long len)
{
struct mm_struct *mm = current->mm;
unsigned long ret;
bool populate;
down_write(&mm->mmap_sem);
ret = do_brk(addr, len);
populate = ((mm->def_flags & VM_LOCKED) != 0);
up_write(&mm->mmap_sem);
if (populate)
mm_populate(addr, len);
return ret;
} | false | false | false | false | false | 0 |
delete_object(int y, int x)
{
s16b this_o_idx, next_o_idx = 0;
/* Paranoia */
if (!in_bounds(y, x)) return;
/* Scan all objects in the grid */
for (this_o_idx = cave->o_idx[y][x]; this_o_idx; this_o_idx = next_o_idx) {
object_type *o_ptr;
/* Get the object */
o_ptr = object_byid(this_o_idx);
/* Get the... | false | false | false | false | false | 0 |
arm_emit_movpair (rtx dest, rtx src)
{
/* If the src is an immediate, simplify it. */
if (CONST_INT_P (src))
{
HOST_WIDE_INT val = INTVAL (src);
emit_set_insn (dest, GEN_INT (val & 0x0000ffff));
if ((val >> 16) & 0x0000ffff)
emit_set_insn (gen_rtx_ZERO_EXTRACT (SImode, dest, GEN_INT ... | true | true | false | false | true | 1 |
getPosition(mrpt::math::TPose2D &pose)
{
size_t x_pos, y_pos, theta_pos, lenght;
string x_value, y_value, theta_value, response, errormsg;
general_command(1, response, errormsg); //Get report from Rovio to response
//Getting x value
x_pos=response.find("x=");
x_value=response.substr((x_pos+2),8);
lenght=x_valu... | false | false | false | false | false | 0 |
reintegrateTrapezoid(nb_world_t *world, float dt, int from, int to) {
calculateAccelerations(world, to);
for (int i = 0; i < world->nBodies; i++) {
integrateOneTrapezoid(world->bodies[i].pva[to].velocity, world->bodies[i].pva[from].velocity, world->bodies[i].pva[from].acceleration, world->bodies[i].pva[to].accele... | false | false | false | false | false | 0 |
phase0_processing()
{
int p0_rc = FSCK_OK;
int64_t agg_blks;
int32_t use_2ndary_superblock = 0;
agg_recptr->logredo_rc = FSCK_OK;
/*
* if this flag is set then the primary superblock is
* corrupt. The secondary superblock is good, but we
* weren't able to fix the primary version. logredo can
* run, but ... | false | false | false | false | false | 0 |
processImage(imageStruct &image)
{
unsigned int format=m_image.format;
unsigned char*data=image.data;
if(m_plugin==NULL)return;
// convert the current image into a format that suits the FreeFrame-plugin
if(image.format!=format){
switch (image.format){
case GL_RGBA:
m_image.fromRGBA(image.data)... | false | false | false | false | false | 0 |
fz_resize_hash(fz_context *ctx, fz_hash_table *table, int newsize)
{
fz_hash_entry *oldents = table->ents;
fz_hash_entry *newents;
int oldsize = table->size;
int oldload = table->load;
int i;
if (newsize < oldload * 8 / 10)
{
fz_warn(ctx, "assert: resize hash too small");
return;
}
if (table->lock == FZ_... | false | false | false | false | false | 0 |
ipmi_monitoring_sel_read_event_data (ipmi_monitoring_ctx_t c,
unsigned int *event_data1,
unsigned int *event_data2,
unsigned int *event_data3)
{
struct ipmi_monitoring_sel_record *sel_record = NULL;
if (_... | false | false | false | false | false | 0 |
get_op (char *s)
{
if (s[0] == '=') {
s[1] = '\0';
return B_ASN;
}
if (!strcmp(s, "++")) {
return INC;
}
if (!strcmp(s, "--")) {
return DEC;
}
if (s[1] == '=') {
int i;
for (i=0; m_assign[i].c; i++) {
if (s[0] == m_assign[i].c) {
return m_assign[i].op;
}
}
}
r... | false | false | false | false | false | 0 |
void_expr0(node)
NODE *node;
{
char *useless = 0;
if (!RTEST(ruby_verbose)) return;
again:
if (!node) return;
switch (nd_type(node)) {
case NODE_NEWLINE:
node = node->nd_next;
goto again;
case NODE_CALL:
switch (node->nd_mid) {
case '+':
case '-':
case '*':
case '/':
... | false | false | false | false | false | 0 |
nautilus_file_start (NautilusFile *file,
GMountOperation *start_op,
GCancellable *cancellable,
NautilusFileOperationCallback callback,
gpointer callback_data)
{
GError *error;
if ((file->details->can_start || file... | false | false | false | false | false | 0 |
ff_str_index_of_plus_1(const char * haystack, char needle)
{
const char * match = strchr(haystack, (int) needle);
if (match != NULL)
return match - haystack + 1;
return strlen(haystack);
} | false | false | false | false | false | 0 |
_ioctl_get(int fd, int which, struct ifreq *ifrq, const char* name)
{
int ourfd = -1, rc = 0;
DEBUGMSGTL(("verbose:access:interface:ioctl",
"ioctl %d for %s\n", which, name));
/*
* sanity checks
*/
if(NULL == name) {
snmp_log(LOG_ERR, "invalid ifentry\n");
ret... | false | false | false | false | false | 0 |
glob_parse(URLGlob *glob, char *pattern,
size_t pos, unsigned long *amount)
{
/* processes a literal string component of a URL
special characters '{' and '[' branch to set/range processing functions
*/
GlobCode res = GLOB_OK;
int globindex = 0; /* count "actual" globs */
*amo... | false | false | false | false | false | 0 |
Clone(FCDEntityInstance* _clone) const
{
FCDControllerInstance* clone = NULL;
if (_clone == NULL) _clone = clone = new FCDControllerInstance(const_cast<FCDocument*>(GetDocument()), NULL, GetEntityType());
else if (_clone->HasType(FCDControllerInstance::GetClassType())) clone = (FCDControllerInstance*) _clone;
... | false | false | false | false | false | 0 |
getUnclippedInnerRect_impl(void) const
{
return d_windowRenderer ? d_windowRenderer->getUnclippedInnerRect() :
getUnclippedOuterRect();
} | false | false | false | false | false | 0 |
file_event_from_revision(string_ty *revision,
const file_event_list::pointer &felp)
{
if (!felp)
return 0;
for (size_t j = 0; j < felp->size(); ++j)
{
file_event *fep = felp->get(j);
assert(fep);
if (!fep)
continue;
fstate_src_ty *src = fep->get_src();
assert(src);
if (!src)
continue;
... | false | false | false | false | false | 0 |
sslPeerSelectComplete(FwdServer * fs, void *data)
{
SslStateData *sslState = data;
request_t *request = sslState->request;
peer *g = NULL;
if (fs == NULL) {
ErrorState *err;
err = errorCon(ERR_CANNOT_FORWARD, HTTP_GATEWAY_TIMEOUT, sslState->request);
*sslState->status_ptr = HTTP_GATEWAY_TIMEOUT;
err... | false | false | false | false | false | 0 |
convert (FILE *inf, FILE *outf)
{
static char line[MAX_LINE_LEN+1];
while (get_line(line, sizeof(line), inf))
process_line(line, outf);
} | false | false | false | false | false | 0 |
operator+= (const FVector& rhs) {
if (rhs.m_coreFeatures.size() > m_coreFeatures.size())
resize(rhs.m_coreFeatures.size());
for (const_iterator i = rhs.cbegin(); i != rhs.cend(); ++i)
set(i->first, get(i->first) + i->second);
for (size_t i = 0; i < rhs.m_coreFeatures.size(); ++i)
m_coreF... | false | false | false | false | false | 0 |
OpClassCacheLookup(Oid amID, List *opclassname)
{
char *schemaname;
char *opcname;
/* deconstruct the name list */
DeconstructQualifiedName(opclassname, &schemaname, &opcname);
if (schemaname)
{
/* Look in specific schema only */
Oid namespaceId;
namespaceId = LookupExplicitNamespace(schemaname);... | false | false | false | false | false | 0 |
check_cache_empty(struct btrfs_block_group_cache *cache)
{
u64 offset;
u64 max_extent_size;
/*
* Now lets confirm that there's absolutely no free space left to
* allocate.
*/
if (cache->free_space_ctl->free_space != 0) {
test_msg("Cache free space is not 0\n");
return -EINVAL;
}
/* And any allocation ... | false | false | false | false | false | 0 |
parse_pos_init_cell (GnmParsePos *pp, GnmCell const *cell)
{
g_return_val_if_fail (cell != NULL, NULL);
g_return_val_if_fail (IS_SHEET (cell->base.sheet), NULL);
g_return_val_if_fail (cell->base.sheet->workbook != NULL, NULL);
return parse_pos_init (pp, NULL, cell->base.sheet,
cell->pos.col, cell->pos.ro... | false | false | false | false | false | 0 |
DeleteLines(int lineDoc, int lineCount) {
for (int l = 0; l < lineCount; l++) {
DeleteLine(lineDoc);
}
Check();
} | false | false | false | false | false | 0 |
rem_get_signature(struct remfs *fs, struct entry *ent,
struct remsig *sig)
{
int res;
struct remnode *nod;
struct remnode *parent;
rem_get_locked_node(fs, ent, &nod, &parent);
res = rem_check_node(fs, nod, parent);
if(res == 0) {
sig->modif = nod->attr.st.m... | false | false | false | false | false | 0 |
radeon_cp_dispatch_vertex(struct drm_device * dev,
struct drm_file *file_priv,
struct drm_buf * buf,
drm_radeon_tcl_prim_t * prim)
{
drm_radeon_private_t *dev_priv = dev->dev_private;
struct drm_radeon_master_private *master_priv = file_priv->master->driver_priv;
drm_radeon_sarea_t *sar... | false | false | false | false | false | 0 |
buildDockMenu(VisuUiPanel *visu_ui_panel, GList *listOfDocks)
{
GtkWidget *menu, *item;
VisuUiDockWindow *window;
gchar *lbl;
menu = gtk_menu_new();
/* All dock windows. */
while (listOfDocks)
{
window = (VisuUiDockWindow*)listOfDocks->data;
if (window->show)
{
lbl = g_strdup_printf(... | false | false | false | false | false | 0 |
FetchNumDevices(int in_phy) {
int r = 0;
if (in_phy == KIS_PHY_ANY)
return tracked_map.size();
for (unsigned int x = 0; x < tracked_vec.size(); x++) {
if (tracked_vec[x]->phy_type == in_phy)
r++;
}
return r;
} | false | false | false | false | false | 0 |
mcxIOstep
( mcxIO* xf
)
{ int c
#if 0
;if (xf->buffer)
fprintf(stderr, "buffer [%s]\n", xf->buffer->str)
;else
fprintf(stderr, "nobuffer\n")
#endif
; if (xf->ateof)
c = EOF
; else if (buffaro(xf))
{ c = xf->buffer->str[xf->buffer_consumed++]
; if (!buffaro(xf))
buffer_emp... | false | false | false | false | false | 0 |
incoming_event(struct module *m, struct mcmd_event *me)
{
extern void internal_broker(XEvent *);
if(!dispatch_event_to_broker(&me->event, me->mask, m->next))
internal_broker(&me->event);
} | false | false | false | false | false | 0 |
cson_data_source_StringSource( void * state, void * dest, unsigned int * n )
{
if( !state || !n || !dest ) return cson_rc.ArgError;
else if( !*n ) return 0 /* ignore this */;
else
{
unsigned int i;
cson_data_source_StringSource_t * ss = (cson_data_source_StringSource_t*) state;
u... | false | false | false | false | false | 0 |
overlay_entry_get_ov(
Operation *op,
struct berval *dn,
ObjectClass *oc,
AttributeDescription *ad,
int rw,
Entry **e,
slap_overinst *on )
{
slap_overinfo *oi = on->on_info;
BackendDB *be = op->o_bd, db;
BackendInfo *bi = op->o_bd->bd_info;
int rc = SLAP_CB_CONTINUE;
for ( ; on; on = on->on_next ) {
if ... | false | false | false | false | false | 0 |
startBackupFile(bpContext *ctx, struct save_pkt *sp)
{
struct plugin_ctx *p_ctx = (struct plugin_ctx *)ctx->pContext;
if (!p_ctx) {
return bRC_Error;
}
time_t now = time(NULL);
sp->fname = p_ctx->fname;
sp->type = FT_REG;
sp->statp.st_mode = 0700 | S_IFREG;
sp->statp.st_ctime = now;
sp-... | false | false | false | false | false | 0 |
dodelall(const char *nick)
{
FILE *fp, *new_fp;
int new_fd;
char *new_name, *p;
char *header, *value;
fp=fopen(ADDRESSBOOK, "r");
new_fd=maildir_createmsg(INBOX, "addressbook", &new_name);
if (new_fd < 0 || (new_fp=fdopen(new_fd, "w")) == 0)
{
if (new_fd >= 0) close(new_fd);
fclose(fp);
enomem();
return;
... | false | false | false | false | false | 0 |
bnxt_hwtstamp_get(struct net_device *dev, struct ifreq *ifr)
{
struct bnxt *bp = netdev_priv(dev);
struct hwtstamp_config stmpconf;
struct bnxt_ptp_cfg *ptp;
ptp = bp->ptp_cfg;
if (!ptp)
return -EOPNOTSUPP;
stmpconf.flags = 0;
stmpconf.tx_type = ptp->tx_tstamp_en ? HWTSTAMP_TX_ON : HWTSTAMP_TX_OFF;
stmpcon... | false | false | false | false | false | 0 |
setDest (IFNode *d) {
if (dest != NULL) {
dest->refCount-- ;
}
dest = d ;
if (d != NULL) {
d->refCount++ ;
}
} | false | false | false | false | false | 0 |
get_align_mask(void)
{
/* handle 32- and 64-bit case with a single conditional */
if (va_align.flags < 0 || !(va_align.flags & (2 - mmap_is_ia32())))
return 0;
if (!(current->flags & PF_RANDOMIZE))
return 0;
return va_align.mask;
} | false | false | false | false | false | 0 |
forcesuperbasic (void)
/*
To put it bluntly, this routine is a bandaid. For good or ill, primal I
knows that it should never see superbasic variables; they're not necessary
when feasibility isn't at issue. But, we have the following failure
scenario: We're in phase II, and a pivot attempt results in a singula... | false | false | false | false | false | 0 |
kf_delete_eol() {
if (readonly()) { fl_beep(); return 1; }
if (mark() != position()) return cut();
cut(position(), line_end(position()));
return 1;
} | false | false | false | false | false | 0 |
inode_write_block(struct logfs_block *block)
{
struct inode *inode;
int ret;
inode = block->inode;
if (inode->i_ino == LOGFS_INO_MASTER)
logfs_write_anchor(inode->i_sb);
else {
ret = __logfs_write_inode(inode, NULL, 0);
/* see indirect_write_block comment */
BUG_ON(ret);
}
} | false | false | false | false | false | 0 |
glade_gtk_dialog_read_child (GladeWidgetAdaptor *adaptor,
GladeWidget *widget,
GladeXmlNode *node)
{
GladeXmlNode *widgets_node;
GladeProject *project;
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->read_child (adaptor, widget, node);
project = widget->project;
if (glade_project_get_format (pr... | false | false | false | false | false | 0 |
DrawText(int textX, int textY, const char * buffer, int count)
{
/*
* Clear or fill the area where the new text goes.
*/
if (currentBackgroundPixel == background)
{
XClearArea(display, mainWid, textX, textY - charAscent,
charWidth * count, charHeight, False);
}
else
{
XFillRectangle(display, mainWid, c... | false | false | false | false | false | 0 |
gst_value_intersect_int_int_range (GValue * dest, const GValue * src1,
const GValue * src2)
{
if (INT_RANGE_MIN (src2) * INT_RANGE_STEP (src2) <= src1->data[0].v_int &&
INT_RANGE_MAX (src2) * INT_RANGE_STEP (src2) >= src1->data[0].v_int &&
src1->data[0].v_int % INT_RANGE_STEP (src2) == 0) {
if (de... | 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.