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 |
|---|---|---|---|---|---|---|
map_init_vi(EditLine *el)
{
int i;
el_action_t *key = el->el_map.key;
el_action_t *alt = el->el_map.alt;
const el_action_t *vii = el->el_map.vii;
const el_action_t *vic = el->el_map.vic;
el->el_map.type = MAP_VI;
el->el_map.current = el->el_map.key;
keymacro_reset(el);
for (i = 0; i < N_KEYS; i++) {
key[i... | false | false | false | false | false | 0 |
ferode_1_42(l_uint32 *datad,
l_int32 w,
l_int32 h,
l_int32 wpld,
l_uint32 *datas,
l_int32 wpls)
{
l_int32 i;
register l_int32 j, pwpls;
register l_uint32 *sptr, *dptr;
l_int32 wpls2, wpls3, wpls4;
l_int32 w... | false | false | false | false | false | 0 |
get_default(intptr_t val)
{
STREAM *stream;
switch(val)
{
case 0:
if (_default_in)
stream = CSTREAM_stream(((CSTREAM_NODE *)_default_in)->stream);
else
stream = CSTREAM_stream(CFILE_in);
break;
case 1:
if (_default_out)
stream = CSTREAM_stream(((CSTREAM_NODE *)_default_out)->stream);
... | false | false | false | false | false | 0 |
AddFriend(CFriend* toadd, bool notify)
{
m_FriendList.push_back(toadd);
SaveList();
if (notify) {
Notify_ChatUpdateFriend(toadd);
}
} | false | false | false | false | false | 0 |
event_enable_trigger_free(struct event_trigger_ops *ops,
struct event_trigger_data *data)
{
struct enable_trigger_data *enable_data = data->private_data;
if (WARN_ON_ONCE(data->ref <= 0))
return;
data->ref--;
if (!data->ref) {
/* Remove the SOFT_MODE flag */
trace_event_enable_disable(enable_data->file... | false | false | false | false | false | 0 |
create_missing_directories( const char* dir /*= "."*/ ) const
{
char cur_dir_name[255];
int status;
// Experimental setup
sprintf( cur_dir_name, "%s/"EXP_S_DIR, dir );
status = mkdir( cur_dir_name, 0755 );
if ( (status == -1) && (errno != EEXIST) )
{
err( EXIT_FAILURE, cur_dir_name, errno );
}
... | false | false | false | false | false | 0 |
hcwd_umounted(int vol)
{
mountent *entry;
int i;
if (vol < 0)
vol = curvol;
if (vol < 0 || vol >= nmounts)
return -1;
entry = &mounts[vol];
if (entry->path)
free(entry->path);
if (entry->cwd)
free(entry->cwd);
for (i = vol + 1; i < nmounts; ++i)
mounts[i - 1] = mounts[i];
--n... | false | false | false | false | false | 0 |
manager_iax2_show_peer_list(struct mansession *s, const struct message *m)
{
struct iax2_peer *peer = NULL;
int peer_count = 0;
char nm[20];
char status[20];
const char *id = astman_get_header(m,"ActionID");
char idtext[256] = "";
struct ast_str *encmethods = ast_str_alloca(256);
struct ao2_iterator i;
if (!a... | true | true | false | false | false | 1 |
tuplesort_begin_index_hash(Relation indexRel,
uint32 hash_mask,
int workMem, bool randomAccess)
{
Tuplesortstate *state = tuplesort_begin_common(workMem, randomAccess);
MemoryContext oldcontext;
oldcontext = MemoryContextSwitchTo(state->sortcontext);
#ifdef TRACE_SORT
if (trace_sort)
elog(LOG,... | false | false | false | false | false | 0 |
gfs_hydrostatic_pressure (GfsDomain * domain,
GfsVariable * p,
GfsVariable * rho,
gdouble g)
{
gpointer data[3];
g_return_if_fail (domain != NULL);
g_return_if_fail (p != NULL);
g_return_if_fail (rho != NULL);
g_return_if_fail (g >= 0.);
g /= GFS_OCEAN (domain)->layer->len;
... | false | false | false | false | false | 0 |
JVM_MonitorWait(JNIEnv* env, jobject handle, jlong ms) {
TRACE("JVM_MonitorWait(env=%p, handle=%p, ms=%ld)", env, handle, ms);
if(ms < 0) {
signalException(java_lang_IllegalArgumentException,
"argument out of range");
return;
}
objectWait(handle, ms, 0, TRUE);
} | false | false | false | false | false | 0 |
downloadGroups( uint id, ushort sequence, const ByteArray& key, int pos )
{
ByteArray text(10);
text += '\1';
text += '\2' ;
text += (int) 0;
text += htonl(pos);
return Packet::create(id, Command::DownloadGroups, sequence, key, text );
} | false | false | false | false | false | 0 |
control_proxy_on_daemon_appeared(void)
{
if (get_studio_state() == STUDIO_STATE_NA || get_studio_state() == STUDIO_STATE_SICK)
{
log_info("ladishd appeared");
g_source_remove(g_ladishd_poll_source_tag);
}
set_studio_state(STUDIO_STATE_UNLOADED);
studio_state_changed(NULL);
} | false | false | false | false | false | 0 |
z_pop_stack (void)
{
if (zargc == 2) { /* it's a user stack */
zword size;
zword addr = zargs[1];
LOW_WORD (addr, size)
size += zargs[0];
storew (addr, size);
} else sp += zargs[0]; /* it's the game stack */
} | false | false | false | false | false | 0 |
agent_recv(Agent *agent, int sockfd, agent_reaction_t *reaction, void *arg)
{
int ret, err;
if (!agent || sockfd < 0 || !reaction)
return set_errno(EINVAL);
if ((err = agent_wrlock(agent)))
return set_errno(err);
ret = agent_recv_unlocked(agent, sockfd, reaction, arg);
if ((err = agent_unlock(agent)))
re... | false | false | false | false | false | 0 |
sichtbaresUpdaten() {
for (int i = mAnimZeigVon; i < mAnimZeigBis; i++)
mEintraege[i]->setUpdateFlag();
mRaenderUpdaten = true;
mInfozeileUpdaten = true;
} | false | false | false | false | false | 0 |
ast_context_add_include(const char *context, const char *include, const char *registrar)
{
int ret = -1;
struct ast_context *c;
c = find_context_locked(context);
if (c) {
ret = ast_context_add_include2(c, include, registrar);
ast_unlock_contexts();
}
return ret;
} | false | false | false | false | false | 0 |
FindProteinAtoms(PDBFile *file)
{
// Start statistics
RNTime start_time;
start_time.Read();
// Get model from PDB file
if (file->NModels() == 0) return 0;
PDBModel *model = file->Model(0);
// Allocate array of atoms
RNArray<PDBAtom *> *protein_atoms = new RNArray<PDBAtom *>();
if (!protein_atoms) {
... | false | false | false | false | false | 0 |
timelib_get_nr(char **ptr, int max_length)
{
char *begin, *end, *str;
timelib_sll tmp_nr = TIMELIB_UNSET;
int len = 0;
while ((**ptr < '0') || (**ptr > '9')) {
if (**ptr == '\0') {
return TIMELIB_UNSET;
}
++*ptr;
}
begin = *ptr;
while ((**ptr >= '0') && (**ptr <= '9') && len < max_length) {
++*ptr;
... | false | true | false | false | true | 1 |
pch_spi_request_dma(struct pch_spi_data *data, int bpw)
{
dma_cap_mask_t mask;
struct dma_chan *chan;
struct pci_dev *dma_dev;
struct pch_dma_slave *param;
struct pch_spi_dma_ctrl *dma;
unsigned int width;
if (bpw == 8)
width = PCH_DMA_WIDTH_1_BYTE;
else
width = PCH_DMA_WIDTH_2_BYTES;
dma = &data->dma;
... | false | false | false | false | false | 0 |
ASSERT_typing(CTX ctx, kStmtExpr *stmt)
{
TYPING_Condition(ctx, stmt, 0);
if(Tn_isTRUE(stmt, 0)) {
return knh_Stmt_done(ctx, stmt);
}
if(Tn_isFALSE(stmt, 0)) {
WarningAlwaysFalseAssertion(ctx);
}
return Stmt_typed(ctx, stmt, TYPE_void);
} | false | false | false | false | false | 0 |
load_tile(Image *image,Image *tile_image,
XCFDocInfo *inDocInfo,XCFLayerInfo *inLayerInfo,size_t data_length)
{
ExceptionInfo
*exception;
ssize_t
y;
register ssize_t
x;
register PixelPacket
*q;
ssize_t
count;
unsigned char
*graydata;
XCFPixelPacket
*xcfdata,
*xcfoda... | false | false | false | false | false | 0 |
PrintFunctions(TProtoFunc* Main)
{
Byte* code=Main->code;
Byte* p=code;
while (1)
{
Opcode OP;
int n=INFO(Main,p,&OP);
if (OP.class==ENDCODE) break;
if (OP.class==PUSHCONSTANT || OP.class==CLOSURE)
{
int i=OP.arg;
TObject* o=Main->consts+i;
if (ttype(o)==LUA_T_PROTO) PrintFunction(tfvalue(o),Main... | false | false | false | false | false | 0 |
klotski_window_state_event_cb (Klotski* self, GdkEventWindowState* event) {
gboolean result = FALSE;
GdkEventWindowState _tmp0_;
GdkWindowState _tmp1_;
GdkEventWindowState _tmp4_;
GdkWindowState _tmp5_;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (event != NULL, FALSE);
_tmp0_ = *event;
_t... | false | false | false | false | false | 0 |
get_wrap(int argc, char **argv)
{
struct get_options opt;
int ret;
int optidx = 0;
struct getargs args[] = {
{ "long", 'l', arg_flag, NULL, "long format", NULL },
{ "short", 's', arg_flag, NULL, "short format", NULL },
{ "terse", 't', arg_flag, NULL, "terse format", NULL },
... | false | false | false | false | false | 0 |
InitHarmonicTracks(SpectralPeakArray& peaks, TData funFreq)
{
DataArray& freqBuffer=peaks.GetFreqBuffer();
DataArray& magBuffer=peaks.GetMagBuffer();
int i;
TData currentFreq=funFreq;
for(i=0;i<mnMaxSines;i++)
{
freqBuffer[i]=currentFreq;
magBuffer[i]=-99;
currentFreq+=funFreq;
}
}
} | false | false | false | false | false | 0 |
f_filbuf(fp)
File *fp;
{
if (fp->f_flags & (F_EOF|F_ERR))
return EOF;
fp->f_ptr = fp->f_base;
#ifndef MSDOS
do {
#endif /* MSDOS */
fp->f_cnt = read(fp->f_fd, (UnivPtr) fp->f_base, (size_t) fp->f_bufsize);
#ifndef MSDOS
} while (fp->f_cnt == -1 && errno == EINTR);
#endif /* MSDOS */
if (fp->f_cnt == -1) {
/... | false | false | false | false | false | 0 |
dialog_formula_guru_update_parent (GtkTreeIter *child, FormulaGuruState *state,
GtkTreePath *origin, gint sel_start, gint sel_length)
{
GtkTreeIter iter;
if (gtk_tree_model_iter_parent (GTK_TREE_MODEL (state->model), &iter,
child)) {
dialog_formula_guru_update_this_parent (&iter, state, origin, sel_sta... | false | false | false | false | false | 0 |
execute(SceneManager *sm, RenderSystem *rs)
{
Ogre::Camera* cam = mViewport->getCamera();
mAmbientLight->updateFromCamera(cam);
Technique* tech = mAmbientLight->getMaterial()->getBestTechnique();
injectTechnique(sm, tech, mAmbientLight, 0);
const LightList& lightList = sm->_getLightsAffectingFrust... | false | false | false | false | false | 0 |
ComputeViewPlaneNormal()
{
if (this->ViewShear[0] != 0.0 || this->ViewShear[1] != 0.0)
{
// set the VPN in camera coordinates
this->ViewPlaneNormal[0] = this->ViewShear[0];
this->ViewPlaneNormal[1] = this->ViewShear[1];
this->ViewPlaneNormal[2] = 1.0;
// transform the VPN to world coordinates ... | false | false | false | false | false | 0 |
_ml_Sock_sendbufto (ml_state_t *msp, ml_val_t arg)
{
int sock = REC_SELINT(arg, 0);
ml_val_t buf = REC_SEL(arg, 1);
int nbytes = REC_SELINT(arg, 3);
char *data = STR_MLtoC(buf) + REC_SELINT(arg, 2);
ml_val_t addr = REC_SEL(arg, 6);
int flgs, n;
/* initialize the flags. */
flgs = 0;
... | false | false | false | false | false | 0 |
ssd_block_getgeo(struct block_device *bdev, struct hd_geometry *geo)
{
struct ssd_device *dev;
if (!bdev) {
return -EINVAL;
}
dev = bdev->bd_disk->private_data;
if (!dev) {
return -EINVAL;
}
geo->heads = 4;
geo->sectors = 16;
geo->cylinders = (dev->hw_info.size & ~0x3f) >> 6;
return 0;
} | false | false | false | false | false | 0 |
rosenbrock_init (GnmNlsolve *nl)
{
const int n = nl->vars->len;
int i, j;
nl->xi = g_new (gnm_float *, n);
for (i = 0; i < n; i++) {
nl->xi[i] = g_new (gnm_float, n);
for (j = 0; j < n; j++)
nl->xi[i][j] = (i == j);
}
nl->smallsteps = 0;
nl->tentative = 0;
nl->tentative_xk = NULL;
} | false | false | false | false | false | 0 |
IPrcWrite(pfPrcHelper* prc) {
plBitmap::IPrcWrite(prc);
prc->startTag("Metrics");
prc->writeParam("Width", fWidth);
prc->writeParam("Height", fHeight);
prc->writeParam("Stride", fStride);
prc->writeParam("TotalSize", (unsigned int)fTotalSize);
prc->writeParam("MipLevels", (unsigned int)fLev... | false | false | false | false | false | 0 |
exegen(voccxdef *ctx, objnum obj, prpnum genprop,
prpnum verprop, prpnum actprop)
{
int hasgen; /* has xobjGen property */
objnum genobj; /* object with xobjGen property */
int hasver; /* ha... | false | false | false | false | false | 0 |
main (int argc, char** argv)
{
gchar *service, *path;
GeocluePosition *pos = NULL;
GeocluePositionFields fields;
int timestamp;
double lat, lon;
GeoclueAccuracy *accuracy = NULL;
GMainLoop *mainloop;
GError *error = NULL;
g_type_init();
if (argc < 2 || argc % 2 != 0) {
g_printerr ("Usage:\n position-ex... | false | false | false | false | false | 0 |
set_random_seed_file( const char *name )
{
if( seed_file_name )
BUG();
seed_file_name = xstrdup( name );
} | false | false | false | false | false | 0 |
getModRefBehavior(const Function *F) {
// If the function declares it doesn't access memory, we can't do better.
if (F->doesNotAccessMemory())
return FMRB_DoesNotAccessMemory;
FunctionModRefBehavior Min = FMRB_UnknownModRefBehavior;
// If the function declares it only reads memory, go with that.
if (F->... | false | false | false | false | false | 0 |
addSticker (FaceColor color, Axis axis, int location, int sign)
{
// The cubie will get a sticker only if it is on the required face.
if (originalCentre [axis] != (location - sign)) {
return;
}
// Create a sticker.
Sticker * s = new Sticker;
s->color = color;
s->blinking = false;
LO... | false | false | false | false | false | 0 |
lme2510_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff)
{
struct dvb_usb_device *d = adap_to_d(adap);
struct lme2510_state *st = adap_to_priv(adap);
static u8 clear_pid_reg[] = LME_ALL_PIDS;
static u8 rbuf[1];
int ret = 0;
deb_info(1, "PID Clearing Filter");
mutex_lock(&d->i2c_mutex);
if (!onoff) {
... | false | false | false | false | false | 0 |
filter_declare(cmd_parms *cmd, void *CFG, const char *fname,
const char *place)
{
mod_filter_cfg *cfg = (mod_filter_cfg *)CFG;
ap_filter_rec_t *filter;
filter = apr_pcalloc(cmd->pool, sizeof(ap_filter_rec_t));
apr_hash_set(cfg->live_filters, fname, APR_HASH_KEY_STRING,... | false | false | false | false | false | 0 |
ncp_get_volume_info_with_number(struct ncp_server* server,
int n, struct ncp_volume_info* target) {
int result;
int len;
ncp_init_request_s(server, 44);
ncp_add_byte(server, n);
if ((result = ncp_request(server, 22)) != 0) {
goto out;
}
target->total_blocks = ncp_reply_dword_lh(server, 0);
target->f... | false | true | false | false | false | 1 |
totem_object_local_command_line (GApplication *application,
gchar ***arguments,
int *exit_status)
{
GOptionContext *context;
GError *error = NULL;
char **argv;
int argc;
/* Dupe so that the remote arguments are listed, but
* not removed from the lis... | false | false | false | false | false | 0 |
evhttp_request_new(void (*cb)(struct evhttp_request *, void *), void *arg)
{
struct evhttp_request *req = NULL;
/* Allocate request structure */
if ((req = calloc(1, sizeof(struct evhttp_request))) == NULL) {
event_warn("%s: calloc", __func__);
goto error;
}
req->kind = EVHTTP_RESPONSE;
req->input_headers =... | false | false | false | false | false | 0 |
flatten_clauses(struct list *l)
{
struct clause *c;
struct list *nl = get_list();
for (c = l->first_cl; c; c = c->next_cl) {
struct clause *d = cl_copy(c);
d->id = c->id; /* This is questionable. */
check_for_bad_things(d);
flatten_clause(d);
if (renumber_vars(d) == 0)
MACE_abend("dp_tr... | false | false | false | false | false | 0 |
qib_sd7220_init(struct qib_devdata *dd)
{
const struct firmware *fw;
int ret = 1; /* default to failure */
int first_reset, was_reset;
/* SERDES MPU reset recorded in D0 */
was_reset = (qib_read_kreg64(dd, kr_ibserdesctrl) & 1);
if (!was_reset) {
/* entered with reset not asserted, we need to do it */
qib_ib... | false | false | false | false | false | 0 |
find_placeholder_info(PlannerInfo *root, PlaceHolderVar *phv)
{
PlaceHolderInfo *phinfo;
ListCell *lc;
/* if this ever isn't true, we'd need to be able to look in parent lists */
Assert(phv->phlevelsup == 0);
foreach(lc, root->placeholder_list)
{
phinfo = (PlaceHolderInfo *) lfirst(lc);
if (phinfo->phid =... | false | false | false | false | false | 0 |
spool_berkeleydb_checkpoint(lList **answer_list, bdb_info info)
{
bool ret = true;
DENTER(BDB_LAYER, "spool_berkeleydb_checkpoint");
/* only necessary for local spooling */
if (bdb_get_server(info) == NULL) {
DB_ENV *env;
env = bdb_get_env(info);
if (env == NULL) {
dstring dbname_... | false | false | false | false | false | 0 |
sfip_set_raw(sfip_t *dst, void *src, int family) {
ARG_CHECK3(dst, src, dst->ip32, SFIP_ARG_ERR);
dst->family = family;
if(family == AF_INET) {
dst->ip32[0] = *(uint32_t*)src;
memset(&dst->ip32[1], 0, 12);
dst->bits = 32;
} else if(family == AF_INET6) {
memcpy(dst->ip8... | false | true | false | false | false | 1 |
net_listen(const char *host, int port )
{
int listenfd, n;
const int on = 1;
struct addrinfo hints, *res, *ressave;
char serv[30];
snprintf(serv,sizeof(serv)-1,"%d",(unsigned int) port );
serv[sizeof(serv)-1]=0;
bzero(&hints, sizeof(struct addrinfo));
hints.ai_flags = AI_PASSIVE;
hints.ai_family = AF_UNSPEC... | true | true | false | false | false | 1 |
VisitAdd(UnaryOperation* expr) {
CHECK_ALIVE(VisitForValue(expr->expression()));
HValue* value = Pop();
HValue* context = environment()->LookupContext();
HInstruction* instr =
new(zone()) HMul(context, value, graph_->GetConstant1());
return ast_context()->ReturnInstruction(instr, expr->id());
} | false | false | false | false | false | 0 |
egg_list_box_real_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
{
EggListBox *list_box = EGG_LIST_BOX (widget);
EggListBoxPrivate *priv = list_box->priv;
GtkAllocation child_allocation;
GtkAllocation separator_allocation;
EggListBoxChildInfo *child_info;
GdkWindow *window;
GtkWidget *child;... | false | false | false | false | false | 0 |
get_app_version_anonymous(
APP& app, bool need_64b, bool reliable_only
) {
unsigned int i;
CLIENT_APP_VERSION* best = NULL;
bool found = false;
char message[256];
if (config.debug_version_select) {
log_messages.printf(MSG_NORMAL,
"[version] get_app_version_anonymous: app %s%... | false | false | false | false | false | 0 |
CmdSymbol(int code)
{
char c, *s, *t;
int n, base;
if (code == 0) {
char num[4];
int i;
c = getNonSpace();
base = identifyBase(c);
if (base == 0) {
diagnostics(1,"malformed \\char construction");
fprintRTF("%c",c);
... | false | false | false | false | false | 0 |
validatePage()
{
if (!serverWidget->connectionSucceeded())
return false;
// Test server identifiants
settings()->setValue(Core::Constants::S_LASTLOGIN, QString());
settings()->setValue(Core::Constants::S_LASTPASSWORD, QString());
// try to connect the MySQL server and test existence of a Fr... | false | false | false | false | false | 0 |
store_plugin_name(LEX *lc, RES_ITEM2 *item, int index, int pass, bool exclude)
{
int token;
INCEXE *incexe;
if (exclude) {
scan_err0(lc, _("Plugin directive not permitted in Exclude\n"));
/* NOT REACHED */
}
token = lex_get_token(lc, T_SKIP_EOL);
if (pass == 1) {
/* Pickup Filename ... | false | false | false | false | false | 0 |
Ntr_TestMinimization(
DdManager * dd,
BnetNetwork * net1,
BnetNetwork * net2,
NtrOptions * option)
{
DdNode *f;
DdNode *c = NULL;
char *cname = NULL;
BnetNode *node;
int i;
int result;
int nsize, csize;
if (option->second == FALSE) return(1);
(void) printf("Testing BDD mini... | false | false | false | false | false | 0 |
scif_unmap_window(struct scif_dev *remote_dev, struct scif_window *window)
{
int j;
if (scif_is_iommu_enabled() && !scifdev_self(remote_dev)) {
if (window->st) {
dma_unmap_sg(&remote_dev->sdev->dev,
window->st->sgl, window->st->nents,
DMA_BIDIRECTIONAL);
sg_free_table(window->st);
kfree(... | false | false | false | false | false | 0 |
opw()
{
if (iArgs.size() != 1 || !iArgs[0]->number())
return;
iLineWid = iArgs[0]->number()->value();
} | false | false | false | false | false | 0 |
stick_arrow(object *op, object *tmp) {
/* If the missile hit a player, we insert it in their inventory.
* However, if the missile is heavy, we don't do so (assume it falls
* to the ground after a hit). What a good value for this is up to
* debate - 5000 is 5 kg, so arrows, knives, and other light we... | false | false | false | false | false | 0 |
iSizePutc(ILubyte Char)
{
CurPos++;
if (CurPos > MaxPos)
MaxPos = CurPos;
return Char;
} | false | false | false | false | false | 0 |
psys_fprint(FILE *fout,psys sys){
int i,pct=0,mct=0;
Blk_curr(sys)=1;
do {
Eqn_curr(sys)=Blk_start(sys,Blk_curr(sys));
do {
if (pct++==0)
#ifdef LOG_PRINT
fprintf(fout,"< ")
#endif
;
else
#ifdef LOG_PRINT
fprintf(fout,",\n ")
#endif
;
Mon_curr(sys)=Eqn_start(sys,Eqn_curr(sys));
m... | false | false | false | false | false | 0 |
consume_line (hb_buffer_t *buffer,
const char *text,
unsigned int text_len,
const char *text_before,
const char *text_after)
{
hb_set_clear (glyphs);
shaper.shape_closure (text, text_len, font, buffer, glyphs);
if (hb_set_is_empty (glyphs))
return;
/* Print ... | false | false | false | false | false | 0 |
doDuties()
{
if (RC!=MRC)
send();
else
IsDone=true;
return;
} | false | false | false | false | false | 0 |
searchc(c, k, dir, type, count)
int k;
#endif
int c;
register int dir;
int type;
long count;
{
static int lastc = NUL; /* last character searched for */
#ifdef KANJI
static int lastk = NUL;
#endif
static int lastcdir; /* last direction of character search */
static int lastctype; /* last type... | false | false | false | false | false | 0 |
ecc_free(ecc_key *key)
{
LTC_ARGCHKVD(key != NULL);
mp_clear_multi(key->pubkey.x, key->pubkey.y, key->pubkey.z, key->k, NULL);
} | false | false | false | true | false | 1 |
domain_norm_reduce (GfsDomain * domain, GfsNorm * n)
{
if (domain->pid >= 0) {
double in[5];
double out[5] = { 0., 0., 0., - G_MAXDOUBLE, 0. };
MPI_Op op;
MPI_Op_create (norm_reduce, TRUE, &op);
in[0] = n->bias; in[1] = n->first; in[2] = n->second; in[3] = n->infty;
in[4] = n->w;
MPI_Allr... | false | false | false | false | false | 0 |
operator<<(raw_ostream &OS, const PDB_DataKind &Data) {
switch (Data) {
CASE_OUTPUT_ENUM_CLASS_STR(PDB_DataKind, Unknown, "unknown", OS)
CASE_OUTPUT_ENUM_CLASS_STR(PDB_DataKind, Local, "local", OS)
CASE_OUTPUT_ENUM_CLASS_STR(PDB_DataKind, StaticLocal, "static local", OS)
CASE_OUTPUT_ENUM_CLASS_STR(PDB... | false | false | false | false | false | 0 |
check_pinpad_request (app_t app, pininfo_t *pininfo, int admin_pin)
{
if (app->app_local->pinpad.specified == 0) /* No preference on card. */
{
if (pininfo->fixedlen == 0) /* Reader has varlen capability. */
return 0; /* Then, use pinpad. */
else
/*
* Reader... | false | false | false | false | false | 0 |
delete_syn(const std::string& name)
{
unsigned stackLen = synonymStack.size();
for (int i = stackLen - 1; i >= 0; i--) {
if (name == synonymStack[i].get_name()) {
if (((unsigned) superuser()) & FLAG_SYN) printf("DEBUG %s:%d DELETING syn %d named <%s>\n",__FILE__,__LINE__,i,name.c_str());
for (unsigned j = i; ... | false | false | false | false | false | 0 |
_mosquitto_calloc(size_t nmemb, size_t size)
{
void *mem = calloc(nmemb, size);
#ifdef REAL_WITH_MEMORY_TRACKING
memcount += malloc_usable_size(mem);
if(memcount > max_memcount){
max_memcount = memcount;
}
#endif
return mem;
} | false | false | false | false | false | 0 |
mbox_fetch_header(mailmessage * msg_info,
char ** result,
size_t * result_len)
{
struct generic_message_t * msg;
int r;
char * msg_content;
size_t msg_length;
msg = msg_info->msg_data;
if (msg->msg_message != NULL) {
return mailmessage_generic_fetch_header(msg_info, result, result_len);
}... | false | false | false | false | false | 0 |
valid_disp_area(int fitInBox)
{
//------- valid display area first ---------//
if( top_x_loc < 0 )
top_x_loc = 0;
if( top_y_loc < 0 )
top_y_loc = 0;
if( top_x_loc + disp_x_loc > max_x_loc )
top_x_loc = max_x_loc - disp_x_loc;
if( top_y_loc + disp_y_loc > max_y_loc )
top_y_loc = max_y_loc - disp_y_loc;
... | false | false | false | false | false | 0 |
qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QThread::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 10)
qt_static_metacall(this, _c, _id, _a);
_id -= 10;
}
#ifndef QT_NO_PROPERTIES
else i... | false | false | false | false | false | 0 |
archive_string_conversion_free(struct archive *a)
{
struct archive_string_conv *sc;
struct archive_string_conv *sc_next;
for (sc = a->sconv; sc != NULL; sc = sc_next) {
sc_next = sc->next;
free_sconv_object(sc);
}
a->sconv = NULL;
free(a->current_code);
a->current_code = NULL;
} | false | false | false | false | false | 0 |
SetDataForCommandInTable(ChatCommand* commandTable, const char* text, uint32 security, std::string const& help)
{
std::string fullcommand = text; // original `text` can't be used. It content destroyed in command code processing.
ChatCommand* command = NULL;
std::string cmdName;
... | false | false | false | false | false | 0 |
virtual_popen(const char *command, const char *type TSRMLS_DC) /* {{{ */
{
int command_length;
int dir_length, extra = 0;
char *command_line;
char *ptr, *dir;
FILE *retval;
command_length = strlen(command);
dir_length = CWDG(cwd).cwd_length;
dir = CWDG(cwd).cwd;
while (dir_length > 0) {
if (*dir == '\'') e... | false | false | false | false | false | 0 |
evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint)
{
if (im->content_hint == hint) return;
im->content_hint = hint;
if (!im->gc) return;
if (!im->gc->shared->info.sec_image_map) return;
if (!im->gc->shared->info.bgra) return;
// does not handle yuv yet.
if (im->cs.space != EVAS_COLO... | false | false | false | false | false | 0 |
vivid_sdr_s_tuner(struct file *file, void *fh, const struct v4l2_tuner *vt)
{
if (vt->index > 1)
return -EINVAL;
return 0;
} | false | false | false | false | false | 0 |
dump_regs(struct csis_state *state, const char *label)
{
struct {
u32 offset;
const char * const name;
} registers[] = {
{ 0x00, "CTRL" },
{ 0x04, "DPHYCTRL" },
{ 0x08, "CONFIG" },
{ 0x0c, "DPHYSTS" },
{ 0x10, "INTMSK" },
{ 0x2c, "RESOL" },
{ 0x38, "SDW_CONFIG" },
};
u32 i;
v4l2_info(&state->sd,... | false | false | false | false | false | 0 |
reg_addrange(regex_t *preg, int lower, int upper)
{
if (lower > upper) {
reg_addrange(preg, upper, lower);
}
regc(preg, upper - lower + 1);
regc(preg, lower);
} | false | false | false | false | false | 0 |
rebuildRec(const Expr& e) {
DebugAssert(d_inRebuild, "ExprManager::rebuildRec("+e.toString()+")");
// Check cache
ExprHashMap<Expr>::iterator j=d_rebuildCache.find(e),
jend=d_rebuildCache.end();
if(j!=jend) return (*j).second;
ExprValue* ev = e.d_expr->rebuild(this);
// Uniquify the pointer
ExprValue... | false | false | false | false | false | 0 |
remap_block (tree *block, copy_body_data *id)
{
tree old_block;
tree new_block;
/* Make the new block. */
old_block = *block;
new_block = make_node (BLOCK);
TREE_USED (new_block) = TREE_USED (old_block);
BLOCK_ABSTRACT_ORIGIN (new_block) = old_block;
BLOCK_SOURCE_LOCATION (new_block) = BLOCK_SOURCE_LO... | false | false | false | false | false | 0 |
brcmf_usb_ctl_complete(struct brcmf_usbdev_info *devinfo, int type, int status)
{
brcmf_dbg(USB, "Enter, status=%d\n", status);
if (unlikely(devinfo == NULL))
return;
if (type == BRCMF_USB_CBCTL_READ) {
if (status == 0)
devinfo->bus_pub.stats.rx_ctlpkts++;
else
devinfo->bus_pub.stats.rx_ctlerrs++;
} e... | false | false | false | false | false | 0 |
unmarshalArguments(cdrStream& _n)
{
(CosCompoundLifeCycle::Operation&)arg_0 <<= _n;
arg_1_ = new CosCompoundLifeCycle::RelationshipHandle;
(CosCompoundLifeCycle::RelationshipHandle&)arg_1_ <<= _n;
arg_1 = &arg_1_.in();
arg_2_ = _n.unmarshalString(0);
arg_2 = arg_2_.in();
} | false | false | false | false | false | 0 |
gab_split(gchar *str)
{
gchar** strsplit= g_malloc(sizeof(gchar*));
gint n=0;
gchar* t=str;
gchar p[BBSIZE];
while(*t!='\n' && *t !='\0')
{
if(*t!=' ')
{
n++;
strsplit= g_realloc(strsplit,(n+1)*sizeof(gchar*));
sscanf(t,"%s",p);
strsplit[n-1]= g_strdup(p);
while(*t!=' ')
{
t++;
if(*t... | false | false | false | false | false | 0 |
xmlRelaxNGCheckGroupAttrs(xmlRelaxNGParserCtxtPtr ctxt,
xmlRelaxNGDefinePtr def)
{
xmlRelaxNGDefinePtr **list;
xmlRelaxNGDefinePtr cur;
int nbchild = 0, i, j, ret;
if ((def == NULL) ||
((def->type != XML_RELAXNG_GROUP) &&
(def->type != XML_RELAXNG_ELEMENT)))
... | false | false | false | false | false | 0 |
ca_deg(gdouble *angle)
{
gint m;
m = *angle/360.0;
*angle -= (gdouble) m*360.0;
if (*angle < 0.0)
*angle += 360.0;
} | false | false | false | false | false | 0 |
sharedsv_elem_mg_DELETE(pTHX_ SV *sv, MAGIC *mg)
{
dTHXc;
MAGIC *shmg;
SV *saggregate = SHAREDSV_FROM_OBJ(mg->mg_obj);
/* Object may not exist during global destruction */
if (! saggregate) {
return (0);
}
ENTER_LOCK;
sharedsv_elem_mg_FETCH(aTHX_ sv, mg);
if ((shmg = mg_fin... | false | false | false | false | false | 0 |
CPLGetDirname( const char *pszFilename )
{
int iFileStart = CPLFindFilenameStart(pszFilename);
char *pszStaticResult = CPLGetStaticResult();
if( iFileStart >= CPL_PATH_BUF_SIZE )
return CPLStaticBufferTooSmall(pszStaticResult);
CPLAssert( ! (pszFilename >= pszStaticResult && psz... | false | false | false | false | false | 0 |
ompi_io_ompio_register_print_entry (int queue_type,
print_entry x){
int ret = OMPI_SUCCESS;
print_queue *q=NULL;
ret = ompi_io_ompio_set_print_queue(&q, queue_type);
if (ret != OMPI_ERROR){
if (q->count >= QUEUESIZE){
return OMPI_ERROR;
}
else{
q->last = (q->last + 1) % QUEUESIZ... | false | false | false | true | false | 1 |
BroadcastPacket(WorldPacket* packet)
{
for (MemberList::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
Player* player = sObjectMgr.GetPlayer(itr->guid);
if (player)
player->GetSession()->SendPacket(packet);
}
} | false | false | false | false | false | 0 |
add_wildcarded_test_address(const char *address)
{
int n, n_test_addrs;
if (!dns_wildcarded_test_address_list)
dns_wildcarded_test_address_list = smartlist_new();
if (smartlist_string_isin_case(dns_wildcarded_test_address_list, address))
return;
n_test_addrs = get_options()->ServerDNSTestAddresses ?
... | false | false | false | false | false | 0 |
invokeCallbacks(poptContext con, const struct poptOption * table,
int post) {
const struct poptOption * opt = table;
poptCallbackType cb;
while (opt->longName || opt->shortName || opt->arg) {
if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
invokeCallbacks(con, opt->arg, pos... | false | false | false | false | false | 0 |
set_chplan_hdl(struct adapter *padapter, unsigned char *pbuf)
{
struct SetChannelPlan_param *setChannelPlan_param;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
if (!pbuf)
return H2C_PARAMETERS_ERROR;
setChannelPlan_param = (struct SetChannelPlan_param *)pbuf;
pmlmeext->max_chan_nums = init_channel... | false | false | false | false | false | 0 |
hwloc_linux_get_thread_cpubind(hwloc_topology_t topology, pthread_t tid, hwloc_bitmap_t hwloc_set, int flags __hwloc_attribute_unused)
{
int err;
if (topology->pid) {
errno = ENOSYS;
return -1;
}
if (!pthread_self) {
/* ?! Application uses set_thread_cpubind, but doesn't link against libpthread ?!... | false | false | false | false | false | 0 |
nfs_direct_write_scan_commit_list(struct inode *inode,
struct list_head *list,
struct nfs_commit_info *cinfo)
{
spin_lock(cinfo->lock);
#ifdef CONFIG_NFS_V4_1
if (cinfo->ds != NULL && cinfo->ds->nwritten != 0)
NFS_SERVER(inode)->pnfs_curr_ld->recover_commit_reqs(list, cinfo);
#endif
nfs_scan_commit_lis... | false | false | false | false | false | 0 |
gatherforms(int page, pdf_obj *pageref, pdf_obj *pageobj, pdf_obj *dict)
{
int i, n;
n = pdf_dict_len(dict);
for (i = 0; i < n; i++)
{
pdf_obj *xobjdict;
pdf_obj *type;
pdf_obj *subtype;
pdf_obj *group;
pdf_obj *groupsubtype;
pdf_obj *reference;
int k;
xobjdict = pdf_dict_get_val(dict, i);
if (!... | false | false | false | false | false | 0 |
establish_fs_workspace()
{
int efsw_rc = FSCK_OK;
uint32_t mapsize_bytes;
uint32_t buffer_size;
int aggregate_inode, which_ait = 0;
uint32_t inoidx;
struct dinode *inoptr;
int I_am_logredo = 0;
struct IAG_tbl_t *IAGtbl;
struct inode_ext_tbl_t *inoexttbl;
struct inode_tbl_t *inotbl;
/*
* allocate a buffer ... | false | false | false | false | false | 0 |
setContact(UserListItem *u)
{
int oldStatus = d->status;
QString oldName = text(0);
bool wasAgent = d->isAgent;
//QString newName = JIDUtil::nickOrJid(u->name(),u->jid().full());
d->u = u;
cacheValues();
bool needUpdate = false;
if(d->status != oldStatus || d->isAgent != wasAgent || !u->presenceError().isEmp... | 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.