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 |
|---|---|---|---|---|---|---|
mps_parse_file (MpsState *state)
{
gboolean done = FALSE;
readline (state);
while (!done) {
char *line = state->line;
char *section;
unsigned ui;
if (!line) {
/* Ignore missing end marker. */
break;
}
ui = 0;
while (g_ascii_isalnum (line[ui]))
ui++;
section = g_strndup (line, ui);
if ... | false | false | false | false | false | 0 |
processPluginNodes (xmlNode * el, GGobiInitInfo * info, xmlDocPtr doc)
{
int count = 0;
if (el == NULL)
return (-1);
while (el) {
if (processXMLPluginNode (el, info, doc))
count++;
el = el->next;
}
return (count);
} | false | false | false | false | false | 0 |
lips4type_print_page_copies(gx_device_printer * pdev, FILE * prn_stream, int num_copies, int ptype)
{
gx_device_lprn *const lprn = (gx_device_lprn *) pdev;
int code = 0;
int bpl = gdev_mem_bytes_per_scan_line(pdev);
int maxY = lprn->BlockLine / lprn->nBh * lprn->nBh;
/* Initialize printer. */
l... | false | false | false | false | false | 0 |
sLad_make_region(sLad *lad)
{
if (flg_lad_ignore_one_div_num && lad->div_num <= 1) {
return;
}
lad->region_head = make_region(lad);
} | false | false | false | false | false | 0 |
open_tmpfile(char *fnametmp, const char *fname, struct file_struct *file)
{
int fd;
mode_t added_perms;
if (!get_tmpname(fnametmp, fname, False))
return -1;
if (am_root < 0) {
/* For --fake-super, the file must be useable by the copying
* user, just like it would be for root. */
added_perms = S_IRUSR|S_I... | false | false | false | false | false | 0 |
setfriendsrvip_lookup_cb (GtkWidget *entry)
{
struct hostent *hent = NULL;
char *quad;
struct in_addr adr;
hent = gethostbyname (local_config.friends_serverfqn);
if ((NULL != hent) && (AF_INET == hent->h_addrtype))
{
bcopy (hent->h_addr, &adr.s_addr, hent->h_length);
quad = inet_ntoa (adr);
g_strlcpy (loc... | false | true | false | false | false | 1 |
t3_find_res(const void *story_file, int32 story_len,
const char *resname, resinfo *info)
{
const char *basep = (const char *)story_file;
const char *endp = basep + story_len;
const char *p;
size_t resname_len;
/* note the length of the name we're seeking */
resname_len = ... | true | true | false | false | false | 1 |
operator*(const HepDiagMatrix &m1,const HepMatrix &m2)
#ifdef HEP_GNU_OPTIMIZED_RETURN
return mret(m1.num_row(),m2.num_col());
{
#else
{
HepMatrix mret(m1.num_row(),m2.num_col());
#endif
CHK_DIM_1(m1.num_col(),m2.num_row(),*);
HepMatrix::mcIter mit1=m2.m.begin();
HepMatrix::mIter mir=mret.m.begin();
HepM... | false | false | false | false | false | 0 |
parse_minimal_property(CdlInterpreter interp, int argc, const char* argv[], std::string name,
char** options_desc, void (*final_parser)(CdlInterpreter, CdlProperty_Minimal))
{
CYG_REPORT_FUNCNAME("parse_minimal_property");
CYG_PRECONDITION_CLASSC(interp);
CdlProperty_Mi... | false | false | false | false | false | 0 |
displaycall(int call_id)
{
/* FIXME!!! */
#ifndef WIN32
gn_call *call;
struct timeval now, delta;
char *s;
if ((call = gn_call_get_active(call_id)) == NULL) {
fprintf(stdout, _("CALL%d: IDLE\n"), call_id);
return;
}
gettimeofday(&now, NULL);
switch (call->status) {
case GN_CALL_Ringing:
case GN_CALL_Inco... | false | false | false | false | false | 0 |
job_add_as_zombie(lListElem *zombie, lList **answer_list,
u_long32 ja_task_id)
{
lList *z_ids = NULL; /* RN_Type */
DENTER(TOP_LAYER, "job_add_as_zombie");
lXchgList(zombie, JB_ja_z_ids, &z_ids);
range_list_insert_id(&z_ids, NULL, ja_task_id);
range_list_compress(z_ids);
l... | false | false | false | false | false | 0 |
GMT_x_out_of_bounds (GMT_LONG *i, struct GRD_HEADER *h, struct GMT_EDGEINFO *edgeinfo, GMT_LONG wrap_180) {
/* Adjusts the i (x-index) value if we are dealing with some sort of periodic boundary
* condition. If a north or south pole condition we must "go over the pole" and access
* the longitude 180 degrees away - ... | false | false | false | false | false | 0 |
lol_add(
LOL *lol,
LIST *l )
{
if( lol->count < LOL_MAX )
lol->list[ lol->count++ ] = l;
} | false | false | false | false | false | 0 |
gma_crtc_load_lut(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
struct drm_psb_private *dev_priv = dev->dev_private;
struct gma_crtc *gma_crtc = to_gma_crtc(crtc);
const struct psb_offset *map = &dev_priv->regmap[gma_crtc->pipe];
int palreg = map->palette;
int i;
/* The clocks have to be on to lo... | false | false | false | false | false | 0 |
LI44(V453,V454)
object V453;object V454;
{ VMB44 VMS44 VMV44
goto TTL;
TTL:;
V455= list(3,((object)VV[195]),(V453),small_fixnum(0));
{object V456 = list(4,((object)VV[97]),/* INLINE-ARGS */V455,((object)VV[56]),list(3,((object)VV[195]),(V453),list(3,((object)VV[144]),(V453),(V454))));
VMR44(V456)}
return Cnil;
} | false | false | false | false | false | 0 |
krb5int_kt_initialize(void)
{
int err;
err = k5_mutex_finish_init(&kt_typehead_lock);
if (err)
goto done;
err = krb5int_mkt_initialize();
if (err)
goto done;
done:
return(err);
} | false | false | false | false | false | 0 |
syntaxCopy()
{
TypeReturn *t = new TypeReturn(loc);
t->syntaxCopyHelper(this);
t->mod = mod;
return t;
} | false | false | false | false | false | 0 |
gst_stream_splitter_src_event (GstPad * pad, GstEvent * event)
{
GstStreamSplitter *stream_splitter =
(GstStreamSplitter *) GST_PAD_PARENT (pad);
GST_DEBUG_OBJECT (pad, "%s", GST_EVENT_TYPE_NAME (event));
/* Forward upstream as is */
return gst_pad_push_event (stream_splitter->sinkpad, event);
} | false | false | false | false | false | 0 |
start_auth_query(struct AuthRequest *auth)
{
struct rb_sockaddr_storage *localaddr;
struct rb_sockaddr_storage *remoteaddr;
struct rb_sockaddr_storage destaddr;
struct rb_sockaddr_storage bindaddr;
int family;
if(IsAnyDead(auth->client))
return;
sendheader(auth->client, REPORT_DO_ID);
localaddr = auth->cli... | false | false | false | false | false | 0 |
mwifiex_cmd_802_11_mac_address(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
u16 cmd_action)
{
cmd->command = cpu_to_le16(HostCmd_CMD_802_11_MAC_ADDRESS);
cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_802_11_mac_address) +
S_DS_GEN);
cmd->result = 0;
cmd->params.mac_addr.acti... | false | false | false | false | false | 0 |
lbs_fw_loaded(struct lbs_private *priv, int ret,
const struct firmware *helper, const struct firmware *mainfw)
{
unsigned long flags;
lbs_deb_fw("firmware load complete, code %d\n", ret);
/* User must free helper/mainfw */
priv->fw_callback(priv, ret, helper, mainfw);
spin_lock_irqsave(&priv->driver_lock, flag... | false | false | false | false | false | 0 |
ffexist(const char *infile, /* I - input filename or URL */
int *exists, /* O - 2 = a compressed version of file exists */
/* 1 = yes, disk file exists */
/* 0 = no, disk file could not be found */
/* -1 = infile is... | false | false | false | false | false | 0 |
mmc_regulator_get_ocrmask(struct regulator *supply)
{
int result = 0;
int count;
int i;
int vdd_uV;
int vdd_mV;
count = regulator_count_voltages(supply);
if (count < 0)
return count;
for (i = 0; i < count; i++) {
vdd_uV = regulator_list_voltage(supply, i);
if (vdd_uV <= 0)
continue;
vdd_... | false | false | false | false | false | 0 |
valid_wild_card_simple(const char *data)
{
const char *p;
char tmpch;
int nonwild = 0;
int wild = 0;
/* check the string for minimum number of nonwildcard chars */
p = data;
while((tmpch = *p++))
{
/* found an escape, p points to the char after it, so skip
* that and move on.
*/
if(tmpch == '\\' && ... | false | false | false | false | false | 0 |
setup_reg_spill_flag (void)
{
int cl, mode;
if (targetm.spill_class != NULL)
for (cl = 0; cl < (int) LIM_REG_CLASSES; cl++)
for (mode = 0; mode < MAX_MACHINE_MODE; mode++)
if (targetm.spill_class ((enum reg_class) cl,
(enum machine_mode) mode) != NO_REGS)
{
lra_reg_spill_p = true;
retu... | false | false | false | false | false | 0 |
remHandler(
ArRetFunctor1<bool, ArArgumentBuilder *> *functor)
{
std::map<std::string, HandlerCBType *, ArStrCaseCmpOp>::iterator it;
HandlerCBType *handler;
if (myRemainderHandler != NULL && myRemainderHandler->haveFunctor(functor))
{
delete myRemainderHandler;
myRemainderHandler = NULL;
ArLog::l... | false | false | false | false | false | 0 |
gth_color_scale_init (GthColorScale *self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GTH_TYPE_COLOR_SCALE, GthColorScalePrivate);
self->priv->surface = NULL;
self->priv->width = -1;
self->priv->height = -1;
self->priv->slider.x = 0;
self->priv->slider.y = 0;
self->priv->slider.width = 0;
self->priv->sli... | false | false | false | false | false | 0 |
bt_discount_pescore(WCHMM_INFO *wchmm, BACKTRELLIS *bt, HTK_Param *param)
{
int t,i;
TRELLIS_ATOM *tre;
if (bt->num == NULL) return;
for (t=0; t<bt->framelen; t++) {
for (i=0; i<bt->num[t]; i++) {
tre = bt->rw[t][i];
/* On normal version, both language score and the output prob. score
at t... | false | false | false | false | false | 0 |
stdout_open(/*@unused@*/ enum plugout_endian endian,
/*@unused@*/ long rate)
{
/*
* clone and close STDOUT_FILENO
* to make sure nobody else can write to stdout
*/
fd = dup(STDOUT_FILENO);
if (fd == -1) return -1;
(void)close(STDOUT_FILENO);
return 0;
} | false | false | false | false | false | 0 |
http_close(git_smart_subtransport *subtransport)
{
http_subtransport *t = (http_subtransport *) subtransport;
git_http_auth_context *context;
size_t i;
clear_parser_state(t);
if (t->socket.socket) {
gitno_close(&t->socket);
memset(&t->socket, 0x0, sizeof(gitno_socket));
}
if (t->cred) {
t->cred->free(t-... | false | false | false | false | false | 0 |
parseMacros(Escape **pescapetable, Macro **pmacrotable, utf8_t *m, size_t mlen)
{
utf8_t *p = m;
size_t len = mlen;
utf8_t *pend = p + len;
utf8_t *tempstart;
size_t templen;
utf8_t *namestart;
size_t namelen = 0; // !=0 if line continuation
utf8_t *textstart;
size_t textlen... | false | false | false | false | false | 0 |
revoke_print(struct revoke_print_options *opt, int argc, char **argv)
{
hx509_revoke_ctx revoke_ctx;
int ret;
ret = hx509_revoke_init(context, &revoke_ctx);
if (ret)
errx(1, "hx509_revoke_init: %d", ret);
while(argc--) {
char *s = *argv++;
if (strncmp(s, "crl:", 4) == 0) {
s += 4;
r... | false | false | false | false | false | 0 |
ast_audiohook_update_status(struct ast_audiohook *audiohook, enum ast_audiohook_status status)
{
ast_audiohook_lock(audiohook);
if (audiohook->status != AST_AUDIOHOOK_STATUS_DONE) {
audiohook->status = status;
ast_cond_signal(&audiohook->trigger);
}
ast_audiohook_unlock(audiohook);
} | false | false | false | false | false | 0 |
plugin_cleanup(void)
{
/* stop debugger if running */
if (DBS_IDLE != debug_get_state())
{
debug_stop();
while (DBS_IDLE != debug_get_state())
g_main_context_iteration(NULL,FALSE);
}
config_destroy();
pixbufs_destroy();
debug_destroy();
breaks_destroy();
dpaned_destroy();
envtree_destroy();
/* rele... | false | false | false | false | false | 0 |
init_diff_tree(void)
{
PyObject *m, *objects_mod = NULL, *diff_tree_mod = NULL;
PyObject *block_size_obj = NULL;
m = Py_InitModule("_diff_tree", py_diff_tree_methods);
if (!m)
goto error;
objects_mod = PyImport_ImportModule("dulwich.objects");
if (!objects_mod)
goto error;
tree_entry_cls = PyObject_... | false | false | false | false | false | 0 |
set_fan_div(struct device *dev,
struct device_attribute *devattr, const char *buf, size_t count)
{
struct adm1029_data *data = dev_get_drvdata(dev);
struct i2c_client *client = data->client;
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
u8 reg;
long val;
int ret = kstrtol(buf, 10, &val)... | false | false | false | false | false | 0 |
Mask_mask5(int width, const unsigned char *s, unsigned char *d)
{
MASKMAKER(((x*y)&1)+(x*y)%3)
} | false | false | false | false | false | 0 |
sdb_system_get_normalized_cflags (const gchar *chars)
{
gchar **flags;
gint i;
GList *good_flags;
const gchar *curr_flag;
/* We should receive here something like
* '-I/usr/include/gimp-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include'.
* Split up the chars and take a decision if we like it or not.
*/... | false | false | false | false | false | 0 |
xsltCopyComp(xsltStylesheetPtr style, xmlNodePtr inst) {
#ifdef XSLT_REFACTORED
xsltStyleItemCopyPtr comp;
#else
xsltStylePreCompPtr comp;
#endif
if ((style == NULL) || (inst == NULL))
return;
#ifdef XSLT_REFACTORED
comp = (xsltStyleItemCopyPtr) xsltNewStylePreComp(style, XSLT_FUNC_COPY);
#else
co... | false | false | false | false | false | 0 |
function_property_names (sqlite3_context *context,
int argc,
sqlite3_value *argv[])
{
static gchar **names = NULL;
static gsize names_initialized = 0;
if (g_once_init_enter (&names_initialized)) {
GPtrArray *names_array;
sqlite3_stmt *stmt;
sqli... | false | false | false | false | false | 0 |
copy_files_to_folder (GthBrowser *browser,
GList *files,
gboolean move,
char *destination_uri,
gboolean view_destination)
{
GthFileData *destination_data;
GthFileSource *file_source;
CopyToFolderData *data;
GthTask *task;
destination_data = gth_fil... | false | false | false | false | false | 0 |
icell_get_attribute (IAnjutaEditorCell *icell, GError **e)
{
TextEditorCell* cell = TEXT_EDITOR_CELL(icell);
IAnjutaEditorAttribute attrib = IANJUTA_EDITOR_TEXT;
TextEditorAttrib text_attrib =
text_editor_get_attribute (cell->priv->editor, cell->priv->position);
switch (text_attrib)
{
case TEXT_EDITOR_ATTRIB_T... | false | false | false | false | false | 0 |
multicast_rtp_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
{
char *tmp = ast_strdupa(data), *multicast_type = tmp, *destination, *control;
struct ast_rtp_instance *instance;
struct ast_sockaddr control_address;
struct ast_sockaddr destinati... | false | false | false | false | false | 0 |
xmms_statfs_is_remote (const gchar *path)
{
struct statfs st;
if (statfs (path, &st) == -1) {
xmms_log_error ("Failed to run statfs, will not guess.");
return FALSE;
}
if (st.f_type == 0xFF534D42 || /* cifs */
st.f_type == 0x6969 || /* nfs */
st.f_type == 0x517B) { /* smb */
return TRUE;
}
retu... | false | false | false | false | false | 0 |
IgnoreCalculation(int a, int b)
{
if (!_ignoreAtom)
return false;
if (_ignoreAtom == a)
return true;
if (_ignoreAtom == b)
return true;
return false;
} | false | false | false | false | false | 0 |
PyImport_AddModule(const char *name)
{
PyObject *nameobj, *module;
nameobj = PyUnicode_FromString(name);
if (nameobj == NULL)
return NULL;
module = PyImport_AddModuleObject(nameobj);
Py_DECREF(nameobj);
return module;
} | false | false | false | false | false | 0 |
main_request(struct view *view, enum request request, struct line *line)
{
enum open_flags flags = view_is_displayed(view) ? OPEN_SPLIT : OPEN_DEFAULT;
switch (request) {
case REQ_ENTER:
if (view_is_displayed(view) && display[0] != view)
maximize_view(view, TRUE);
open_view(view, REQ_VIEW_DIFF, flags);
bre... | false | false | false | false | false | 0 |
fil_space_reserve_free_extents(
/*===========================*/
ulint id, /*!< in: space id */
ulint n_free_now, /*!< in: number of free extents now */
ulint n_to_reserve) /*!< in: how many one wants to reserve */
{
fil_space_t* space;
ibool success;
ut_ad(fil_system);
mutex_enter(&fil_system->mutex);
spac... | false | false | false | false | false | 0 |
get_hash_info(void)
{
PyObject *hash_info;
int field = 0;
hash_info = PyStructSequence_New(&Hash_InfoType);
if (hash_info == NULL)
return NULL;
PyStructSequence_SET_ITEM(hash_info, field++,
PyLong_FromLong(8*sizeof(Py_hash_t)));
PyStructSequence_SET_ITEM(has... | false | false | false | false | true | 1 |
gst_color_balance_base_init (GstColorBalanceInterface * iface)
{
static gboolean initialized = FALSE;
if (!initialized) {
/**
* GstColorBalance::value-changed:
* @colorbalance: The GstColorBalance instance
* @channel: The #GstColorBalanceChannel
* @value: The new value
*
* Fired w... | false | false | false | false | false | 0 |
typeMatches(const StringMap &props) const
{
StringMap::const_iterator it = props.find("urn:ietf:params:xml:ns:caldav:supported-calendar-component-set");
if (it != props.end() &&
it->second.find("<urn:ietf:params:xml:ns:caldavcomp name='VEVENT'></urn:ietf:params:xml:ns:caldavcomp>") != std::string::npos)... | false | false | false | false | false | 0 |
item_height(void *item) const {
FL_BLINE* l = (FL_BLINE*)item;
if (l->flags & NOTDISPLAYED) return 0;
int hmax = 2; // use 2 to insure we don't return a zero!
if (!l->txt[0]) {
// For blank lines set the height to exactly 1 line!
fl_font(textfont(), textsize());
int hh = fl_height();
if (hh > ... | false | false | false | false | false | 0 |
gifAddData(pointer, data, len, data_ended)
void *pointer;
byte *data;
int len;
bool data_ended;
{
gifState *gs = (gifState *)pointer;
int rval;
int pos;
gs->data = data;
gs->datalen = len;
for ( ; ; )
{
pos = gs->pos; /* save in case we need to rewind */
switch (gs->state)
{
case GS_RE... | false | false | false | false | false | 0 |
mmc_audio_get_volume( CdIo_t *p_cdio, /*out*/ mmc_audio_volume_t *p_volume )
{
uint8_t buf[16];
int i_rc = mmc_mode_sense(p_cdio, buf, sizeof(buf), CDIO_MMC_AUDIO_CTL_PAGE);
if ( DRIVER_OP_SUCCESS == i_rc ) {
p_volume->port[0].selection = 0xF & buf[8];
p_volume->port[0].volume = buf[9];
p_volume... | false | false | false | false | false | 0 |
gx_pattern_accum_finalize_cw(gx_device * dev)
{
gx_device_clist_writer *cwdev = (gx_device_clist_writer *)dev;
rc_decrement_only(cwdev->target, "gx_pattern_accum_finalize_cw");
} | false | false | false | false | false | 0 |
write_new_stack_dword_32(bx_segment_reg_t *seg, Bit32u offset, unsigned curr_pl, Bit32u data)
{
Bit32u laddr;
if (seg->cache.valid & SegAccessWOK) {
if (offset < (seg->cache.u.segment.limit_scaled-2)) {
accessOK:
laddr = (Bit32u)(seg->cache.u.segment.base) + offset;
bx_bool user = (curr_pl == 3);
... | false | false | false | false | false | 0 |
map(void)
{
if (mapped()==MSFalse)
{
_mapped=MSTrue;
if (firstMap()==MSFalse) firstMap(MSTrue);
childMapNotify();
if (_window!=0) XMapWindow(display(),_window);
MSWidget *p=_owner;
MSBoolean unobscured=MSTrue;
for (;p!=0;p=p->_owner)
{
if (p->mapped()==MSFalse)
{... | false | false | false | false | false | 0 |
deccall2(decimal *arg1, decimal *arg2, int (*ptr) (numeric *, numeric *))
{
numeric *a1,
*a2;
int i;
if ((a1 = PGTYPESnumeric_new()) == NULL)
return ECPG_INFORMIX_OUT_OF_MEMORY;
if ((a2 = PGTYPESnumeric_new()) == NULL)
{
PGTYPESnumeric_free(a1);
return ECPG_INFORMIX_OUT_OF_MEMORY;
}
if (PGTYP... | false | false | false | false | false | 0 |
e_cal_discard_alarm (ECal *ecal,
ECalComponent *comp,
const gchar *auid,
GError **error)
{
g_return_val_if_fail (E_IS_CAL (ecal), FALSE);
g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), FALSE);
g_return_val_if_fail (auid != NULL, FALSE);
g_set_error (... | false | false | false | false | false | 0 |
istgt_destory_initiator_group_array(ISTGT_Ptr istgt)
{
int i, j;
ISTGT_TRACELOG(ISTGT_TRACE_DEBUG, "istgt_destory_initiator_group_array\n");
for (i = 0; i < istgt->ninitiator_group; i++) {
for (j = 0; j < istgt->initiator_group[i].ninitiators; j++) {
xfree(istgt->initiator_group[i].initiators[j]);
}
xfree(... | false | false | false | false | false | 0 |
evaluate(const DipoleSplittingInfo& split) const {
double ret = alphaPDF(split);
// masses
double muQ2 = sqr( split.emitterData()->mass() / split.scale() );
double muj2 = sqr( split.spectatorData()->mass() / split.scale() );
double z = split.lastZ();
double y = ( sqr(split.lastPt()/split.scale()) + m... | false | false | false | false | false | 0 |
L25()
{register object *base=vs_base;
register object *sup=base+VM25; VC25
vs_check;
{object V204;
object V205;
object V206;
V204=(base[0]);
V205=(base[1]);
V206=(base[2]);
vs_top=sup;
goto TTL;
TTL:;
{register object V207;
V207= Cnil;
{object V208;
V208= ((V206))->v.v_self[(long)60];
V207= (
V209 = CMP... | false | false | false | false | false | 0 |
autohelperbarrierspat151(int trans, int move, int color, int action)
{
int a, b;
UNUSED(color);
UNUSED(action);
a = AFFINE_TRANSFORM(721, trans, move);
b = AFFINE_TRANSFORM(722, trans, move);
if (!false_eye_territory[a]) influence_mark_non_territory(a, color);if (!false_eye_territory[b]) influence_mark_no... | false | false | false | false | false | 0 |
p_apply_callback(GtkWidget *w, GapBlueboxGlobalParams *bbp)
{
if(bbp)
{
if(!bbp->instant_preview)
{
p_set_waiting_cursor(bbp);
}
bbp->layer_id = bbp->drawable_id;
if(!gap_bluebox_apply(bbp))
{
p_quit_callback(NULL, bbp);
}
bbp->layer_id = -1;
p_set_active_c... | false | false | false | false | false | 0 |
hashbufin_add_cookie(ssh_session session, unsigned char *cookie) {
session->in_hashbuf = ssh_buffer_new();
if (session->in_hashbuf == NULL) {
return -1;
}
if (buffer_add_u8(session->in_hashbuf, 20) < 0) {
buffer_reinit(session->in_hashbuf);
return -1;
}
if (buffer_add_data(session->in_hashbuf,c... | false | false | false | false | false | 0 |
filtered_base_yylex(void)
{
int cur_token;
int next_token;
YYSTYPE cur_yylval;
YYLTYPE cur_yylloc;
/* Get next token --- we might already have it */
if (have_lookahead)
{
cur_token = lookahead_token;
base_yylval = lookahead_yylval;
base_yylloc = lookahead_yylloc;
have_lookahead = false;
}
else
... | false | false | false | false | false | 0 |
e2_view_dialog_toggled (GtkWidget *button, gboolean *store)
{
*store = GTK_TOGGLE_BUTTON (button)->active;
//whole-word and case-match buttons need extra handling
E2_ViewDialogRuntime *rt = g_object_get_data (G_OBJECT (button), "e2_dlg_runtime");
if (rt != NULL)
rt->research = TRUE; //trigger re-highlighting of m... | false | false | false | false | false | 0 |
K054157_reset_linescroll(void)
{
int layer;
int mode = K054157_regs[5];
for(layer=0; layer < 4; layer++) {
int lmode = (mode >> (layer << 1)) & 3;
switch(lmode) {
case 0:
if(K054157_tilemap[layer] == K054157_tilemaps[layer]) {
K054157_linescroll_updater[layer] = K054157_lsu_1_256;
tilemap_... | false | false | false | false | false | 0 |
asEVAL() { /* load and eval stack element */
if (!newBasicBlock && instrAt(lastInstr)==iLOAD)
/* Peephole optimisation: */
instrAt(lastInstr) = iLEVAL; /* LOAD n; EVAL ===> LEVAL n */
else
instrNone(iEVAL);
srsp--;
} | false | false | false | false | false | 0 |
addstatic(GLOBAL *sp)
{
GLOBAL **stp;
if (staticavail <= 0) {
if (staticcount <= 0)
stp = (GLOBAL **) malloc(20 * sizeof(GLOBAL *));
else
stp = (GLOBAL **) realloc(statictable,
(20 + staticcount) * sizeof(GLOBAL *));
if (stp == NULL) {
math_error("Cannot allocate static-variable table");
/*NOT... | false | false | false | true | false | 1 |
_gnutls_openpgp_privkey_get_mpis (gnutls_openpgp_privkey_t pkey,
uint32_t * keyid /*[2] */ ,
bigint_t * params, int *params_size)
{
int result, i;
int pk_algorithm;
gnutls_pk_params_st pk_params;
cdk_packet_t pkt;
memset (&pk_params, 0, size... | false | false | false | false | false | 0 |
run_tmds_table(struct drm_device *dev, struct dcb_output *dcbent, int head, int pxclk)
{
/*
* the pxclk parameter is in kHz
*
* This runs the TMDS regs setting code found on BIT bios cards
*
* For ffs(or) == 1 use the first table, for ffs(or) == 2 and
* ffs(or) == 3, use the second.
*/
struct nouveau_d... | false | false | false | false | false | 0 |
decrypt(char *mykey, char *name){
uchar expkey[4*Nb*(Nr+1)];
FILE *fd = fopen(name, "rb");
int ch, idx = 0;
strncpy(key, mykey, sizeof(key));
ExpandKey(key, expkey);
while(ch = getc(fd), ch != EOF){
in[idx++] = ch;
if(idx%16){
continue;
}
Decrypt(in, expkey, out);
for(idx=0; idx<1... | false | true | false | false | true | 1 |
collect_tscs(void *data)
{
unsigned long *cpu_tsc = (unsigned long *)data;
cpu_tsc[smp_processor_id()] = rdtsc();
} | false | false | false | false | false | 0 |
PCMPGTB_PqQq(bxInstruction_c *i)
{
#if BX_SUPPORT_MMX
BX_CPU_THIS_PTR prepareMMX();
BxPackedMmxRegister op1 = BX_READ_MMX_REG(i->nnn()), op2;
/* op2 is a register or memory reference */
if (i->modC0()) {
op2 = BX_READ_MMX_REG(i->rm());
}
else {
bx_address eaddr = BX_CPU_CALL_METHODR(i->ResolveModr... | false | false | false | false | false | 0 |
reverse_transformation(RouterT *r, ErrorHandler *)
{
// parse fastclassifier_config
if (r->archive_index("fastclassifier_info") < 0)
return;
ArchiveElement &fc_ae = r->archive("fastclassifier_info");
Vector<String> click_names, old_type_names, configurations;
parse_tabbed_lines(fc_ae.data, &click_names, &... | false | false | false | false | false | 0 |
rb_refstring_get_folded (RBRefString *val)
{
gpointer *ptr;
const char *string;
if (val == NULL)
return NULL;
ptr = &val->folded;
string = (const char*)g_atomic_pointer_get (ptr);
if (string == NULL) {
char *newstring;
newstring = rb_search_fold (rb_refstring_get (val));
if (g_atomic_pointer_compare_an... | false | false | false | false | false | 0 |
GenerateGridNeighborhoodTraversalTable()
{
int xChild, yChild, zChild;
int xCursor, yCursor, zCursor;
int xNeighbor, yNeighbor, zNeighbor;
int xNewCursor, yNewCursor, zNewCursor;
int xNewChild, yNewChild, zNewChild;
int cursor, child, newCursor, newChild;
int numCursors;
int xChildDim, yChildDim, zChil... | false | false | false | false | false | 0 |
partsEditorHelp() {
QDir * dir = FolderUtils::getApplicationSubFolder("help");
QString path = dir->absoluteFilePath("parts_editor_help.html");
if (QFileInfo(path).exists()) {
QDesktopServices::openUrl(QString("file:///%1").arg(path));
}
} | false | false | false | false | false | 0 |
hoist_update_store (rtx insn, rtx *xp, rtx val, rtx new)
{
rtx x = *xp;
if (GET_CODE (x) == SCRATCH)
return;
if (GET_CODE (x) == SUBREG && SUBREG_REG (x) == val)
validate_change (insn, xp,
simplify_gen_subreg (GET_MODE (x), new, GET_MODE (new),
SUBREG_BYTE (x)), 1);
if (rtx_equal_p (x, v... | false | false | false | false | false | 0 |
hp_wmi_rfkill2_setup(struct platform_device *device)
{
int err, i;
struct bios_rfkill2_state state;
err = hp_wmi_perform_query(HPWMI_WIRELESS2_QUERY, 0, &state,
0, sizeof(state));
if (err)
return err;
if (state.count > HPWMI_MAX_RFKILL2_DEVICES) {
pr_warn("unable to parse 0x1b query output\n");
retur... | false | false | false | false | false | 0 |
add_rule(char *match, const char *name, const char *rule)
{
if (!rule)
return match;
if (rule[0] == '*' && rule[1] == 0)
return match;
if (match)
match = GB.AddChar(match, ',');
match = GB.AddString(match, name, 0);
match = GB.AddString(match, "='", 2);
match = GB.AddString(match, rule, 0);
match = G... | false | false | false | false | false | 0 |
isValidCVC(ConSeq c1, VowelSeq v, ConSeq c2)
{
if (v == vs_nil)
return (c1 == cs_nil || c2 != cs_nil);
if (c1 == cs_nil)
return isValidVC(v, c2);
if (c2 == cs_nil)
return isValidCV(c1, v);
bool okCV = isValidCV(c1, v);
bool okVC = isValidVC(v, c2);
if (okCV && okVC)
... | false | false | false | false | false | 0 |
CheckLineForDirective( const string &line, string& directive )
{
directive.clear();
const unsigned int DIRECTIVE_START=14;
if ( line.size( ) >= DIRECTIVE_START && line[0] == '/'
&& strncmp( line.c_str(), "// MakeDepend:", DIRECTIVE_START) == 0)
directive = line.substr(DIRECTIVE_START);
return ( ! ... | false | false | false | false | false | 0 |
readAppSeg(uint16 marker, tsize_t length)
{
ExifStatus status = EXIF_OK;
exifoff_t offsetToThisMarker = mExifio->seek(0,SEEK_CUR) - 4;
// read the identifier, usually is 5 (App0-JFIF) or 6 bytes
// but not restricted to it. They always end in at least one NULL
// Note that we're limiting the identi... | false | false | false | false | false | 0 |
libuna_utf32_stream_size_from_utf8(
const libuna_utf8_character_t *utf8_string,
size_t utf8_string_size,
size_t *utf32_stream_size,
libcerror_error_t **error )
{
static char *function = "libuna_utf32_stream_size_from_utf8";
size_t utf8_string_index = 0;
... | false | false | false | false | false | 0 |
kmclipm_set_cal_path(const char *path, int test_mode)
{
cpl_error_code err = CPL_ERROR_NONE;
KMCLIPM_TRY
{
/* check inputs */
KMCLIPM_TRY_CHECK_AUTOMSG(path != NULL,
CPL_ERROR_NULL_INPUT);
KMCLIPM_TRY_CHECK_AUTOMSG((test_mode == TRUE) ||
... | false | false | false | false | false | 0 |
ario_radio_cmd_delete_radios (GtkAction *action,
ArioRadio *radio)
{
ARIO_LOG_FUNCTION_START;
GSList *internet_radios = NULL;
GtkWidget *dialog;
gint retval = GTK_RESPONSE_NO;
/* Create confirmation dialog window */
dialog = gtk_message_dial... | false | false | false | false | false | 0 |
gdome_xml_a_unref_ns (GdomeNode *self, GdomeException *exc) {
Gdome_xml_Attr *priv = (Gdome_xml_Attr *)self;
g_return_if_fail (priv != NULL);
g_return_if_fail (GDOME_XML_IS_A (priv));
g_return_if_fail (exc != NULL);
if (priv->refcnt > 0)
priv->refcnt--;
if (priv->refcnt == 0) {
gdome_treegc_delNode (self);... | false | false | false | false | false | 0 |
config_parser_handle_string(struct list_head *head, void *data)
{
struct ptoken *t, *first;
char **target = data;
char *tmp;
first = list_entry(head->next, struct ptoken, list);
t = config_token_after_equal(head);
if(!t) {
logg(LOGF_NOTICE, "Parsing config file %s@%zu: Option \"%s\" wants a value assigned, wil... | false | true | false | false | false | 1 |
AH_Msg_SequenceCheck(GWEN_DB_NODE *gr) {
GWEN_DB_NODE *n;
unsigned int sn;
unsigned int errors;
DBG_DEBUG(AQHBCI_LOGDOMAIN, "Sequence check");
sn=1;
errors=0;
n=GWEN_DB_GetFirstGroup(gr);
while(n) {
unsigned int rsn;
rsn=GWEN_DB_GetIntValue(n, "head/seq", 0, 0);
if (rsn<900) {
if (r... | false | false | false | false | false | 0 |
ConvertParams(std::map<std::string, std::string> &dst)
{
// ADUNANZA BEGIN
// Backport
#if 0
for(std::map<wxString, wxString>::iterator i = m_params.begin(); i != m_params.end(); i++) {
#else
for(std::map<wxString, wxString>::iterator i = m_params.begin(); i != m_params.end(); ++i) {
#endif
// ADUNANZA END
std::str... | false | false | false | false | false | 0 |
non_ecm_get_bit(void *user_data)
{
t38_gateway_state_t *s;
int bit;
/* A rate adapting data stuffer for non-ECM image data */
s = (t38_gateway_state_t *) user_data;
if (s->non_ecm_to_modem.bit_no <= 0)
{
/* We need another byte */
if (s->non_ecm_to_modem.tx_out_ptr != s->non_ecm... | false | false | false | false | false | 0 |
on_context_menu_formatting()
{
if(!m_context_item)
return;
m_context_item->update_layout_position_from_canvas();
sharedptr<LayoutItem> layout_item = m_context_item->get_layout_item();
sharedptr<LayoutItem_Field> layout_item_field = sharedptr<LayoutItem_Field>::cast_dynamic(layout_item);
sharedptr<Layout... | false | false | false | false | false | 0 |
gs_pattern2_set_shfill(gs_client_color * pcc)
{
gs_pattern2_instance_t *pinst;
if (pcc->pattern->type != &gs_pattern2_type)
return_error(gs_error_unregistered); /* Must not happen. */
pinst = (gs_pattern2_instance_t *)pcc->pattern;
pinst->shfill = true;
return 0;
} | false | false | false | false | false | 0 |
parse_line(const char *key, char **s, double *e1, double *n1, double *e2,
double *n2, int projection)
{
int err;
double distance, azimuth;
err = 0;
if (!G_scan_easting(s[0], e1, projection))
err |= 1;
if (!G_scan_northing(s[1], n1, projection))
err |= 2;
if (sscanf(s[2], "%lf", &azimuth) ... | false | false | false | false | false | 0 |
vsc824x_ack_interrupt(struct phy_device *phydev)
{
int err = 0;
/* Don't bother to ACK the interrupts if interrupts
* are disabled. The 824x cannot clear the interrupts
* if they are disabled.
*/
if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
err = phy_read(phydev, MII_VSC8244_ISTAT);
return (err < 0) ... | false | false | false | false | false | 0 |
rects_intersect (Rect r1, Rect r2)
{
if (r1.x0 >= r2.x1) {
return FALSE;
}
if (r2.x0 >= r1.x1) {
return FALSE;
}
if (r1.y0 >= r2.y1) {
return FALSE;
}
if (r2.y0 >= r1.y1) {
return FALSE;
}
return TRUE;
} | false | false | false | false | false | 0 |
parse_option(int *argc, const char *argv[], const char *argv_[])
{
int i, argc_ = 0;
if (*argc <= 1) {
fprintf(stderr, "usage: %s script.k\n", argv[0]);
exit(EXIT_FAILURE);
}
for (i = 0; i < *argc; ++i) {
kbytes_t t = B(argv[i]);
if (knh_bytes_equals(t, STEXT("--emit-llvm... | false | false | false | false | false | 0 |
open_kernel(void)
{
int s;
if ((s = socket(PF_ATMSVC,SOCK_DGRAM,0)) < 0) {
perror("socket");
return -1;
}
if (ioctl(s,ATMSIGD_CTRL,0) < 0) {
perror("ioctl ATMSIGD_CTRL");
return -1;
}
return s;
} | 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.