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 |
|---|---|---|---|---|---|---|
addHdr(HttpConn *conn, cchar *key, cchar *value)
{
mprAssert(key && *key);
mprAssert(value);
mprAddKey(conn->tx->headers, key, value);
} | false | false | false | false | false | 0 |
parse_signal(const char *sig)
{
typedef struct signalpair
{
const char *name;
int signal;
} SIGNALPAIR;
static const SIGNALPAIR signallist[] = {
{ "ABRT", SIGABRT },
{ "ALRM", SIGALRM },
{ "FPE", SIGFPE },
{ "HUP", SIGHUP },
{ "ILL", SIGILL },
{ "INT", SIGINT },
{ "KILL", SIGKILL },
{ "PIPE", S... | false | false | false | false | false | 0 |
PKIX_PL_HashTable_Lookup(
PKIX_PL_HashTable *ht,
PKIX_PL_Object *key,
PKIX_PL_Object **pResult,
void *plContext)
{
PKIX_PL_Mutex *lockedMutex = NULL;
PKIX_UInt32 hashCode;
PKIX_PL_EqualsCallback keyComp;
PKIX_PL_Object *result = NULL;
PKIX_ENTER(H... | false | false | false | false | false | 0 |
GetLineIndentInSpaces(int line) const
{
cbStyledTextCtrl* control = GetControl();
int currLine = (line == -1)
? control->LineFromPosition(control->GetCurrentPos())
: line;
wxString text = control->GetLine(currLine);
unsigned int len = text.Length();
int spaceC... | false | false | false | false | false | 0 |
visit_enter(ir_call *call)
{
/* At global scope this->current will be NULL. Since there is no way to
* call global scope, it can never be part of a cycle. Don't bother
* adding calls from global scope to the graph.
*/
if (this->current == NULL)
return visit_continue;
funct... | false | false | false | false | false | 0 |
rtl_disable(struct r8152 *tp)
{
u32 ocp_data;
int i;
if (test_bit(RTL8152_UNPLUG, &tp->flags)) {
rtl_drop_queued_tx(tp);
return;
}
ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR);
ocp_data &= ~RCR_ACPT_ALL;
ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data);
rtl_drop_queued_tx(tp);
for (i = 0; i... | false | false | false | false | false | 0 |
ColouriseComment(StyleContext& sc, bool& /*apostropheStartsAttribute*/) {
// Apostrophe meaning is not changed, but the parameter is present for uniformity
sc.SetState(SCE_ADA_COMMENTLINE);
while (!sc.atLineEnd) {
sc.Forward();
}
} | false | false | false | false | false | 0 |
memcmp_extent_buffer(struct extent_buffer *eb, const void *ptrv,
unsigned long start,
unsigned long len)
{
size_t cur;
size_t offset;
struct page *page;
char *kaddr;
char *ptr = (char *)ptrv;
size_t start_offset = eb->start & ((u64)PAGE_CACHE_SIZE - 1);
unsigned long i = (start_offset + start) >> PAGE_... | false | false | false | false | false | 0 |
infd_session_proxy_is_subscribed(InfdSessionProxy* proxy,
InfXmlConnection* connection)
{
g_return_val_if_fail(INFD_IS_SESSION_PROXY(proxy), FALSE);
g_return_val_if_fail(INF_IS_XML_CONNECTION(connection), FALSE);
if(infd_session_proxy_find_subscription(proxy, connection) == NULL)... | false | false | false | false | false | 0 |
_mesa_hash_table_search(struct hash_table *ht, uint32_t hash,
const void *key)
{
uint32_t start_hash_address = hash % ht->size;
uint32_t hash_address = start_hash_address;
do {
uint32_t double_hash;
struct hash_entry *entry = ht->table + hash_address;
if (entry_is_f... | false | false | false | false | false | 0 |
sony_nc_battery_care_health_show(struct device *dev,
struct device_attribute *attr, char *buffer)
{
ssize_t count = 0;
unsigned int health;
if (sony_call_snc_handle(bcare_ctl->handle, 0x0200, &health))
return -EIO;
count = snprintf(buffer, PAGE_SIZE, "%d\n", health & 0xff);
return count;
} | false | false | false | false | false | 0 |
length_of_encoded_string(ulonglong len)
{
/*
The prefix length is a 1-, 2-, 3-, or 8-byte integer that represents
the length of the string in bytes. See net_store_length for details.
*/
if (len < 251ULL)
len+= 1;
else if (len < 65536ULL)
len+= 3;
else if (len < 16777216ULL)
len+= 4;
else... | false | false | false | false | false | 0 |
sheet_redraw_region (Sheet const *sheet,
int start_col, int start_row,
int end_col, int end_row)
{
GnmRange bound;
g_return_if_fail (IS_SHEET (sheet));
/*
* Getting the bounding box causes row respans to be done if
* needed. That can be expensive, so just redraw the whole
* sheet if the row ... | false | false | false | false | false | 0 |
re_comp_w(regexp** rpp, const CHAR_TYPE* exp)
{
register CHAR_TYPE *scan;
int flags;
struct comp co;
int error = 0;
if(!rpp)
FAIL("Invalid out regexp pointer", REGEXP_BADARG);
{
register regexp* r;
if (exp == NULL)
FAIL("Invalid expression", REGEXP_BADARG);
... | false | false | false | false | false | 0 |
nokia_isi_isi_unsolicited_handler_construct (GType object_type, FsoGsmModem* modem) {
NokiaIsiIsiUnsolicitedHandler * self = NULL;
FsoGsmModem* _tmp0_ = NULL;
FsoGsmModem* _tmp1_ = NULL;
GIsiCommModemAccess* _tmp2_ = NULL;
GIsiCommNetwork* _tmp3_ = NULL;
GIsiCommModemAccess* _tmp4_ = NULL;
GIsiCommNetwork* _tmp5... | false | false | false | false | false | 0 |
reload_rules_cmd(int fd, const char* cmd)
{
ios_detach_global_handler();
if(reload_rules(sensor) < 0)
{
char message[] = "Malformed rule file. Correct it and reload rules again\n";
write(fd, message, strlen(message));
}
else
{
fprint_rules(fd);
ios_attach_global_handler(process_data);
}
return 1;
} | false | false | false | false | false | 0 |
_Py_bytes_capitalize(char *result, char *s, Py_ssize_t len)
{
Py_ssize_t i;
/*
newobj = PyString_FromStringAndSize(NULL, len);
if (newobj == NULL)
return NULL;
s_new = PyString_AsString(newobj);
*/
if (0 < len) {
int c = Py_CHARMAS... | false | false | false | false | false | 0 |
crush_hash32_rjenkins1(__u32 a)
{
__u32 hash = crush_hash_seed ^ a;
__u32 b = a;
__u32 x = 231232;
__u32 y = 1232;
crush_hashmix(b, x, hash);
crush_hashmix(y, a, hash);
return hash;
} | false | false | false | false | false | 0 |
intr2 (int sig _GL_UNUSED_PARAMETER)
{
if (localchars)
{
#ifdef KLUDGELINEMODE
if (kludgelinemode)
sendbrk ();
else
#endif
sendabort ();
return;
}
} | false | false | false | false | false | 0 |
es_func_fp_write (void *cookie, const void *buffer, size_t size)
{
estream_cookie_fp_t file_cookie = cookie;
size_t bytes_written;
if (file_cookie->fp)
bytes_written = fwrite (buffer, 1, size, file_cookie->fp);
else
bytes_written = size; /* Successfully written to the bit bucket. */
if (bytes_writ... | false | false | false | false | false | 0 |
t3_get_tp_version(struct adapter *adapter, u32 *vers)
{
int ret;
/* Get version loaded in SRAM */
t3_write_reg(adapter, A_TP_EMBED_OP_FIELD0, 0);
ret = t3_wait_op_done(adapter, A_TP_EMBED_OP_FIELD0,
1, 1, 5, 1);
if (ret)
return ret;
*vers = t3_read_reg(adapter, A_TP_EMBED_OP_FIELD1);
return 0;
} | false | false | false | false | false | 0 |
Keyak_ProcessAssociatedData(Keccak_DuplexInstance* duplex, const unsigned char *data, unsigned int dataSizeInBytes, int last, int bodyFollows)
{
unsigned int rhoInBytes = (duplex->rate-4)/8;
while(dataSizeInBytes > 0) {
unsigned int localSize;
if (Keccak_DuplexGetInputIndex(duplex) == rhoInByt... | false | false | false | false | false | 0 |
set_vclk(struct tridentfb_par *par, unsigned long freq)
{
int m, n, k;
unsigned long fi, d, di;
unsigned char best_m = 0, best_n = 0, best_k = 0;
unsigned char hi, lo;
unsigned char shift = !is_oldclock(par->chip_id) ? 2 : 1;
d = 20000;
for (k = shift; k >= 0; k--)
for (m = 1; m < 32; m++) {
n = ((m + 2) <... | false | false | false | false | false | 0 |
_cupsSNMPDefaultCommunity(void)
{
cups_file_t *fp; /* snmp.conf file */
char line[1024], /* Line from file */
*value; /* Value from file */
int linenum; /* Line number in file */
_cups_globals_t *cg = _cupsGlobals(); /* Global data */
DEBUG_puts("4_cupsSNMPDefaultCommunity()");
if (!cg->snmp_co... | false | false | false | false | false | 0 |
getLocalizedCountry(const UnicodeString &countryCode, const Locale &locale, UnicodeString &displayCountry) {
// We do not want to use display country names only from the target language bundle
// Note: we should do this in better way.
displayCountry.remove();
int32_t ccLen = countryCode.length();
if... | false | false | false | false | false | 0 |
property_editor_handle_object_created(struct property_editor *pe,
int tag, int object_id)
{
enum editor_object_type objtype;
struct property_page *pp;
for (objtype = 0; objtype < NUM_OBJTYPES; objtype++) {
if (objtype_is_conserved(objtype)) {
continue;
}
... | false | false | false | false | false | 0 |
transchar_byte(c)
int c;
{
if (enc_utf8 && c >= 0x80)
{
transchar_nonprint(transchar_buf, c);
return transchar_buf;
}
return transchar(c);
} | false | false | false | false | false | 0 |
getnumlimit (Header *h, const char **fmt, int df) {
int sz = getnum(fmt, df);
if (sz > MAXINTSIZE || sz <= 0)
luaL_error(h->L, "integral size (%d) out of limits [1,%d]",
sz, MAXINTSIZE);
return sz;
} | false | false | false | false | false | 0 |
_gen_job_prio(struct job_record *job_ptr)
{
uint32_t job_prio;
if (job_ptr->part_ptr)
job_prio = job_ptr->part_ptr->priority << 16;
else
job_prio = 0;
if (job_ptr->node_cnt >= 0xffff)
job_prio += 0xffff;
else
job_prio += job_ptr->node_cnt;
return job_prio;
} | false | false | false | false | false | 0 |
gnm_soc_user_config (SheetObject *so, SheetControl *sc)
{
SheetObjectComponent *soc = SHEET_OBJECT_COMPONENT (so);
GtkWidget *w;
GOComponent *new_comp;
g_return_if_fail (soc && soc->component);
go_component_set_command_context (soc->component, GO_CMD_CONTEXT (scg_wbcg (SHEET_CONTROL_GUI (sc))));
new_comp = go_c... | false | false | false | false | false | 0 |
startfile()
/* called at the beginning of an abc tune by event_refno */
/* This sets up all the default values */
{
int j;
if (verbose) {
printf("scanning tune\n");
};
/* set up defaults */
sf = 0;
mi = 0;
setmap(0, global.basemap, global.basemul);
copymap(&global);
global.octaveshift = 0;
voic... | false | false | false | false | false | 0 |
numaEvalBestHaarParameters(NUMA *nas,
l_float32 relweight,
l_int32 nwidth,
l_int32 nshift,
l_float32 minwidth,
l_float32 maxwidth,
l_float... | false | false | false | false | true | 1 |
_ibar_icon_signal_emit(IBar_Icon *ic, char *sig, char *src)
{
if (ic->o_holder)
edje_object_signal_emit(ic->o_holder, sig, src);
if (ic->o_icon)
edje_object_signal_emit(ic->o_icon, sig, src);
if (ic->o_holder2)
edje_object_signal_emit(ic->o_holder2, sig, src);
if (ic->o_icon2)
edje_objec... | false | false | false | false | false | 0 |
mmap64 (void *addr, size_t length, int prot, int flags,
int fd, off64_t offset)
{
WRAPPER_EXECUTION_DISABLE_CKPT();
void *retval = _real_mmap64(addr, length, prot, flags, fd, offset);
WRAPPER_EXECUTION_ENABLE_CKPT();
return retval;
} | false | false | false | false | false | 0 |
mono_custom_attrs_from_assembly (MonoAssembly *assembly)
{
guint32 idx;
if (assembly->image->dynamic)
return lookup_custom_attr (assembly->image, assembly);
idx = 1; /* there is only one assembly */
idx <<= MONO_CUSTOM_ATTR_BITS;
idx |= MONO_CUSTOM_ATTR_ASSEMBLY;
return mono_custom_attrs_from_index (assembly-... | false | false | false | false | false | 0 |
rtf_object_begin(struct rtf_state* state,cli_ctx* ctx,const char* tmpdir)
{
struct rtf_object_data* data = cli_malloc(sizeof(*data));
if(!data) {
cli_errmsg("rtf_object_begin: Unable to allocate memory for object data\n");
return CL_EMEM;
}
data->fd = -1;
data->partial = 0;
data->has_partial = 0;
da... | false | false | false | false | false | 0 |
updateFromElement()
{
int ml = element()->maxLength();
if ( ml < 0 )
ml = 32767;
if ( widget()->maxLength() != ml ) {
widget()->setMaxLength( ml );
}
if (element()->value().string() != widget()->text()) {
m_blockElementUpdates = true; // Do not block signals here (#188374... | false | false | false | false | false | 0 |
AllocateEdgeHashEntryPool()
{
if ( freeEntryindex == 0 )
{
vtkTableBasedClipperEdgeHashEntry * newlist = new
vtkTableBasedClipperEdgeHashEntry[ POOL_SIZE ];
edgeHashEntrypool.push_back( newlist );
for ( int i = 0; i < POOL_SIZE; i ++ )
{
freeEntrylist[i] = &( newlist[i] );
... | false | false | false | false | false | 0 |
pango_fontmap_pango_font_map_load_fontset(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
{
ScmObj fontmap_scm;
PangoFontMap* fontmap;
ScmObj context_scm;
PangoContext* context;
ScmObj desc_scm;
PangoFontDescription* desc;
ScmObj language_scm;
PangoLanguage* language;
ScmObj SCM_SUBRARGS[4];
int SCM_i;... | false | false | false | false | false | 0 |
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
GenerateMultipleThread *_t = static_cast<GenerateMultipleThread *>(_o);
switch (_id) {
case 0: _t->timetableStarted((*reinterpre... | false | false | false | false | false | 0 |
pop_best_coalesce (coalesce_list_p cl, int *p1, int *p2)
{
coalesce_pair_p node;
int ret;
if (cl->sorted == NULL)
return pop_cost_one_pair (cl, p1, p2);
if (cl->num_sorted == 0)
return pop_cost_one_pair (cl, p1, p2);
node = cl->sorted[--(cl->num_sorted)];
*p1 = node->first_element;
*p2 = node->... | false | false | false | false | false | 0 |
em28xx_attach_xc3028(u8 addr, struct em28xx *dev)
{
struct dvb_frontend *fe;
struct xc2028_config cfg;
struct xc2028_ctrl ctl;
memset(&cfg, 0, sizeof(cfg));
cfg.i2c_adap = &dev->i2c_adap[dev->def_i2c_bus];
cfg.i2c_addr = addr;
memset(&ctl, 0, sizeof(ctl));
em28xx_setup_xc3028(dev, &ctl);
cfg.ctrl = &ctl;
... | false | false | false | false | false | 0 |
utf8_string(gchar *string)
{
gchar *utf8 = NULL;
if ( g_utf8_validate(string, -1, NULL)
|| (utf8 = g_locale_to_utf8(string, -1, NULL, NULL, NULL)) == NULL
)
utf8 = g_strdup(string);
return utf8;
} | false | false | false | false | false | 0 |
test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam,
const bt2_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
H5B2_t... | false | false | false | false | false | 0 |
alloc_key(struct ssh_cipher_struct *cipher) {
cipher->key = malloc(cipher->keylen);
if (cipher->key == NULL) {
return -1;
}
return 0;
} | false | false | false | false | false | 0 |
setattr_chown(struct inode *inode, struct iattr *attr)
{
struct gfs2_inode *ip = GFS2_I(inode);
struct gfs2_sbd *sdp = GFS2_SB(inode);
kuid_t ouid, nuid;
kgid_t ogid, ngid;
int error;
struct gfs2_alloc_parms ap;
ouid = inode->i_uid;
ogid = inode->i_gid;
nuid = attr->ia_uid;
ngid = attr->ia_gid;
if (!(attr-... | false | false | false | false | false | 0 |
set_powered(struct connman_technology *technology,
DBusMessage *msg, connman_bool_t powered)
{
DBusMessage *reply = NULL;
int err = 0;
if (technology->rfkill_driven && technology->hardblocked == TRUE) {
err = -EACCES;
goto make_reply;
}
if (powered == TRUE)
err = technology_enable(technology);
else
... | false | false | false | false | false | 0 |
areInputsLegal()
{
bool inputsAreValid = true;
if( demandFile.size() == 0 )
{
std::cerr << "NULL demand file" << std::endl;
inputsAreValid = false;
}
if(weatherFileNames.size() == 0 )
{
std::cerr << "No weather files" << std::endl;
inputsAreValid ... | false | false | false | false | false | 0 |
cell(idx_type)
{
static MathData dummyCell(&buffer());
LYXERR0("I don't have any cell");
return dummyCell;
} | false | false | false | false | false | 0 |
paint(QPainter* p, const QRect& r)
{
p->drawPixmap(r.topLeft(), m_tiles[TopLeftCorner]);
if (r.width() - 16 > 0) {
p->drawTiledPixmap(r.x() + 8, r.y(), r.width() - 16, 8, m_tiles[TopSide]);
}
p->drawPixmap(r.right() - 8 + 1, r.y(), m_tiles[TopRightCorner]);
if (r.... | false | false | false | false | false | 0 |
open64_w(const char *path, int oflag, int mode)
{
int fd = open64(path, oflag, mode);
if (fd == -1) return -1;
/* If the open succeeded, the file might still be a directory */
{
int st_mode;
if (sysFfileMode(fd, &st_mode) != -1) {
if ((st_mode & S_IFMT) == S_IFDIR) {
... | false | false | false | false | false | 0 |
main(int argc, char** argv) {
g_progname = argv[0];
const char* ebuf = kc::getenv("KTRNDSEED");
g_randseed = ebuf ? (uint32_t)kc::atoi(ebuf) : (uint32_t)(kc::time() * 1000);
mysrand(g_randseed);
g_memusage = memusage();
kc::setstdiobin();
if (argc < 2) usage();
int32_t rv = 0;
if (!std::strcmp(argv[1]... | false | false | false | false | false | 0 |
intel_crc_pmic_update_aux(struct regmap *regmap, int reg, int raw)
{
return regmap_write(regmap, reg, raw) ||
regmap_update_bits(regmap, reg - 1, 0x3, raw >> 8) ? -EIO : 0;
} | false | false | false | false | false | 0 |
g15_recv(int sock, char *buf, unsigned int len)
{
int total = 0;
int retval = 0;
int bytesleft = len;
struct pollfd pfd[1];
while(total < len && !leaving) {
memset(pfd,0,sizeof(pfd));
pfd[0].fd = sock;
pfd[0].events = POLLIN;
if(poll(pfd,1,500)>0){
... | false | false | false | false | false | 0 |
_unpack_will_run_response_msg(will_run_response_msg_t ** msg_ptr, Buf buffer,
uint16_t protocol_version)
{
will_run_response_msg_t *msg;
uint32_t count, i, uint32_tmp, *job_id_ptr;
msg = xmalloc(sizeof(will_run_response_msg_t));
safe_unpack32(&msg->job_id, buffer);
safe_unpack32(&msg->proc_cnt, buffer);
... | false | false | false | false | false | 0 |
start_filter(const char *prog, pid_t *pidptr)
{
pid_t p;
int pipefd[2];
/* Prepare an empty directory for the filter. */
rmdir_contents(SUBTMPDIR);
mkdir(SUBTMPDIR, 0700);
if (pipe(pipefd) < 0)
{
perror("pipe");
return (-1);
}
p=fork();
if (p < 0)
{
close(pipefd[0]);
close(pipefd[1]);
perror("f... | false | false | false | false | true | 1 |
aci(char *p)
{ int j;
for (j=0; j<6; j++) if (!ISHAL(*(p+j))) break;
if (*(p+j) == 'i') return(TRUE);
else return(FALSE);
} | false | false | false | false | false | 0 |
ast_aoc_s_add_rate_volume(struct ast_aoc_decoded *decoded,
enum ast_aoc_s_charged_item charged_item,
enum ast_aoc_volume_unit volume_unit,
unsigned int amount,
enum ast_aoc_currency_multiplier multiplier,
const char *currency_name)
{
struct ast_aoc_s_entry entry = { 0, };
entry.charged_item = charged_item;
ent... | false | false | false | false | false | 0 |
pdf_image_plane_data_alt(gx_image_enum_common_t * info,
const gx_image_plane_t * planes, int height,
int *rows_used, int alt_writer_index)
{
pdf_image_enum *pie = (pdf_image_enum *) info;
int h = height;
int y;
/****** DOESN'T HANDLE IMAGES WITH VARYING WIDTH PE... | false | false | false | false | false | 0 |
parport_mos7715_frob_control(struct parport *pp,
unsigned char mask,
unsigned char val)
{
struct mos7715_parport *mos_parport = pp->private_data;
__u8 dcr;
mask &= 0x0f;
val &= 0x0f;
if (parport_prologue(pp) < 0)
return 0;
mos_parport->shadowDCR = (mos_parport->shadowDCR & (~mask)) ^ val;
writ... | false | false | false | false | false | 0 |
doPosteriors(const nor_utils::Args& args)
{
VJCascadeClassifier classifier(args, _verbose);
//int numofargs = args.getNumValues( "posteriors" );
// -posteriors <dataFile> <shypFile> <outFile> <numIters>
string testFileName = args.getValue<string>("posteriors", 0);
string shypFileName = args.getValue<string>(... | false | false | false | false | false | 0 |
Togl_PostOverlayRedisplay(Togl *togl)
{
if (!togl->OverlayUpdatePending
&& togl->OverlayWindow && togl->OverlayDisplayProc) {
Tk_DoWhenIdle(RenderOverlay, (ClientData) togl);
togl->OverlayUpdatePending = True;
}
} | false | false | false | false | false | 0 |
gt_seqorder_output(unsigned long seqnum, GtEncseq *encseq)
{
GtEncseqReader *esr;
unsigned long startpos, len, desclen = 0;
const char *desc = NULL;
unsigned long i;
startpos = gt_encseq_seqstartpos(encseq, seqnum);
len = gt_encseq_seqlength(encseq, seqnum);
gt_xfputc(GT_FASTA_SEPARATOR, stdout);
if (g... | false | false | false | false | false | 0 |
turbo_update_sprite_info(void)
{
struct sprite_params_data *data = sprite_params;
int i;
/* first loop over all sprites and update those whose scanlines intersect ours */
for (i = 0; i < 16; i++, data++)
{
UINT8 *sprite_base = spriteram + 16 * i;
/* snarf all the data */
data->base = sprite_expa... | false | false | false | false | false | 0 |
gameTypeChanged()
{
stopDemo();
if ( allowedToStartNewGame() )
{
setEasy( options->currentItem() == 0 );
startNew( gameNumber() );
}
else
{
// If we're not allowed, reset the option to
// the current number of suits.
options->setCurrentItem( easyRules ? 0... | false | false | false | false | false | 0 |
parse_select(struct expr_t *idndp)
{
struct expr_t *ndp, *sel_ndp, *i1ndp, *i2ndp;
/* build (alloc and copy) select sub expression root */
sel_ndp = alloc_xtnd(__xndi);
__xndi++;
/* side effect of parsing sub expression is advancing global x ndi */
/* returned i1ndp is malloced not built in __exprtab */
if ((i1... | false | false | false | false | false | 0 |
snefru_addn(fingerprint_ty *p, const void *vt, size_t len)
{
const unsigned char *t = vt;
snefru_ty *s;
int n;
int i;
unsigned char newlen;
unsigned char l[64];
unsigned char m[32];
snefru512_word *wm;
snefru512_word *wl;
unsigned char *ctr... | false | false | false | false | false | 0 |
c_parser_objc_class_definition (c_parser *parser, tree attributes)
{
bool iface_p;
tree id1;
tree superclass;
if (c_parser_next_token_is_keyword (parser, RID_AT_INTERFACE))
iface_p = true;
else if (c_parser_next_token_is_keyword (parser, RID_AT_IMPLEMENTATION))
iface_p = false;
else
gcc_unreacha... | false | false | false | false | false | 0 |
ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw)
{
unsigned i;
ffi_type **tp = cif->arg_types;
for (i = 0; i < cif->nargs; i++, tp++, args++)
{
switch ((*tp)->type)
{
case FFI_TYPE_UINT8:
(raw++)->uint = *(UINT8*) (*args);
break;
case FFI_TYPE_SINT8:
(raw++)->sint = *(SINT8... | false | false | false | false | false | 0 |
unzipToMemory(__GPRO__ char *zip, char *file, UzpBuffer *retstr)
{
int r;
char *incname[2];
if ((zip == NULL) || (strlen(zip) > ((WSIZE>>2) - 160)))
return PK_PARAM;
if ((file == NULL) || (strlen(file) > ((WSIZE>>2) - 160)))
return PK_PARAM;
G.process_all_files = FALSE;
G.extra... | true | true | false | false | false | 1 |
fimc_clk_get(struct fimc_dev *fimc)
{
int i, ret;
for (i = 0; i < MAX_FIMC_CLOCKS; i++)
fimc->clock[i] = ERR_PTR(-EINVAL);
for (i = 0; i < MAX_FIMC_CLOCKS; i++) {
fimc->clock[i] = clk_get(&fimc->pdev->dev, fimc_clocks[i]);
if (IS_ERR(fimc->clock[i])) {
ret = PTR_ERR(fimc->clock[i]);
goto err;
}
ret... | false | false | false | false | false | 0 |
view_window_active_image(ViewWindow *vw)
{
if (vw->fs) return vw->fs->imd;
return vw->imd;
} | false | false | false | false | false | 0 |
open_append(file)
char *file;
{
FILE *fp;
if ((fp = fopen(file, "a")) == NULL) {
perror(file);
exit(1);
}
return fp;
} | false | false | false | false | false | 0 |
set_explicit_duration_for_all_locks()
{
int i;
MDL_ticket *ticket;
/*
In the most common case when this function is called list
of transactional locks is bigger than list of locks with
explicit duration. So we start by swapping these two lists
and then move elements from new list of transactional... | false | false | false | false | false | 0 |
map_find_by_archetype(mapstruct *m, int x, int y, const archetype *at) {
if (m == NULL || out_of_map(m, x, y)) {
LOG(llevError, "Present_arch called outside map.\n");
return NULL;
}
FOR_MAP_PREPARE(m, x, y, tmp)
if (tmp->arch == at)
return tmp;
FOR_MAP_FINISH();
... | false | false | false | false | false | 0 |
__qam_31_qammeta(dbp, real_name, buf)
DB *dbp;
char *real_name;
u_int8_t *buf;
{
QMETA30 *oldmeta;
QMETA31 *newmeta;
COMPQUIET(dbp, NULL);
COMPQUIET(real_name, NULL);
newmeta = (QMETA31 *)buf;
oldmeta = (QMETA30 *)buf;
/*
* Copy the fields to their new locations.
* They may overlap so start at the bott... | false | false | false | false | false | 0 |
AcceptSig(int s)
{
for(int i=0; i<waiting_num; i++)
{
if(waiting[i]==this)
continue;
if(waiting[i]->AcceptSig(s)==WANTDIE)
{
while(waiting[i]->waiting_num>0)
{
Job *new_waiting=waiting[i]->waiting[0];
waiting[i]->RemoveWaiting(new_waiting);
AddWaiting(new_waiting);
}
Job... | false | false | false | false | false | 0 |
process_reply(EAP_HANDLER *handler, tls_session_t *tls_session,
REQUEST *request, RADIUS_PACKET *reply)
{
int rcode = RLM_MODULE_REJECT;
VALUE_PAIR *vp;
peap_tunnel_t *t = tls_session->opaque;
if ((debug_flag > 0) && fr_log_fp) {
RDEBUG("Got tunneled reply RADIUS code %d",
reply->code);
debug_pai... | false | false | false | false | false | 0 |
isIncludeFile (const char *const fileName)
{
boolean result = FALSE;
const char *const extension = fileExtension (fileName);
if (Option.headerExt != NULL)
result = stringListExtensionMatched (Option.headerExt, extension);
return result;
} | false | false | false | false | false | 0 |
BoundaryExtractor(vtkPolyData* polyInput, vtkPolyData* boundary)
{
if (polyInput->GetNumberOfCells()==0)
{
return;
}
vtkFeatureEdges *boundaryExtractor = vtkFeatureEdges::New();
boundaryExtractor->BoundaryEdgesOn();
boundaryExtractor->FeatureEdgesOff();
boundaryExtractor->NonManifoldEdgesOff();
... | false | false | false | false | false | 0 |
slot_remove_history()
{
#ifdef _DEBUG
std::cout << "HistorySubMenu::slot_remove_history no = " << m_number_menuitem << std::endl;
#endif
const int i = m_number_menuitem;
CORE::DATA_INFO_LIST info_list;
SESSION::get_history( m_url_history, info_list );
if( (int)info_list.size() <= i ) return;
... | false | false | false | false | false | 0 |
drbd_debugfs_init(void)
{
struct dentry *dentry;
dentry = debugfs_create_dir("drbd", NULL);
if (IS_ERR_OR_NULL(dentry))
goto fail;
drbd_debugfs_root = dentry;
dentry = debugfs_create_file("version", 0444, drbd_debugfs_root, NULL, &drbd_version_fops);
if (IS_ERR_OR_NULL(dentry))
goto fail;
drbd_debugfs_vers... | false | false | false | false | false | 0 |
set_flag(struct isl_arg *decl, unsigned *val, const char *flag,
size_t len)
{
int i;
for (i = 0; decl->u.flags.flags[i].name; ++i) {
if (strncmp(flag, decl->u.flags.flags[i].name, len))
continue;
*val &= ~decl->u.flags.flags[i].mask;
*val |= decl->u.flags.flags[i].value;
return 1;
}
return 0;
} | false | false | false | false | false | 0 |
Proc_1(DS_DATA& dd, REG Rec_Pointer Ptr_Val_Par)
{
REG Rec_Pointer Next_Record = Ptr_Val_Par->Ptr_Comp;
/* == Ptr_Glob_Next */
/* Local variable, initialized with Ptr_Val_Par->Ptr_Comp, */
/* corresponds to "rename" in Ada, "with" in Pascal */
structassign (... | false | false | false | false | false | 0 |
dbsetversion(DBINT version)
{
tdsdump_log(TDS_DBG_FUNC, "dbsetversion(%d)\n", version);
switch (version ) {
case DBVERSION_42:
case DBVERSION_46:
case DBVERSION_100:
case DBVERSION_70:
case DBVERSION_80:
g_dblib_version = version;
return SUCCEED;
default:
break;
}
dbperror(NULL, SYBEIVERS, 0);
retur... | false | false | false | false | false | 0 |
find_in_aPlusBlk( Junction *alt )
#else
find_in_aPlusBlk( alt )
Junction *alt;
#endif
{
require(alt!=NULL&&alt->p2!=NULL, "invalid aPlusBlk");
return find_in_aSubBlk( alt );
} | false | false | false | false | false | 0 |
getMatrix(SoGetMatrixAction *action)
//
////////////////////////////////////////////////////////////////////////
{
int numIndices;
const int *indices;
// Only need to compute matrix if array is a node in middle of
// current path chain. We don't need to push or pop the state,
// since this shouldn... | false | false | false | false | false | 0 |
btrfs_compress_pages(int type, struct address_space *mapping,
u64 start, unsigned long len,
struct page **pages,
unsigned long nr_dest_pages,
unsigned long *out_pages,
unsigned long *total_in,
unsigned long *total_out,
unsigned long max_out)
{
struct list_head *workspace;
int ret;
worksp... | false | false | false | false | false | 0 |
crop_rect_from_surface(SDL_Surface *pSource,
SDL_Rect *pRect)
{
SDL_Surface *pNew = create_surf_with_format(pSource->format,
pRect ? pRect->w : pSource->w,
pRect ? pRect->h : pSource->h,
SDL_SWSURFACE);
if (alphablit(pSource, pRect, pNew, NULL) != 0) {
FREESURFACE(pNew);... | false | false | false | false | false | 0 |
run_udp_server(server_type* server) {
if(server) {
unsigned int cycle=0;
while (1) {
cycle++;
run_events(server);
}
}
} | false | false | false | false | false | 0 |
hasGroupLeftWindow() const {
// try to find _FLUXBOX_GROUP_LEFT atom in window
// if we have one then we have a group left window
int format;
Atom atom_return;
unsigned long num = 0, len = 0;
static Atom group_left_hint = XInternAtom(display(), "_FLUXBOX_GROUP_LEFT", False);
Window *data = ... | false | false | false | false | false | 0 |
note_digest_auth_failure(request_rec *r,
const digest_config_rec *conf,
digest_header_rec *resp, int stale)
{
const char *qop, *opaque, *opaque_param, *domain, *nonce;
/* Setup qop */
if (apr_is_empty_array(conf->qop_list)) {
... | false | false | false | false | false | 0 |
linkdb_final( struct linkdb_node** head )
{
struct linkdb_node *node, *node2;
if( head == NULL ) return;
node = *head;
while( node ) {
node2 = node->next;
aFree( node );
node = node2;
}
*head = NULL;
} | false | false | false | false | false | 0 |
o2hb_region_unpin(const char *region_uuid)
{
struct o2hb_region *reg;
char *uuid;
int found = 0;
assert_spin_locked(&o2hb_live_lock);
list_for_each_entry(reg, &o2hb_all_regions, hr_all_item) {
if (reg->hr_item_dropped)
continue;
uuid = config_item_name(®->hr_item);
if (region_uuid) {
if (strcmp(r... | false | false | false | false | false | 0 |
make_array_region_data_list(Block_var_table *bvt,
Block *block_head,
int kind)
{
Array_region_data *ret = NULL;
Boolean first_array_flag = TRUE;
Array_subscript_info *array_info, *same_array;
if (!bvt->array_sub_info)
return NULL;
for (array_info = bvt->array_sub_info;
... | false | false | false | true | false | 1 |
demangle(const char* name)
{
#ifndef HAVE_CXA_DEMANGLE
char buf[4096];
size_t size = 4096;
int status = 0;
abi::__cxa_demangle(name, buf, &size, &status);
if (status==0)
return std::string(buf);
return std::string(name);
#else
return std::string(name);
#endif
} | false | false | false | false | false | 0 |
drop_widget_init(GtkWidget *widget, drag_data_received_cb callback,
void *user_data)
{
static const GtkTargetEntry targets[] = {
#if GTK_CHECK_VERSION(2,0,0)
{ "UTF8_STRING", 0, 3 },
{ "text/plain;charset=utf-8", 0, 4 },
#endif /* Gtk+ >= 2.0 */
{ "STRING", 0, 1 },
{ "text/plain", 0, 2... | false | false | false | false | false | 0 |
precision(int p) {
A = 1.0;
for (B = 1; p--;) B *= 10;
} | false | false | false | false | false | 0 |
reset() const
{
char v = 0;
while (wait(0)) read(wait_pipe[0], &v, 1);
} | false | false | false | false | false | 0 |
exec_read(struct exec_info *info)
{
int ret=G10ERR_GENERAL;
fclose(info->tochild);
info->tochild=NULL;
if(info->flags.use_temp_files)
{
if(DBG_EXTPROG)
log_debug("system() command is %s\n",info->command);
#if defined (_WIN32)
info->progreturn=win_system(info->command);
#else
info->prog... | 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.