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 |
|---|---|---|---|---|---|---|
find_indexkey_var(PlannerInfo *root, RelOptInfo *rel, AttrNumber varattno)
{
ListCell *temp;
Index relid;
Oid reloid,
vartypeid,
varcollid;
int32 type_mod;
foreach(temp, rel->reltargetlist)
{
Var *var = (Var *) lfirst(temp);
if (IsA(var, Var) &&
var->varattno == varattno)
return var;... | false | false | false | false | false | 0 |
sms_get_deleted(gn_data *data)
{
int i, j, found = 0;
for (i = 0; i < data->folder_stats[data->sms_folder->folder_id]->used; i++) { /* for all previously found locations in folder */
found = 0;
for (j = 0; j < data->sms_folder->number; j++) { /* see if there is a corresponding message in phone */
if (data->... | false | false | false | false | false | 0 |
GetGlobalID ( const char *arrayName, vtkDataSet *data,
int localID, int searchType )
{
int newID = vtkExodusReader::ID_NOT_FOUND;
switch ( searchType )
{
case vtkExodusReader::SEARCH_TYPE_ELEMENT:
case vtkExodusReader::SEARCH_TYPE_NODE:
newID = vtkExodusReader... | false | false | false | false | false | 0 |
find_stream_in_feed(FFStream *feed, AVCodecContext *codec, int bit_rate)
{
int i;
int best_bitrate = 100000000;
int best = -1;
for (i = 0; i < feed->nb_streams; i++) {
AVCodecContext *feed_codec = feed->streams[i]->codec;
if (feed_codec->codec_id != codec->codec_id ||
feed_... | false | false | false | false | false | 0 |
CopyStuff( ExprCodes const &rhs )
{
if( listVectorPtr_ )
{
delete listVectorPtr_;
listVectorPtr_ = 0;
}
if( rangeVectorPtr_ )
{
delete rangeVectorPtr_;
rangeVectorPtr_ = 0;
}
if( rhs.tokenType_ == LISTVECTOR )
{
std::auto_ptr<ListVector> s( new ListVector(*rhs.listVectorPtr_) );
... | false | false | false | false | false | 0 |
buildProcessFinished(int code, QProcess::ExitStatus status)
{
if ((code == 0) && (status == QProcess::NormalExit))
status_ = Ready;
} | false | false | false | false | false | 0 |
set_conf_double(
lList **alpp,
lList **clpp,
int fields[],
const char *key,
lListElem *ep,
int name_nm,
int operation_nm
) {
const char *str;
double dval;
DENTER(CULL_LAYER, "set_conf_double");
if(!(str=get_conf_value(fields?NULL:alpp, *clpp, CF_name, CF_value, key))) {
DEXIT;
return fields?... | false | false | false | false | false | 0 |
check_item(object *op, const char *item) {
int count = 0;
if (item == NULL)
return 0;
FOR_BELOW_PREPARE(op, tmp) {
if (strcmp(tmp->arch->name, item) == 0) {
if (!QUERY_FLAG(tmp, FLAG_CURSED)
&& !QUERY_FLAG(tmp, FLAG_DAMNED)
/* Loophole bug? -FD- */ && !Q... | false | false | false | false | false | 0 |
av7110_fw_query(struct av7110 *av7110, u16 tag, u16* buf, s16 length)
{
int ret;
ret = av7110_fw_request(av7110, &tag, 0, buf, length);
if (ret)
printk(KERN_ERR "dvb-ttpci: av7110_fw_query error %d\n", ret);
return ret;
} | false | false | false | false | false | 0 |
create_setup_data_node(struct dentry *parent, int no,
struct setup_data_node *node)
{
struct dentry *d, *type, *data;
char buf[16];
sprintf(buf, "%d", no);
d = debugfs_create_dir(buf, parent);
if (!d)
return -ENOMEM;
type = debugfs_create_x32("type", S_IRUGO, d, &node->type);
if (!type)
goto err_d... | false | false | false | false | false | 0 |
git_merge_file__from_inputs(
git_merge_file_result *out,
const git_merge_file_input *ancestor,
const git_merge_file_input *ours,
const git_merge_file_input *theirs,
const git_merge_file_options *given_opts)
{
xmparam_t xmparam;
mmfile_t ancestor_mmfile = {0}, our_mmfile = {0}, their_mmfile = {0};
mmbuffer_t mmb... | false | true | false | false | false | 1 |
packet_dump(char *user, struct pcap_pkthdr *pkthdr, u_char *pkt)
{
time_t now;
if(rollover)
{
now = time(NULL);
if(rollover_interval == 0)
{
if(lastroll + rollover < now)
{
msg("Rollover timer has expired!");
log_rollover()... | false | false | false | false | false | 0 |
php_stream_ftp_mkdir(php_stream_wrapper *wrapper, char *url, int mode, int options, php_stream_context *context TSRMLS_DC)
{
php_stream *stream = NULL;
php_url *resource = NULL;
int result, recursive = options & PHP_STREAM_MKDIR_RECURSIVE;
char tmp_line[512];
stream = php_ftp_fopen_connect(wrapper, url, "r", 0, N... | false | false | false | false | false | 0 |
XXH32_intermediateDigest (void* state_in)
{
XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN;
if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT)
return XXH32_intermediateDigest_endian(state_in, XXH_littleEndian);
else
return XXH32_intermediateDigest_endi... | false | false | false | false | false | 0 |
buffer_write(struct buffer *buf, const char *msg, int len)
{
int max;
if (len == 0)
return -1;
if (len > buf->size) {
/* we can't write this chunk and will never be able to, because
* it is larger than the buffer. This must be reported as an
* error. Then we return -2 so that writers that don't care can
... | false | false | false | false | false | 0 |
global_exe(cmd)
char_u *cmd;
{
linenr_T old_lcount; /* b_ml.ml_line_count before the command */
linenr_T lnum; /* line number according to old situation */
/*
* Set current position only once for a global command.
* If global_busy is set, setpcmark() will not do anything.
* If there is ... | false | false | false | false | false | 0 |
hashTypeLookupWriteOrCreate(redisClient *c, robj *key) {
robj *o = lookupKeyWrite(c->db,key);
if (o == NULL) {
o = createHashObject();
dbAdd(c->db,key,o);
} else {
if (o->type != REDIS_HASH) {
addReply(c,shared.wrongtypeerr);
return NULL;
}
}
r... | false | false | false | false | false | 0 |
matchRequestUri(HttpConn *conn, HttpRoute *route)
{
HttpRx *rx;
mprAssert(conn);
mprAssert(route);
rx = conn->rx;
if (route->patternCompiled) {
rx->matchCount = pcre_exec(route->patternCompiled, NULL, rx->pathInfo, (int) slen(rx->pathInfo), 0, 0,
rx->matches, sizeof(r... | false | false | false | false | false | 0 |
xml_fill_in_time(char *time_string, const time_t timep, int microseconds, int long_or_short)
{
struct tm *tm = gmtime(&timep);
char *format;
int n;
if (!tm) {
*time_string = 0;
return;
}
if (long_or_short == XML_LONG_TIME) {
format = "%02d-%02d-%02dT%02d:%02d:%02d";
} else {
format = "%0... | false | true | false | false | true | 1 |
acpi_processor_resume(void)
{
u32 resumed_bm_rld = 0;
acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_RLD, &resumed_bm_rld);
if (resumed_bm_rld == saved_bm_rld)
return;
acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_RLD, saved_bm_rld);
} | false | false | false | false | false | 0 |
gst_mpegtsmux_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
MpegTsMux *mux = GST_MPEG_TSMUX (object);
GSList *walk;
switch (prop_id) {
case ARG_M2TS_MODE:
/*set incase if the output stream need to be of 192 bytes */
mux->m2ts_mode = g_value_get_boo... | false | false | false | false | false | 0 |
get_crc16 (void *vbuf, int len)
{
uae_u8 *buf = (uae_u8*)vbuf;
uae_u16 crc;
if (!crc_table32[1])
make_crc_table();
crc = 0xffff;
while (len-- > 0)
crc = (crc << 8) ^ crc_table16[((crc >> 8) ^ (*buf++)) & 0xff];
return crc;
} | false | false | false | false | false | 0 |
AnCheckId (
ACPI_PARSE_OBJECT *Op,
ACPI_NAME Type)
{
UINT32 i;
ACPI_SIZE Length;
/* Only care about string versions of _HID/_CID (integers are legal) */
if (Op->Asl.ParseOpcode != PARSEOP_STRING_LITERAL)
{
return;
}
/* Fo... | false | false | false | false | false | 0 |
lame_set_experimentalX(lame_global_flags * gfp, int experimentalX)
{
if (is_lame_global_flags_valid(gfp)) {
lame_set_quant_comp(gfp, experimentalX);
lame_set_quant_comp_short(gfp, experimentalX);
return 0;
}
return -1;
} | false | false | false | false | false | 0 |
AssaultNode(BG_AV_Nodes node, BattleGroundTeamIndex teamIdx)
{
MANGOS_ASSERT(m_Nodes[node].TotalOwner != BattleGroundAVTeamIndex(teamIdx));
MANGOS_ASSERT(m_Nodes[node].Owner != BattleGroundAVTeamIndex(teamIdx));
// only assault an assaulted node if no totalowner exists:
MANGOS_ASSERT(m_Nodes[node].State... | false | false | false | false | false | 0 |
DoubleNeg(struct Expression * exp, struct Operand * op1)
{
exp->type = 2;
exp->string = PrintDouble((double)(-op1->d));
if(!exp->expType)
{
exp->expType = op1->type;
if(op1->type)
op1->type->refCount++;
}
return 0x1;
} | false | false | false | false | false | 0 |
__alloc_shareable_cval(word32 aval, word32 bval, int32 bwid)
{
int32 wi;
if (bwid == 1)
{
if (bval == 0) goto do_nonxz;
if (aval == 0) return(FIXCON_1BITZ);
return(FIXCON_1BITX);
}
if (bval == ALL1W)
{
if (bwid != WBITS) goto do_alloc;
if (aval == 0) return(FIXCON_32BITZ);
if (aval == AL... | false | false | false | false | false | 0 |
SetShutdownFlags() {
HandleScope scope;
int flags = SSL_get_shutdown(ssl_);
if (flags & SSL_SENT_SHUTDOWN) {
handle_->Set(String::New("sentShutdown"), True());
}
if (flags & SSL_RECEIVED_SHUTDOWN) {
handle_->Set(String::New("receivedShutdown"), True());
}
} | false | false | false | false | false | 0 |
stmpe_gpio_set(struct gpio_chip *chip, unsigned offset, int val)
{
struct stmpe_gpio *stmpe_gpio = to_stmpe_gpio(chip);
struct stmpe *stmpe = stmpe_gpio->stmpe;
int which = val ? STMPE_IDX_GPSR_LSB : STMPE_IDX_GPCR_LSB;
u8 reg = stmpe->regs[which] - (offset / 8);
u8 mask = 1 << (offset % 8);
/*
* Some variants... | false | false | false | false | false | 0 |
is_and_or_or (enum tree_code tc, tree typ)
{
return (tc == BIT_IOR_EXPR
|| (tc == BIT_AND_EXPR
&& (typ == 0 || TREE_CODE (typ) == BOOLEAN_TYPE)));
} | false | false | false | false | false | 0 |
gc_referrers_for(PyObject *objs, PyGC_Head *list, PyObject *resultlist)
{
PyGC_Head *gc;
PyObject *obj;
traverseproc traverse;
for (gc = list->gc.gc_next; gc != list; gc = gc->gc.gc_next) {
obj = FROM_GC(gc);
traverse = Py_TYPE(obj)->tp_traverse;
if (obj == objs || obj == resultl... | false | false | false | false | false | 0 |
oslec_create(int len, int adaption_mode)
{
struct oslec_state *ec;
int i;
const int16_t *history;
ec = kzalloc(sizeof(*ec), GFP_KERNEL);
if (!ec)
return NULL;
ec->taps = len;
ec->log2taps = top_bit(len);
ec->curr_pos = ec->taps - 1;
ec->fir_taps16[0] =
kcalloc(ec->taps, sizeof(int16_t), GFP_KERNEL);
... | false | false | false | false | false | 0 |
Density(Real x) const // Negative exponential
{ return (x > 5*mean || x < 0.0) ? 0.0 : (1/mean)*exp(-(x/mean)); } | false | false | false | false | false | 0 |
globus_l_add_error_string(
char ** layout,
int * idx,
globus_object_t * error)
{
char * msg;
if(globus_object_get_type(error) == GLOBUS_ERROR_TYPE_MULTIPLE)
{
msg = globus_l_error_mu... | false | false | false | false | false | 0 |
validsigp(int signum)
{
if (signum > 0) {
struct sigdesc *desc = sigDesc;
for (; desc->name; desc++) {
if (desc->num == signum) return TRUE;
}
}
return FALSE;
} | false | false | false | false | false | 0 |
demarshal_rect (DBusMessageIter *iter, AtspiRect *rect)
{
dbus_int32_t x, y, width, height;
DBusMessageIter iter_struct;
dbus_message_iter_recurse (iter, &iter_struct);
if (dbus_message_iter_get_arg_type (&iter_struct) != DBUS_TYPE_INT32) return FALSE;
dbus_message_iter_get_basic (&iter_struct, &x);
dbus_m... | false | false | false | false | false | 0 |
bochs_hw_setmode(struct bochs_device *bochs,
struct drm_display_mode *mode)
{
bochs->xres = mode->hdisplay;
bochs->yres = mode->vdisplay;
bochs->bpp = 32;
bochs->stride = mode->hdisplay * (bochs->bpp / 8);
bochs->yres_virtual = bochs->fb_size / bochs->stride;
DRM_DEBUG_DRIVER("%dx%d @ %d bpp, vy %d\n",
... | false | false | false | false | false | 0 |
pn_hdy (init_data, detected, easter, year, hd_elems, fday, count)
Bool *init_data;
const Bool detected;
int easter;
const int year;
int *hd_elems;
const int fday;
const int count;
/*
Manages all specific holidays celebrated in Pitcairn.
*/
{
register int day;
register int i;
... | false | false | false | false | false | 0 |
lpfc_sli4_redisc_fcf_table(struct lpfc_hba *phba)
{
LPFC_MBOXQ_t *mbox;
struct lpfc_mbx_redisc_fcf_tbl *redisc_fcf;
int rc, length;
/* Cancel retry delay timers to all vports before FCF rediscover */
lpfc_cancel_all_vport_retry_delay_timer(phba);
mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
if (!mbox... | false | false | false | false | false | 0 |
_gfxwop_line_print(gfxw_widget_t *widget, int indentation)
{
_gfxw_print_widget(widget, indentation);
if (widget->type == GFXW_INVERSE_LINE)
sciprintf("INVERSE-LINE");
else
sciprintf("LINE");
return 0;
} | false | false | false | false | false | 0 |
ReadChildren (istream& in, void* addr1, void* addr2, void* addr3, void* addr4) {
OverlayComp* child = nil;
OverlaysComp* comps = (OverlaysComp*)addr1;
char buf1[BUFSIZ];
char buf2[BUFSIZ];
char* buf = buf1;
while (in.good()) {
if (read_name(in, buf, BUFSIZ)) break;
int status;
if (status = r... | false | false | false | false | true | 1 |
hw_card_init(struct hw *hw, struct card_conf *info)
{
int err;
unsigned int gctl;
u32 data;
struct dac_conf dac_info = {0};
struct adc_conf adc_info = {0};
struct daio_conf daio_info = {0};
struct trn_conf trn_info = {0};
/* Get PCI io port base address and do Hendrix switch if needed. */
err = hw_card_start(... | false | false | false | false | false | 0 |
R_CullSphere( const vec3_t centre, const float radius, const int clipflags )
{
int i;
cplane_t *p;
if (r_nocull->value)
return false;
for (i=0,p=frustum ; i<4; i++,p++)
{
if ( !(clipflags & (1<<i)) ) {
continue;
}
if ( DotProduct ( centre, p->normal ) - p->dist <= -radius )
return ... | false | false | false | false | false | 0 |
readvector(flg,strom)
int flg; /* flg == LPARENTOK or LBRACETOK */
truc *strom;
{
truc obj;
int endtok;
int n;
endtok = (flg == LBRACETOK ? RBRACETOK : RPARENTOK);
n = arglist(strom,endtok);
if(n == aERROR)
obj = parserrsym;
else if(n == 1 && flg == LPARENTOK)
obj = PARS... | false | false | false | false | false | 0 |
__ecereNameSpace__ecere__com__eProperty_Watchable(struct __ecereNameSpace__ecere__com__Property * _property)
{
if(!_property->isWatchable)
{
struct __ecereNameSpace__ecere__com__Class * _class = _property->_class;
if(!_class->computeSize)
{
_property->watcherOffset = _class->structSize;
_class->structSize += sizeof(st... | false | false | false | false | false | 0 |
zend_extension_startup(zend_extension *extension)
{
#if ZEND_EXTENSIONS_SUPPORT
if (extension->startup) {
if (extension->startup(extension)!=SUCCESS) {
return 1;
}
zend_append_version_info(extension);
}
#endif
return 0;
} | false | false | false | false | false | 0 |
get_modules(char **argv, struct module_data **mdp)
{
char **argp, **argx;
struct module_data *mp;
int rv;
int module_count = 1;
int arglen;
const char module_separator[] = "---";
for (argp = argv; *argp; argp++) {
if (!strcmp(*argp, module_separator))
module_count++;
}
*mdp =... | false | false | false | false | true | 1 |
extract_initials(ARTICLE *art, char *buffer, int maxlen, int cap)
{
char *c;
int pos = 0;
maxlen -= 4;
if (art && art->from && (c = art->tree_data.label)) {
if (res_show_number_lines())
c = skip_line_count(c);
while (*c != '\0') {
while (*c != '\0' && !IS_ALPHA(*c))
c++;
if (*c == ... | false | false | false | false | false | 0 |
number_cfg(numberstate *state, paragraph *source) {
/*
* Defaults
*/
state->chaptertext = L"Chapter";
state->sectiontext = L"Section";
state->apptext = L"Appendix";
for (; source; source = source->next) {
if (source->type == para_Config) {
if (!ustricmp(source->keyword, L"chapter"))... | false | false | false | false | false | 0 |
vec_clear(struct vec *p, cb_free * f)
{
struct vec_iterator i;
void *d;
vec_get_iterator(p, &i);
if (f != NULL)
{
while ((d = vec_iterator_next(&i)) != NULL)
{
f(d);
}
}
membuf_clear(&p->buf);
p->flags = VEC_FLAG_SORTED;
} | false | false | false | false | false | 0 |
pmbus_check_status_cml(struct i2c_client *client)
{
struct pmbus_data *data = i2c_get_clientdata(client);
int status, status2;
status = _pmbus_read_byte_data(client, -1, data->status_register);
if (status < 0 || (status & PB_STATUS_CML)) {
status2 = _pmbus_read_byte_data(client, -1, PMBUS_STATUS_CML);
if (stat... | false | false | false | false | false | 0 |
build_null_declspecs (void)
{
struct c_declspecs *ret = XOBNEW (&parser_obstack, struct c_declspecs);
ret->type = 0;
ret->expr = 0;
ret->decl_attr = 0;
ret->attrs = 0;
ret->typespec_word = cts_none;
ret->storage_class = csc_none;
ret->expr_const_operands = true;
ret->declspecs_seen_p = false;
ret->t... | false | false | false | false | false | 0 |
ReInit(QueryParserTokenManager* tm){
_CLLDELETE(token_source);
token_source = tm;
_deleteTokens();
_firstToken = token = _CLNEW QueryToken();
jj_ntk = -1;
jj_gen = 0;
for (int32_t i = 0; i < 23; i++) jj_la1[i] = -1;
delete jj_2_rtns;
jj_2_rtns = new JJCalls();
} | false | false | false | false | false | 0 |
route_message(struct hub_info* hub, struct hub_user* u, struct adc_message* msg)
{
struct hub_user* target = NULL;
switch (msg->cache[0])
{
case 'B': /* Broadcast to all logged in clients */
route_to_all(hub, msg);
break;
case 'D':
target = uman_get_user_by_sid(hub->users, msg->target);
if (target)... | false | false | false | false | false | 0 |
doinit() {
StandardModel::doinit();
// check if need to read decays
if(decayFile()==""||!readDecays_) return;
decayRead();
} | false | false | false | false | false | 0 |
e_util_icon_theme_icon_add(const char *icon_name, unsigned int size, Evas *evas)
{
if (!icon_name) return NULL;
if (icon_name[0] == '/') return _e_util_icon_add(icon_name, evas, size);
else
{
Evas_Object *obj;
const char *path;
path = efreet_icon_path_find(e_config->icon_theme, ic... | false | false | false | false | false | 0 |
kdeinitExec( const QString& name, const QStringList &args,
QString *error, int *pid, const QByteArray& startup_id )
{
if (!isMainThreadActive(error))
return EINVAL;
return self()->startServiceInternal("kdeinit_exec",
name, args, error, 0, pi... | false | false | false | false | false | 0 |
placeTerrain( GameMap* map, const MapCoordinate& pos, const TerrainType* terrain, int weather )
{
if ( map && terrain ) {
MapField* fld = map->getField(pos);
fld->typ = terrain->weather[0];
fld->setWeather( weather );
fld->setparams( );
for ( int d = 0; d < 6; ++d ) {
MapCoord... | false | false | false | false | false | 0 |
set_port1(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
{
struct usb_interface *intf = to_usb_interface(dev);
struct usb_cytherm *cytherm = usb_get_intfdata(intf);
unsigned char *buffer;
int retval;
int tmp;
buffer = kmalloc(8, GFP_KERNEL);
if (!buffer) {
dev_err(&cythe... | false | false | false | false | false | 0 |
triangle_center(real x[], real y[], real z[], real c[]){
/* find the "center" c, which is the intersection of the 3 vectors that are normal to each
of the edges respectively, and which passes through the center of the edges respectively
center[{x_, y_, z_}] := Module[
{xy = 0.5*(x + y), yz = 0.5*(y + z... | false | false | false | false | false | 0 |
stop_watching_credentials_cache (GoaKerberosIdentityManager *self)
{
if (self->priv->credentials_cache_monitor != NULL)
{
if (!g_file_monitor_is_cancelled (self->priv->credentials_cache_monitor))
g_file_monitor_cancel (self->priv->credentials_cache_monitor);
g_clear_object (&self->priv->crede... | false | false | false | false | false | 0 |
HCIstaccess(accrec_t * access_rec, int16 acc_mode)
{
CONSTR(FUNC, "HCIstaccess"); /* for HERROR */
compinfo_t *info=NULL; /* special element information */
filerec_t *file_rec; /* file record */
comp_info c_info; /* encoding information from the header */
model_info m_info;... | false | false | false | false | true | 1 |
PK11_DeleteSlotFromList(PK11SlotList *list,PK11SlotListElement *le)
{
PZ_Lock(list->lock);
if (le->prev) le->prev->next = le->next; else list->head = le->next;
if (le->next) le->next->prev = le->prev; else list->tail = le->prev;
le->next = le->prev = NULL;
PZ_Unlock(list->lock);
PK11_FreeSlotLis... | false | false | false | false | false | 0 |
add_stock_item(void)
{
GtkIconSet *icon_set;
GtkIconFactory *factory = gtk_icon_factory_new();
GtkIconTheme *theme = gtk_icon_theme_get_default();
GtkStockItem item = { GEANYSENDMAIL_STOCK_MAIL, N_("Mail"), 0, 0, GETTEXT_PACKAGE };
if (gtk_icon_theme_has_icon(theme, "mail-message-new"))
{
GtkIconSource *icon_s... | false | false | false | false | false | 0 |
adsi_tx_get_bit(void *user_data)
{
int bit;
adsi_tx_state_t *s;
s = (adsi_tx_state_t *) user_data;
/* This is similar to the async. handling code in fsk.c, but a few special
things are needed in the preamble, and postamble of an ADSI message. */
if (s->bit_no < s->preamble_len)
{
... | false | false | false | false | false | 0 |
SetMetadata( char **papszMetadata,
const char *pszDomain )
{
if( pszDomain == NULL )
pszDomain = "";
int iDomain = CSLFindString( papszDomainList, pszDomain );
if( iDomain == -1 )
{
int nDomainCount;
papszDomainList = CSLAddString... | false | false | false | false | false | 0 |
cx_config_str_enter(void)
{
CSTR *pstr;
pstr = config[panel_cfg.pd->curs].table;
if (pstr->extra_val != 0
&& strcmp(USTR(textline->line),pstr->extra_val) == 0) {
*pstr->new = '\0';
next_mode = MODE_SPECIAL_RETURN;
return;
}
if (textline->size > CFGVALUE_LEN)
win_remark("string is too long");
else {
... | false | true | false | false | false | 1 |
UpdateRotationFields(float rotation2 /*=0.0f*/, float rotation3 /*=0.0f*/)
{
SetFloatValue(GAMEOBJECT_FACING, GetOrientation());
if (rotation2 == 0.0f && rotation3 == 0.0f)
{
rotation2 = sin(GetOrientation() / 2);
rotation3 = cos(GetOrientation() / 2);
}
SetFloatValue(GAMEOBJECT_RO... | false | false | false | false | false | 0 |
GetAttributeValueAsDouble(
const char *variable,
const char *attribute)
{
if (variable == 0)
{
variable = MI_EMPTY_STRING;
}
vtkDataArray *array = this->GetAttributeValueAsArray(variable, attribute);
if (array == 0)
{
vtkErrorMacro("The attribute " << variable << ":"
<<... | false | false | false | false | false | 0 |
gt_md5_to_id_option_parser_new(void *tool_arguments)
{
MD5ToSeqidsArguments *arguments = tool_arguments;
GtOptionParser *op;
GtOption *option;
gt_assert(arguments);
op = gt_option_parser_new("[option ...] [GFF3_file ...]",
"Change MD5 fingerprints used as sequence IDs in "
... | false | false | false | false | false | 0 |
act_keyctl_pupdate(int argc, char *argv[])
{
char *args[4];
if (argc != 2)
format();
args[0] = argv[0];
args[1] = argv[1];
args[2] = grab_stdin();
args[3] = NULL;
return act_keyctl_update(3, args);
} | false | false | false | false | false | 0 |
sh_lookup (GnmStyleHash *h, GnmStyle *st)
{
guint32 hv = gnm_style_hash (st);
GSList *l = g_hash_table_lookup (h, GUINT_TO_POINTER (hv));
while (l) {
GnmStyle *st2 = l->data;
/* NOTE: This uses gnm_style_equal, not gnm_style_eq. */
if (gnm_style_equal (st, st2))
return st2;
l = l->next;
}
return NULL;
... | false | false | false | false | false | 0 |
copy_buffer(Py_buffer *dest, Py_buffer *src)
{
char *mem = NULL;
assert(dest->ndim > 0);
if (cmp_structure(dest, src) < 0) {
PyErr_SetString(PyExc_ValueError,
"ndarray assignment: lvalue and rvalue have different structures");
return -1;
}
if ((dest->suboffsets && dest... | false | false | false | false | false | 0 |
unity_internal_scope_dbus_name_manager_own_name (UnityInternalScopeDBusNameManager* self, const gchar* dbus_name) {
UnityInternalOwnedName* info = NULL;
GHashTable* _tmp0_ = NULL;
const gchar* _tmp1_ = NULL;
gconstpointer _tmp2_ = NULL;
UnityInternalOwnedName* _tmp3_ = NULL;
g_return_if_fail (self != NULL);
g_re... | false | false | false | false | false | 0 |
fusion_ref_zero_lock (FusionRef *ref)
{
DirectResult ret = DR_OK;
D_ASSERT( ref != NULL );
pthread_mutex_lock (&ref->single.lock);
do {
if (ref->single.destroyed)
ret = DR_DESTROYED;
else if (ref->single.locked)
ret = DR_LOCKED;
else if ... | false | false | false | false | false | 0 |
panel_run_dialog_set_default_icon (PanelRunDialog *dialog, gboolean set_drag)
{
gtk_image_set_from_icon_name (GTK_IMAGE (dialog->pixmap),
PANEL_ICON_RUN,
GTK_ICON_SIZE_DIALOG);
if (set_drag)
gtk_drag_source_set_icon_name (dialog->run_dialog,
PANEL_ICON_LAUNCHER);
} | false | false | false | false | false | 0 |
SN_ChangeNodeData(int nodeNum, int seqOffset, int delayTics, int volume,
int currentSoundID)
{
int i;
seqnode_t *node;
i = 0;
node = SequenceListHead;
while (node && i < nodeNum)
{
node = node->next;
i++;
}
if (!node)
{ ... | false | false | false | false | false | 0 |
readEnvironmentVariables(CgiInput *input)
{
fServerSoftware = input->getenv("SERVER_SOFTWARE");
fServerName = input->getenv("SERVER_NAME");
fGatewayInterface = input->getenv("GATEWAY_INTERFACE");
fServerProtocol = input->getenv("SERVER_PROTOCOL");
std::string port = input->getenv("SERVER_PORT");
fSer... | false | false | false | false | false | 0 |
dt_add (double *res, double start, double i, const DateStep *step)
{
if (start <= 0 && start > j_horizon)
return FALSE;
switch (step->unit) {
case DS_DAYS:
*res = start + i * step->n;
break;
case DS_MONTHS: {
GDate d;
int istart = (int)start;
int m;
double n = i * step->n;
if (n < 0 || n != floor ... | false | false | false | false | false | 0 |
convertStringToBXKey(const char* string)
{
// We look through the bx_key_symbol table to find the searched string
for (Bit16u i=0; i<BX_KEY_NBKEYS; i++) {
if (strcmp(string,bx_key_symbol[i])==0) {
return i;
}
}
// Key is not known
return BX_KEYMAP_UNKNOWN;
} | false | false | false | false | false | 0 |
repack_table(struct pstore_header *old_header, struct pstore_header *new_header, struct pstore_table *old_table, int output)
{
struct pstore_table *new_table;
unsigned long ndx;
int err;
new_table = pstore_table_new(old_table->name, old_table->table_id);
err = pstore_header_insert_table(new_header, new_table);
... | false | false | false | false | false | 0 |
on_entry_account_password_activate(GtkEntry *entry, gpointer user_data) {
const char *name;
name = gtk_entry_get_text(GTK_ENTRY(entry_account_name));
if (!name || *name == 0) {
gtk_widget_grab_focus(entry_account_name);
} else {
do_account_login(name, gtk_entry_get_text(GTK_ENTRY(entry... | false | false | false | false | false | 0 |
ges_title_clip_get_property (GObject * object, guint property_id,
GValue * value, GParamSpec * pspec)
{
GESTitleClipPrivate *priv = GES_TITLE_CLIP (object)->priv;
switch (property_id) {
case PROP_TEXT:
g_value_set_string (value, priv->text);
break;
case PROP_FONT_DESC:
g_value_set_str... | false | false | false | false | false | 0 |
cpl_column_exp_int(cpl_column *column, double base)
{
cpl_size nullcount = cpl_column_count_invalid(column);
cpl_size length = cpl_column_get_size(column);
int *ip = cpl_column_get_data_int(column);
int *np = cpl_column_get_data_invalid(column);
cpl_size i;
if (nullco... | false | false | false | true | false | 1 |
Function(const vector<string>& args)
{
if(!AssertArgument(args, 3)) return ("");
for(unsigned int i=2;i<args.size();i++) {
if(ctow(args[1]).find(ctow(args[i]))==string::npos) return("");
}
return("true");
} | false | false | false | false | false | 0 |
PromptUser()
{
EffectAutoDuckDialog dlog(this, mParent);
if (dlog.ShowModal() != wxID_OK)
return false; // user cancelled dialog
gPrefs->Write(wxT("/Effects/AutoDuck/DuckAmountDb"), mDuckAmountDb);
gPrefs->Write(wxT("/Effects/AutoDuck/OuterFadeDownLen"), mOuterFadeDownLen);
gPrefs->Write... | false | false | false | false | false | 0 |
__free_kmem_pages(struct page *page, unsigned int order)
{
memcg_kmem_uncharge(page, order);
__free_pages(page, order);
} | false | false | false | false | false | 0 |
cache_mode(struct cache *ca, int mode, int arg)
{
int res = -1;
switch (mode)
{
case CACHE_MODE_ERC:
res = ca->erc;
ca->erc = arg ? 1 : 0;
break;
}
return res;
} | false | false | false | false | false | 0 |
setScroll(int topline, int linecount, int nlines) {
GtkAdjustment prev;
memcpy(&prev,vsa,sizeof(GtkAdjustment));
// printf("this=%x setScroll topline=%d linecount=%d nlines=%d\n",
// (int)this,topline,linecount,nlines);
// all text fits in the widget
if (nlines >= linecount) {
vsa->value = 0.0;
... | false | false | false | false | false | 0 |
jspeFunctionArguments(JsVar *funcVar) {
JSP_MATCH('(');
while (execInfo.lex->tk!=')') {
if (funcVar) {
JsVar *param = jsvAddNamedChild(funcVar, 0, jslGetTokenValueAsString(execInfo.lex));
if (!param) { // out of memory
jspSetError(false);
return false;
}
jsv... | false | false | false | false | false | 0 |
retrieve ( dmtcp::string str )
{
iterator i = _table.find ( str );
JASSERT ( i != _table.end() ) ( str ) ( _table.size() ).Text ( "failed to find connection for fd" );
return ConnectionList::instance() [i->second];
} | false | false | false | false | false | 0 |
is_quad(const char *q)
/* Check if the string passed in points to what could be one quad of a
* dotted-quad IP address. Requirements are that the string is not a
* NULL pointer, begins with a period (which is skipped) or a digit
* and ends with a period or a NULL. If these requirements are met, a
* pointer to the... | false | false | false | false | false | 0 |
MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **OutMap)
{
std::vector<pkgIndexFile *> Files;
unsigned long EndOfSource = Files.size();
if (_system->AddStatusFiles(Files) == false)
return false;
SPtr<DynamicMMap> Map = CreateDynamicMMap(NULL);
unsigned long CurrentSize = 0;
unsigned long ... | false | false | false | false | false | 0 |
renderParticles(GemState *state)
{
if (m_particleGroup < 0)
return;
// The original default was 50.f milliseconds (20 fps)
pTimeStep((m_tickTime / 50.f) * m_speed);
pCurrentGroup(m_particleGroup);
} | false | false | false | false | false | 0 |
mptscsih_report_queue_full(struct scsi_cmnd *sc, SCSIIOReply_t *pScsiReply, SCSIIORequest_t *pScsiReq)
{
long time = jiffies;
MPT_SCSI_HOST *hd;
MPT_ADAPTER *ioc;
if (sc->device == NULL)
return;
if (sc->device->host == NULL)
return;
if ((hd = shost_priv(sc->device->host)) == NULL)
return;
ioc = hd->ioc;
... | false | false | false | false | false | 0 |
alloc_flow_index(struct mlx5_flow_table *ft, int group_ix, u32 *ix)
{
struct mlx5_ftg *g = &ft->group[group_ix];
int err = 0;
mutex_lock(&ft->mutex);
*ix = find_next_zero_bit(ft->bitmap, ft->size, g->start_ix);
if (*ix >= (g->start_ix + (1 << g->g.log_sz)))
err = -ENOSPC;
else
__set_bit(*ix, ft->bitmap);
... | false | false | false | false | false | 0 |
coff_ofs_to_rva_and_section(coff_section_headers *section_headers, uint32 ofs, RVA *rva, uint *section)
{
int r = coff_ofs_to_rva(section_headers, ofs, rva);
if (r) {
r = coff_ofs_to_section(section_headers, ofs, section);
}
return r;
} | false | false | false | false | false | 0 |
BracketedLineOptimize(double ax, double bx, double cx,
double fa, double functionValueOfb, double fc,
double *extX, double *extVal)
{
PowellOptimizer::ParametersType tempCoord(m_SpaceDimension);
this->BracketedLineOptimize(ax, bx, cx, fa, functionValueOfb, fc, extX, ... | false | false | false | false | false | 0 |
write( std::stringstream &f )
{
f << getValue();
} | false | false | false | false | false | 0 |
net_bind( int *fd, const char *bind_ip, int port )
{
int n, c[4];
struct sockaddr_in server_addr;
#if defined(_WIN32) || defined(_WIN32_WCE)
WSADATA wsaData;
if( wsa_init_done == 0 )
{
if( WSAStartup( MAKEWORD(2,0), &wsaData ) == SOCKET_ERROR )
return( POLARSSL_ERR_NET_SOCKET_F... | 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.