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 |
|---|---|---|---|---|---|---|
MSAFree(MSA *msa)
{
Free2DArray((void **) msa->aseq, msa->nseq);
Free2DArray((void **) msa->sqname, msa->nseq);
Free2DArray((void **) msa->sqacc, msa->nseq);
Free2DArray((void **) msa->sqdesc, msa->nseq);
Free2DArray((void **) msa->ss, msa->nseq);
Free2DArray((void **) msa->sa, msa->nseq);
if ... | false | false | false | false | false | 0 |
rebuild_isupport_message_line(void)
{
char isupportbuffer[IRCD_BUFSIZE];
char *p = isupportbuffer;
dlink_node *ptr = NULL;
int n = 0;
int tokens = 0;
size_t len = 0;
size_t reserve = strlen(me.name) + HOSTLEN + strlen(form_str(RPL_ISUPPORT));
destroy_MessageLine(isupportFile);
DLINK_FOREACH(ptr, sup... | true | true | false | false | false | 1 |
cp_debug_parser_tokens (FILE *file, cp_parser *parser, int window_size)
{
cp_token *next_token, *first_token, *start_token;
if (file == NULL)
file = stderr;
next_token = parser->lexer->next_token;
first_token = parser->lexer->buffer->address ();
start_token = (next_token > first_token + window_size / 2)... | false | false | false | false | false | 0 |
H5HP_create(H5HP_type_t heap_type)
{
H5HP_t *new_heap=NULL; /* Pointer to new heap object created */
H5HP_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Check args */
HDassert(heap_type==H5HP_MIN_HEAP || heap_type==H5HP_MAX_HEAP);
/* Allocate ref-counted string struc... | false | false | false | false | false | 0 |
pro_psort(const struct ltab *lt)
{
unsigned current = (unsigned) Displayopts.opt_sortptrs;
int ch = pro_bool(lt, ¤t);
if (current != (unsigned) Displayopts.opt_sortptrs) {
Displayopts.opt_sortptrs = (enum sortp_t) current;
hadrfresh++; /* Force reread jobs/printers */
Ptr_seg.Last_ser = 0;
}
retur... | false | false | false | false | false | 0 |
getConstant(Value *V, BasicBlock *BB) {
LVILatticeVal Result = getCache(PImpl).getValueInBlock(V, BB);
if (Result.isConstant())
return Result.getConstant();
if (Result.isConstantRange()) {
ConstantRange CR = Result.getConstantRange();
if (const APInt *SingleVal = CR.getSingleElement())
return... | false | false | false | false | false | 0 |
FnCallReturnsZero(struct FnCall *fp,struct Rlist *finalargs)
{
struct Rval rval;
char buffer[CF_BUFSIZE],comm[CF_BUFSIZE];
int useshell = false;
struct stat statbuf;
buffer[0] = '\0';
/* begin fn specific content */
if (!IsAbsoluteFileName(finalargs->item))
{
CfOut(cf_error,"","execresult \"%s\" doe... | false | false | false | false | false | 0 |
update_edge( n2n_sn_t * sss,
const n2n_mac_t edgeMac,
const n2n_community_t community,
const n2n_sock_t * sender_sock,
time_t now)
{
macstr_t mac_buf;
n2n_sock_str_t sockbuf;
struct peer_info * ... | false | true | false | false | false | 1 |
intel_region_alloc(struct intel_screen *screen,
uint32_t tiling,
GLuint cpp, GLuint width, GLuint height,
bool expect_accelerated_upload)
{
drm_intel_bo *buffer;
unsigned long flags = 0;
unsigned long aligned_pitch;
struct intel_region *region;
if (expect_accelerated_upload)... | false | false | false | false | false | 0 |
initWaves(vector<HelicityParticle>& p) {
u.clear();
pMap.resize(4);
p2CV = 1;
if (pID[3] == 15 || pID[3] == -16) p2CA = 1;
else p2CA = -1;
setFermionLine(2, p[2], p[3]);
} | false | false | false | false | false | 0 |
FreeImage_Save(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const char *filename, int flags) {
FreeImageIO io;
SetDefaultIO(&io);
FILE *handle = fopen(filename, "w+b");
if (handle) {
BOOL success = FreeImage_SaveToHandle(fif, dib, &io, (fi_handle)handle, flags);
fclose(handle);
return success;
} else {
Free... | false | false | false | false | false | 0 |
altera_mbox_is_sender(struct altera_mbox *mbox)
{
u32 reg;
/* Write a magic number to PTR register and read back this register.
* This register is read-write if it is a sender.
*/
#define MBOX_MAGIC 0xA5A5AA55
writel_relaxed(MBOX_MAGIC, mbox->mbox_base + MAILBOX_PTR_REG);
reg = readl_relaxed(mbox->mbox_base + ... | false | false | false | false | false | 0 |
Buf_Create(CBuf *p, size_t size, ISzAlloc *alloc)
{
p->size = 0;
if (size == 0)
{
p->data = 0;
return 1;
}
p->data = (Byte *)alloc->Alloc(alloc, size);
if (p->data != 0)
{
p->size = size;
return 1;
}
return 0;
} | false | false | false | false | false | 0 |
hpsa_send_abort_ioaccel2(struct ctlr_info *h,
struct CommandList *abort, int reply_queue)
{
int rc = IO_OK;
struct CommandList *c;
__le32 taglower, tagupper;
struct hpsa_scsi_dev_t *dev;
struct io_accel2_cmd *c2;
dev = abort->scsi_cmd->device->hostdata;
if (!dev->offload_enabled && !dev->hba_ioaccel_enabled)
... | false | false | false | false | false | 0 |
accumbstr(numptr)
numdata *numptr;
{
byte *ptr;
int ch;
unsigned u, v;
unsigned len = 0;
ptr = (byte *)AriBuf;
while((ch = *numstring++)) {
u = digval(ch);
v = digval(*numstring++);
*ptr++ = (u << 4) + v;
len++;
}
numptr->digits = AriBuf;
numptr->len ... | false | false | false | false | false | 0 |
resetPQExpBuffer(PQExpBuffer str)
{
if (str)
{
str->len = 0;
if (str->data)
str->data[0] = '\0';
}
} | false | false | false | false | false | 0 |
do_camera_list_add(EntangleCameraList *cameras G_GNUC_UNUSED,
EntangleCamera *cam,
EntangleCameraPicker *picker)
{
g_return_if_fail(ENTANGLE_IS_CAMERA_PICKER(picker));
g_return_if_fail(ENTANGLE_IS_CAMERA(cam));
EntangleCameraPickerPrivate *priv ... | false | false | false | false | false | 0 |
minerstats(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __maybe_unused char *param, bool isjson, __maybe_unused char group)
{
struct cgpu_info *cgpu;
bool io_open = false;
struct api_data *extra;
char id[20];
int i, j;
message(io_data, MSG_MINESTATS, 0, NULL, isjson);
if (isjson)
io_open = io_add(io... | false | false | false | false | false | 0 |
_backup_audio_convert_orc_unpack_u32_double_swap (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
orc_union64 * ORC_RESTRICT ptr0;
const orc_union32 * ORC_RESTRICT ptr4;
orc_union32 var33;
#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
volatile orc_union32 var34... | false | false | false | false | false | 0 |
encode_layoutget(struct xdr_stream *xdr,
const struct nfs4_layoutget_args *args,
struct compound_hdr *hdr)
{
__be32 *p;
encode_op_hdr(xdr, OP_LAYOUTGET, decode_layoutget_maxsz, hdr);
p = reserve_space(xdr, 36);
*p++ = cpu_to_be32(0); /* Signal layout available */
*p++ = cpu_to_be32(args->type)... | false | false | false | false | false | 0 |
cgiFormEntryString(
cgiFormEntry *e, char *result, int max, int newlines) {
char *dp, *sp;
int truncated = 0;
int len = 0;
int avail = max-1;
int crCount = 0;
int lfCount = 0;
dp = result;
sp = e->value;
while (1) {
int ch;
/* 1.07: don't check for available space now.
We check for it immediately bef... | false | false | false | false | false | 0 |
put_bitmap_trans(int x,int y,char* bitmapPtr)
{
err_when( !buf_locked );
if( is_front )
mouse.hide_area( x, y, x+*((short*)bitmapPtr)-1, y+*(((short*)bitmapPtr)+1)-1 );
IMGbltTrans(buf_ptr(), buf_pitch(), x, y, bitmapPtr);
if( is_front )
mouse.show_area();
} | false | false | false | false | false | 0 |
PrepareTransaction(void)
{
TransactionState s = CurrentTransactionState;
TransactionId xid = GetCurrentTransactionId();
GlobalTransaction gxact;
TimestampTz prepared_at;
ShowTransactionState("PrepareTransaction");
/*
* check the current transaction state
*/
if (s->state != TRANS_INPROGRESS)
elog(WARNING,... | false | false | false | false | false | 0 |
lookAt( const Vector3& targetPoint, TransformSpace relativeTo,
const Vector3& localDirectionVector)
{
// Calculate ourself origin relative to the given transform space
Vector3 origin;
switch (relativeTo)
{
default: // Just in case
case TS_WORLD:
... | false | false | false | false | false | 0 |
SendQueryGameobject(uint32 entry, uint64 guid)
{
if(objmgr.GONonExistent(entry))
{
logdebug("Skipped query of gameobject %u (was marked as nonexistent before)",entry);
return;
}
logdebug("Sending gameobject query, id=%u",entry);
WorldPacket wp(CMSG_GAMEOBJECT_QUERY,4+8);
wp << en... | false | false | false | false | false | 0 |
opt_quote(type, s)
int type;
register char *s;
{
char buf[3];
PARG parg;
switch (type)
{
case INIT:
case TOGGLE:
if (s[0] == '\0')
{
openquote = closequote = '\0';
break;
}
if (s[1] != '\0' && s[2] != '\0')
{
error("-\" must be followed by 1 or 2 chars", NULL_PARG);
return;
}
openquot... | false | false | false | false | false | 0 |
strip_unneeded(void)
{
gp_symbol_type *list = NULL;
gp_symbol_type *symbol = NULL;
list = state.object->symbols;
while (list != NULL) {
symbol = list;
list = list->next;
/* if the symbol has a relocation or is global it can't be removed */
if (!gp_coffgen_has_reloc(state.object, symbol) &&... | false | false | false | false | false | 0 |
main(int argc, char ** argv) {
#endif
int sock_in, sock_out;
char* error = NULL;
char* hostandport;
int len;
_dropbear_exit = cli_dropbear_exit;
_dropbear_log = cli_dropbear_log;
disallow_core();
cli_getopts(argc, argv);
TRACE(("user='%s' host='%s' port='%s'", cli_opts.username,
cli_opts.remotehost, c... | false | false | false | false | false | 0 |
ircclient_change_nick(struct ircproxy *p, const char *newnick) {
/* If a server is ready to accept a NICK command, send it */
if (IS_SERVER_READY(p)) {
debug("Requesting nick change from '%s' to '%s'",
(p->nickname ? p->nickname : ""), newnick);
ircserver_send_command(p, "NICK", ":%s", newnic... | false | false | false | false | false | 0 |
lhash_read_header(lhash_kv_engine *pEngine,unqlite_page *pHeader)
{
const unsigned char *zRaw = pHeader->zData;
lhash_bmap_page *pMap;
sxu32 nHash;
int rc;
pEngine->pHeader = pHeader;
/* 4 byte magic number */
SyBigEndianUnpack32(zRaw,&pEngine->nMagic);
zRaw += 4;
if( pEngine->nMagic != L_HASH_MAGIC ){
/* Co... | false | false | false | false | false | 0 |
verify_var_type_and_container (MonoImage *image, int var_type, MonoGenericContainer *container, MonoError *error)
{
mono_error_init (error);
if (var_type == MONO_TYPE_MVAR) {
if (!container->is_method) { //MVAR and a method container
mono_error_set_bad_image (error, image, "MVAR parsed in a context without a met... | false | false | false | false | false | 0 |
sys_rt_sigsuspend(struct tcb *tcp)
{
if (entering(tcp)) {
sigset_t sigm;
if (copy_sigset_len(tcp, tcp->u_arg[0], &sigm, tcp->u_arg[1]) < 0)
tprintf("[?]");
else
printsigmask(&sigm, 1);
}
return 0;
} | false | false | false | false | false | 0 |
evt_cell_renderer_entry_icon_press(GtkEntry *entry, GtkEntryIconPosition icon_pos, GdkEvent *event, gpointer user)
{
LDlgInfo *ldi = user;
GString *value;
/* Use a GString to allow the user's editor callback to modify the value. */
value = g_string_new(gtk_entry_get_text(entry));
if(ldi->editor(value, ldi->user)... | false | false | false | false | false | 0 |
RequestInformation (
vtkInformation *vtkNotUsed(request),
vtkInformationVector **inputVector,
vtkInformationVector *outputVector)
{
vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
vtkInformation *outInfo = outputVector->GetInformationObject(0);
vtkInformation *inScalarInfo =
vtkDataO... | false | false | false | false | false | 0 |
AtAbort_Portals(void)
{
HASH_SEQ_STATUS status;
PortalHashEnt *hentry;
hash_seq_init(&status, PortalHashTable);
while ((hentry = (PortalHashEnt *) hash_seq_search(&status)) != NULL)
{
Portal portal = hentry->portal;
if (portal->status == PORTAL_ACTIVE)
portal->status = PORTAL_FAILED;
/*
* Do nothi... | false | false | false | false | false | 0 |
fuse_removexattr_resume (fuse_state_t *state)
{
gf_log ("glusterfs-fuse", GF_LOG_TRACE,
"%"PRIu64": REMOVEXATTR %s/%"PRIu64" (%s)", state->finh->unique,
state->loc.path, state->finh->nodeid, state->name);
FUSE_FOP (state, fuse_err_cbk, GF_FOP_REMOVEXATTR,
... | false | false | false | false | false | 0 |
gf_term_dump_scene(GF_Terminal *term, char *rad_name, char **filename, Bool xml_dump, Bool skip_protos, GF_ObjectManager *scene_od)
{
#ifndef GPAC_DISABLE_SCENE_DUMP
GF_SceneGraph *sg;
GF_ObjectManager *odm;
GF_SceneDumper *dumper;
u32 mode;
char szExt[20], *ext;
GF_Err e;
if (!term || !term->root_scene) return... | true | true | true | false | false | 1 |
pdf_set_pattern(pdf_csi *csi, int what, pdf_pattern *pat, float *v)
{
fz_context *ctx = csi->dev->ctx;
pdf_gstate *gs = csi->gstate + csi->gtop;
pdf_material *mat;
pdf_flush_text(csi);
mat = what == PDF_FILL ? &gs->fill : &gs->stroke;
if (mat->pattern)
pdf_drop_pattern(ctx, mat->pattern);
mat->kind = PDF_M... | false | false | false | false | false | 0 |
erename
#ifdef KC_USE_PROTOTYPES
(char *oldfilename, char *newfilename)
#else
(oldfilename, newfilename) char *oldfilename;
char *newfilename;
#endif
#line 705 "../main.k"
{
#ifndef KC_STDC
if (link(oldfilename, newfilename) != 0) {
perror("kc: error");
v_report( NonFatal( NoFileLine(), Problem4S( "could not creat... | false | false | false | false | false | 0 |
setImage(FG_Graphic * pGraphic, GR_Image * pImage, GR_Graphics * pG, UT_sint32 iWidth, UT_sint32 iHeight)
{
m_FillType = FG_FILL_IMAGE;
DELETEP(m_pImage);
DELETEP(m_pGraphic);
m_pImage = pImage;
m_pGraphic = pGraphic;
m_bTransparentForPrint = false;
setWidthHeight(pG,iWidth,iHeight);
m_pDocImage = NULL;
} | false | false | false | false | false | 0 |
sanity_check_ckpt(struct f2fs_sb_info *sbi)
{
unsigned int total, fsmeta;
struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi);
struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
total = le32_to_cpu(raw_super->segment_count);
fsmeta = le32_to_cpu(raw_super->segment_count_ckpt);
fsmeta += le32_to_cpu(raw_super->s... | false | false | false | false | false | 0 |
set(const std::string& host_, int port_, const UserConfig& cfg) {
if(port_ <= 0) port_ = default_port;
if(host_.empty()) return;
timeout = 10;
cfg.ApplyToConfig(concfg);
host = host_;
port = port_;
valid = true;
} | false | false | false | false | false | 0 |
Heuristic_Bound_max_region_convert(
Heuristic_Bound *heuristic_bound){
register gint i, j;
for(i = 1; i <= heuristic_bound->query_range; i++){
for(j = 1; j <= heuristic_bound->target_range; j++){
if(heuristic_bound->matrix[i][j]
< heuristic_bound->matrix[i-1][j-1])
... | false | false | false | false | false | 0 |
onCmdSelectIcon(FXObject*,FXSelector sel,void*){
FXString name,selected;
switch(FXSELID(sel)){
case ID_SELECT_ICON_NAME: name=filebinding.name; break;
case ID_SELECT_ICON_BIGNAME: name=filebinding.bigname; break;
case ID_SELECT_ICON_NAMEOPEN: name=filebinding.nameopen; break;
case ID_SELECT_ICON_BI... | false | false | false | false | false | 0 |
dynv_system_remove(struct dynvSystem* dynv_system, const char* variable_name){
dynvSystem::VariableMap::iterator i;
i=dynv_system->variables.find(variable_name);
if (i==dynv_system->variables.end()){
return -1;
}else{
dynv_variable_destroy((*i).second);
dynv_system->variables.erase(i);
return 0;
}
} | false | false | false | false | false | 0 |
GetWindow(uint_t idx) const
{
int dv = 1;
//printf("GETWIN2 %d %d\n", m_Window.x, m_iBpp);
if (idx > 0)
{
switch (m_iFormat)
{
case IMG_FMT_YV12:
case IMG_FMT_I420:
dv = 2;
}
}
return m_pPlane[idx] + m_iStride[idx] * m_Window.y / dv + m_iBpp * m_Window.x / dv;
} | false | false | false | false | false | 0 |
in_ansi_esc_seq()
{
char *p;
/*
* Search backwards for either an ESC (which means we ARE in a seq);
* or an end char (which means we're NOT in a seq).
*/
for (p = &linebuf[curr]; p > linebuf; )
{
LWCHAR ch = step_char(&p, -1, linebuf);
if (IS_CSI_START(ch))
return (1);
if (!is_ansi_middle(ch))
r... | false | false | false | false | false | 0 |
_mesa_cube_complete(const struct gl_texture_object *texObj)
{
const GLint baseLevel = texObj->BaseLevel;
const struct gl_texture_image *img0, *img;
GLuint face;
if (texObj->Target != GL_TEXTURE_CUBE_MAP)
return GL_FALSE;
if ((baseLevel < 0) || (baseLevel >= MAX_TEXTURE_LEVELS))
return GL_FA... | false | false | false | false | false | 0 |
ret(int code, char *label, char *mnemo, char *oper)
{
register char **q;
if ( !oper || !*oper )
insert8(0xc9);
else
{ for ( q=condcodes; *q; q++ )
if ( filter( oper,*q) )
{ insert8(0xc0+ ((q-condcodes)<<3) );
return 0;
}
error ("Bad condition code");
}
return 0;
} | false | false | false | false | false | 0 |
merge_memattrs (rtx x, rtx y)
{
int i;
int j;
enum rtx_code code;
const char *fmt;
if (x == y)
return;
if (x == 0 || y == 0)
return;
code = GET_CODE (x);
if (code != GET_CODE (y))
return;
if (GET_MODE (x) != GET_MODE (y))
return;
if (code == MEM && MEM_ATTRS (x) != MEM_ATTRS (y)... | false | false | false | false | false | 0 |
smq_residency(struct dm_cache_policy *p)
{
dm_cblock_t r;
unsigned long flags;
struct smq_policy *mq = to_smq_policy(p);
spin_lock_irqsave(&mq->lock, flags);
r = to_cblock(mq->cache_alloc.nr_allocated);
spin_unlock_irqrestore(&mq->lock, flags);
return r;
} | false | false | false | false | false | 0 |
unmarshalArguments(cdrStream& _n)
{
arg_0_ = new CosGraphs::NodeHandle;
(CosGraphs::NodeHandle&)arg_0_ <<= _n;
arg_0 = &arg_0_.in();
(CosGraphs::Mode&)arg_1 <<= _n;
} | false | false | false | false | false | 0 |
init_host_list(struct host_list *hlist){
unsigned int i;
bzero(hlist, sizeof(struct host_list));
if( (hlist->host = malloc(MAX_LIST_ENTRIES * sizeof(struct host_entry *))) == NULL){
return(0);
}
for(i=0; i < MAX_LIST_ENTRIES; i++)
hlist->host[i]= NULL;
hlist->nhosts= 0;
hlist->maxhosts= MAX_HOST_ENTRIES;... | false | false | false | false | false | 0 |
lookup_swap_cgroup(swp_entry_t ent,
struct swap_cgroup_ctrl **ctrlp)
{
pgoff_t offset = swp_offset(ent);
struct swap_cgroup_ctrl *ctrl;
struct page *mappage;
struct swap_cgroup *sc;
ctrl = &swap_cgroup_ctrl[swp_type(ent)];
if (ctrlp)
*ctrlp = ctrl;
mappage = ctrl->map[offset / SC_PER_PAGE];
sc = page_a... | false | false | false | false | false | 0 |
CL_ClipMoveToEntities ( vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, trace_t *tr )
{
int i, x, zd, zu;
trace_t trace;
int headnode;
float *angles;
entity_state_t *ent;
int num;
cmodel_t *cmodel;
vec3_t bmins, bmaxs;
for (i=0 ; i<cl.frame.num_entities ; i++)
{
num = (cl.frame.p... | false | false | false | false | false | 0 |
decode_and_scan(struct rtf_object_data* data, cli_ctx* ctx)
{
int ret=CL_CLEAN;
cli_dbgmsg("RTF:Scanning embedded object:%s\n",data->name);
if(data->bread == 1 && data->fd > 0) {
cli_dbgmsg("Decoding ole object\n");
ret = cli_scan_ole10(data->fd, ctx);
}
else if(data->fd > 0)
ret = cli_magic_scandesc(data->... | false | false | false | false | false | 0 |
libset_get_bool (const char *key)
{
int flag, ret = 0;
/* global specials */
if (!strcmp(key, R_FUNCTIONS)) {
return R_functions;
} else if (!strcmp(key, R_LIB)) {
return R_lib;
}
if (!strcmp(key, MAX_VERBOSE) && gretl_debug > 1) {
/* strong debugging turns on max_verbose */
return 1;
... | false | false | false | false | false | 0 |
setGenericCommand(redisClient *c, int flags, robj *key, robj *val, robj *expire, int unit, robj *ok_reply, robj *abort_reply) {
long long milliseconds = 0; /* initialized to avoid any harmness warning */
if (expire) {
if (getLongLongFromObjectOrReply(c, expire, &milliseconds, NULL) != REDIS_OK)
... | false | false | false | false | false | 0 |
dynamite_get_copy_length(Dynamite* dynamite)/*{{{*/
{
unsigned bits;
bits = dynamite_read_bits_big_endian(dynamite, 2);
switch (bits)
{
case 0: /* 00 */
bits = dynamite_read_bits_big_endian(dynamite, 2);
switch (bits)/*{{{*/
{
case 0: /* 0000 */
bits = dynamite_... | false | false | false | false | false | 0 |
get_file( const int sound )
{
std::string path_sound = CACHE::path_sound_root();
switch( sound ){
case SOUND_RES: path_sound += "res.wav"; break;
case SOUND_NO: path_sound += "no.wav"; break;
case SOUND_NEW: path_sound += "new.wav"; break;
case SOUND_ERR: path_sound += "err.wav... | false | false | false | false | false | 0 |
cleanupRegionData() {
for (int32_t i = 0 ; i < URGN_LIMIT ; i++ ) {
if ( availableRegions[i] ) {
delete availableRegions[i];
}
}
if (regionAliases) {
uhash_close(regionAliases);
}
if (numericCodeMap) {
uhash_close(numericCodeMap);
}
if (regionI... | false | false | false | false | false | 0 |
createSphere3d()
{
// GLdouble radius=m_size;
GLint slices=m_numSlices;
GLint stacks=m_numStacks;
GLfloat rho=90.f, drho=0.f, theta=0.f, dtheta=0.f;
GLint i, j;
// post("creating sphere %d %d", slices, stacks);
if(m_drawType==GL_DEFAULT_GEM)m_drawType=GL_FILL;
drho = 180. / static_cast<GLfloat>(sta... | false | false | false | false | false | 0 |
freeCurrentBuffers(void)
{
int i;
if (!dontFreeBuffers) {
for (i = 0 ; i < currImgNbSamples ; i++)
free(currBuffp[i]);
free(currBuffp);
}
// at any rate, we set the pointer to 0.
// the pointer is NOT lost when we are dealing with socket data.
currBuffp = 0;
r... | false | false | false | false | false | 0 |
find_loop_by_file (const char * filename)
{
char dev[64];
char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" };
int i, j, fd;
struct stat statbuf;
struct loop_info loopinfo;
for (j = 0; j < SIZE(loop_formats); j++) {
for (i = 0; i < 256; i++) {
sprintf (dev, loop_formats[j], i);
if (stat (dev, &sta... | false | false | false | false | false | 0 |
netsnmp_ds_toggle_boolean(int storeid, int which)
{
if (storeid < 0 || storeid >= NETSNMP_DS_MAX_IDS ||
which < 0 || which >= NETSNMP_DS_MAX_SUBIDS) {
return SNMPERR_GENERR;
}
if ((netsnmp_ds_booleans[storeid][which/8] & (1 << (which % 8))) == 0) {
netsnmp_ds_booleans[storeid][which/8... | false | false | false | false | false | 0 |
clearCourses()
{
if (m_courses.count() == 0)
return;
emit coursesAboutToBeRemoved(0, m_courses.length() - 1);
qDeleteAll(m_courses);
m_courses.clear();
emit courseCountChanged();
emit coursesRemoved();
} | false | false | false | false | false | 0 |
path_is_okay(const char *path)
{
/* The path must either not exist, or be an empty directory */
if (!git_path_exists(path)) return true;
if (!git_path_is_empty_dir(path)) {
giterr_set(GITERR_INVALID,
"'%s' exists and is not an empty directory", path);
return false;
}
return true;
} | false | false | false | false | false | 0 |
nrrdRangeReset(NrrdRange *range) {
if (range) {
range->min = AIR_NAN;
range->max = AIR_NAN;
range->hasNonExist = nrrdHasNonExistUnknown;
}
} | false | false | false | false | false | 0 |
get(const char *n, int W, int H) {
Fl_Shared_Image *temp; // Image
if ((temp = find(n, W, H)) != NULL) return temp;
if ((temp = find(n)) == NULL) {
temp = new Fl_Shared_Image(n);
if (!temp->image_) {
delete temp;
return NULL;
}
temp->add();
}
if ((temp->w() != W || temp->h() ... | false | false | false | false | false | 0 |
ExtractMetadata(vtkDataSet *input)
{
vtkModelMetadata *extractedMD = NULL;
int numCells = static_cast<int>(this->CellList->IdTypeSet.size());
if (vtkModelMetadata::HasMetadata(input))
{
if (numCells == input->GetNumberOfCells())
{
extractedMD = vtkModelMetadata::New();
extractedMD->Unpa... | false | false | false | false | false | 0 |
scc_add_xref (SCC *src, SCC *dst)
{
g_assert (src != dst);
g_assert (src->index != dst->index);
if (dyn_array_int_contains (&dst->xrefs, src->index))
return;
if (src->num_bridge_entries) {
dyn_array_int_merge_one (&dst->xrefs, src->index);
} else {
int i;
dyn_array_int_merge (&dst->xrefs, &src->xrefs);
... | false | false | false | false | false | 0 |
on_restore_morph_factors1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
int lp;
for(lp=1;lp<=MAX_WINS; lp++)
if(sp->im_widget[lp] != NULL)
setup_handlebox_factor(lp,TRUE);
//set_editview(lp, EDITVIEW_SHOWMESHES);
} | false | false | false | false | false | 0 |
allcap_copy(word, wcopy)
char_u *word;
char_u *wcopy;
{
char_u *s;
char_u *d;
int c;
d = wcopy;
for (s = word; *s != NUL; )
{
#ifdef FEAT_MBYTE
if (has_mbyte)
c = mb_cptr2char_adv(&s);
else
#endif
c = *s++;
#ifdef FEAT_MBYTE
/* We only change 0xdf to SS when we are certai... | false | false | false | false | false | 0 |
deathlog_command(char *arg, struct session *ses)
{
FILE *fh;
char fname[BUFFER_SIZE], text[BUFFER_SIZE], temp[BUFFER_SIZE], lfname[BUFFER_SIZE];
if (*arg)
{
arg = get_arg_in_braces(arg, temp, 0);
arg = get_arg_in_braces(arg, text, 1);
substitute_vars(temp, fname);
substi... | false | false | false | false | false | 0 |
carter_depth_from_twt (int zone, short int twt_in_msec, short int *depth_in_corr_m)
{
/* Given two-way travel time of echosounder in milliseconds, and
Carter Zone number, finds depth in Carter corrected meters.
Returns (0) if OK, -1 if error condition. */
int i, nominal_z1500, low_hundred, part_in_100;
if (ca... | false | false | false | false | false | 0 |
exception_pc (int nr)
{
// zero divide, chk, trapcc/trapv, trace, trap#
if (nr == 5 || nr == 6 || nr == 7 || nr == 9 || (nr >= 32 && nr <= 47))
return m68k_getpc ();
return regs.instruction_pc;
} | false | false | false | false | false | 0 |
cb_autofit_row (GnmColRowIter const *iter, gpointer data_)
{
struct cb_autofit *data = data_;
int size, min, max;
if (iter->cri->hard_size)
return FALSE;
size = sheet_row_size_fit_pixels (data->sheet, iter->pos,
data->range->start.col, data->range->end.col,
data->ignore_strings);
max = 20 * sheet_row_get... | false | false | false | false | false | 0 |
test_1h(void)
{
hid_t dcpl=-1; /*dataset creation properties */
herr_t status; /*return status */
TESTING("address overflow in external files");
if((dcpl=H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
if (H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED-1) < 0) goto error;
H5E_B... | false | false | false | false | false | 0 |
parseUnknown(ArArgumentBuilder *arg,
char *errorBuffer,
size_t errorBufferLen)
{
MRPT_UNUSED_PARAM(errorBuffer);
MRPT_UNUSED_PARAM(errorBufferLen);
if (arg->getArgc() < 1)
{
IFDEBUG(ArLog::log(ArLog::Verbose, "%sEmpty arg in section '%s', ignoring it",
myLogPrefix.c_... | false | false | false | false | false | 0 |
onCurrentUserChanged()
{
int row = userModel()->currentUserIndex().row();
d->ui->userTreeView->setCurrentIndex(d->ui->userTreeView->model()->index(row, Core::IUser::UsualName));
// ui->userTreeView->selectRow(row);
d->analyzeCurrentUserRights();
// ui->userViewer->setCurrentUser(row);
} | false | false | false | false | false | 0 |
_eina_value_type_blob_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b)
{
const Eina_Value_Blob_Operations *ops = _eina_value_type_blob_ops_get(a);
const Eina_Value_Blob *ta = a, *tb = b;
size_t minsize;
if (ta->ops != tb->ops)
{
eina_error_set(EINA_ERROR_VALUE_FAILE... | false | false | false | false | false | 0 |
ZZ_NewLink(JAR_Item *thing)
{
ZZLink *link = (ZZLink *) PORT_ZAlloc (sizeof (ZZLink));
if (link)
link->thing = thing;
return link;
} | false | false | false | false | false | 0 |
mimic_set_property(MimCtx *ctx, const gchar *name, gpointer data)
{
/* Either the encoder or the decoder has to be initialized. */
if (!ctx->encoder_initialized && !ctx->decoder_initialized)
return FALSE;
if (ctx->encoder_initialized) {
if (strcmp(name, "quality") == 0) {
ctx-... | false | false | false | false | false | 0 |
_eina_chained_mempool_alloc_in(Chained_Mempool *pool, Chained_Pool *p)
{
void *mem;
if (p->last)
{
mem = p->last;
p->last += pool->item_alloc;
if (p->last >= p->limit)
p->last = NULL;
}
else
{
#ifndef NVALGRIND
VALGRIND_MAKE_MEM_DEFINED(p->base, pool->item_alloc);
#endif
... | false | false | false | false | false | 0 |
Create(const char *faceName, int characterSet,
int size, bool bold, bool italic, int) {
Release();
// If name of the font begins with a '-', assume, that it is
// a full fontspec.
if (faceName[0] == '-') {
fid = new FXFont(FXApp::instance(), faceName);
}
else {
fid = new FXFont(FXApp::instance... | false | false | false | false | false | 0 |
peas_plugin_info_error_quark (void)
{
static volatile gsize quark = 0;
if (g_once_init_enter (&quark))
g_once_init_leave (&quark,
g_quark_from_static_string ("peas-plugin-info-error"));
return quark;
} | false | false | false | false | false | 0 |
AcpiDmDumpRawDataBuffer (
UINT8 *Buffer,
UINT32 Length,
UINT32 Level)
{
UINT32 Index;
UINT32 i;
UINT32 j;
if (!Length)
{
return;
}
AcpiOsPrintf ("RawDataBuffer (0x%.2... | false | false | false | false | false | 0 |
_e_fm2_icon_desktop_get_internal(Evas *evas, const E_Fm2_Icon *ic, Efreet_Desktop *desktop, const char **type_ret)
{
Evas_Object *o;
if (!desktop->icon)
return NULL;
if (_e_fm2_file_is_edje(desktop->icon))
return _e_fm2_icon_explicit_edje_get(evas, ic, desktop->icon, type_ret);
o = _e_fm2_icon_... | false | false | false | false | false | 0 |
gdl_dock_floating_window_delete_event_cb (GtkWidget *widget)
{
GdlDock *dock;
g_return_val_if_fail (GTK_IS_WINDOW (widget), FALSE);
dock = GDL_DOCK (g_object_get_data (G_OBJECT (widget), "dock"));
if (dock->root) {
/* this will call reduce on ourselves, hiding the window if appropiate ... | false | false | false | false | false | 0 |
__fmc_sdb_free(struct sdb_array *arr)
{
int i, n;
if (!arr)
return;
n = arr->len;
for (i = 0; i < n; i++) {
if (IS_ERR(arr->subtree[i]))
continue;
__fmc_sdb_free(arr->subtree[i]);
}
kfree(arr->record);
kfree(arr->subtree);
kfree(arr);
} | false | false | false | false | false | 0 |
EV_OpenPillar(line_t * line, byte * args)
{
int secnum;
sector_t *sec;
pillar_t *pillar;
int rtn;
rtn = 0;
secnum = -1;
while ((secnum = P_FindSectorFromTag(args[0], secnum)) >= 0)
{
sec = §ors[secnum];
if (sec->specialdata)
continue; // already... | false | false | false | false | false | 0 |
__ecereMethod___ecereNameSpace__ecere__sys__DateDropBox_OnDropDown(struct __ecereNameSpace__ecere__com__Instance * this)
{
struct __ecereNameSpace__ecere__sys__DateDropBox * __ecerePointer___ecereNameSpace__ecere__sys__DateDropBox = (struct __ecereNameSpace__ecere__sys__DateDropBox *)(this ? (((char *)this) + __ecereCl... | false | false | false | true | false | 1 |
knot_zone_contents_add_nsec3_node(knot_zone_contents_t *zone,
knot_node_t *node, int create_parents,
uint8_t flags)
{
UNUSED(create_parents);
UNUSED(flags);
if (zone == NULL || node == NULL) {
return KNOT_EINVAL;
}
int ret = 0;
if... | false | false | false | false | false | 0 |
read_Primitive(icc *icp, icmPrimType ptype, void *prim, char *p) {
switch(ptype) {
case icmUInt8Number:
*((unsigned int *)prim) = read_UInt8Number(p);
return 0;
case icmUInt16Number:
*((unsigned int *)prim) = read_UInt16Number(p);
return 0;
case icmUInt32Number:
*((unsigned int *)prim) = read_UIn... | false | false | false | false | false | 0 |
faim_cb_ssi_parseack(aim_session_t *sess, aim_frame_t *fr, ...)
{
va_list ap;
struct aim_ssi_tmp *retval;
va_start(ap, fr);
retval = va_arg(ap, struct aim_ssi_tmp *);
va_end(ap);
while (retval) {
LOG(("[SSI] Status is 0x%04hx for a 0x%04hx action with name %s\n", retval->ack, retval->action, retval->item ? (r... | false | false | false | false | false | 0 |
At_Pos(int r, int c, NonZeroElem **first)
{
(*first) = FNZE_R[r];
while ((*first)->c_index != c)
(*first) = (*first)->NZE_R_N;
return NbNZRow[r];
} | false | false | false | false | false | 0 |
___os_device_stream_open_process
___P((___SCMOBJ path_and_args,
___SCMOBJ environment,
___SCMOBJ directory,
___SCMOBJ options),
(path_and_args,
environment,
directory,
options)
___SCMOBJ path_and_args;
___SCMOBJ environment;
___SCMOBJ directory;
___SCMOBJ... | false | false | false | false | false | 0 |
GetInterceptSlopeValueFromSequence(const DataSet& ds, const Tag& tfgs, std::vector<double> &intslope)
{
if( !ds.FindDataElement( tfgs ) ) return false;
//const SequenceOfItems * sqi = ds.GetDataElement( tfgs ).GetSequenceOfItems();
SmartPointer<SequenceOfItems> sqi = ds.GetDataElement( tfgs ).GetValueAsSQ();
as... | false | false | false | false | false | 0 |
_DBCreateDataBlockPolygons ()
{
DBTableFieldDefinition fieldDefs [] =
{ DBTableFieldDefinition (DBrNArea, DBTableFieldFloat, (char *) "%10.1f", sizeof (DBFloat),true),
DBTableFieldDefinition (DBrNPerimeter, DBTableFieldFloat, (char *) "%10.1f", sizeof (DBFloat),true),
DBTableFieldDefinition (DBrNRegio... | false | false | false | false | false | 0 |
ssl3_free_digest_list(SSL *s)
{
int i;
if (!s->s3->handshake_dgst) return;
for (i=0;i<SSL_MAX_DIGEST;i++)
{
if (s->s3->handshake_dgst[i])
EVP_MD_CTX_destroy(s->s3->handshake_dgst[i]);
}
OPENSSL_free(s->s3->handshake_dgst);
s->s3->handshake_dgst=NULL;
} | 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.