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 |
|---|---|---|---|---|---|---|
CalculateMissingEdge(const BasicBlock *BB, Edge &removed,
bool assumeEmptySelf) {
Edge edgetocalc;
unsigned uncalculated = 0;
// collect weights of all incoming and outgoing edges, rememer edges that
// have no value
double incount = 0;
SmallSet<const BasicBlock*,8> pred_visite... | false | false | false | false | false | 0 |
cdv_intel_dplink_set_level(struct gma_encoder *encoder,
uint8_t dp_train_pat)
{
int ret;
struct cdv_intel_dp *intel_dp = encoder->dev_priv;
ret = cdv_intel_dp_aux_native_write(encoder,
DP_TRAINING_LANE0_SET,
intel_dp->train_set,
intel_dp->lane_count);
if (ret != intel_dp->lane_count) {
DRM_D... | false | false | false | false | false | 0 |
list_item_ids_foreach (DBusMessageIter *iter, gpointer data)
{
GList **ids = data;
const char *path;
guint32 id;
if (dbus_message_iter_get_arg_type (iter) != DBUS_TYPE_OBJECT_PATH)
return FALSE;
/* The object path, gets converted into a name */
dbus_message_iter_get_basic (iter, &path);
if (gkr_decode_item_i... | false | false | false | false | false | 0 |
BeginningOfLine (int index) {
const char* t = Text(index);
while (t > text && *(t-1) != NEWLINE) {
--t;
}
return t - text;
} | false | false | false | false | false | 0 |
decodeBSRLI(uint32_t insn) {
switch ((insn>>9)&0x3) {
default: return UNSUPPORTED;
case 0x2: return MBlaze::BSLLI;
case 0x1: return MBlaze::BSRAI;
case 0x0: return MBlaze::BSRLI;
}
} | false | false | false | false | false | 0 |
globus_thread_testcancel(void)
{
if (globus_l_thread_impl == NULL)
{
globus_i_thread_pre_activate();
}
globus_assert(globus_l_thread_impl == globus_l_activated_thread_impl);
if (globus_l_thread_impl->thread_testcancel)
{
globus_l_thread_impl->thread_testcancel();
}
} | false | false | false | false | false | 0 |
data_book_factory_quit_server (EDBusServer *server,
EDBusServerExitCode exit_code)
{
/* This factory does not support reloading, so stop the signal
* emission and return without chaining up to prevent quitting. */
if (exit_code == E_DBUS_SERVER_EXIT_RELOAD) {
g_signal_stop_emission_... | false | false | false | false | false | 0 |
qcom_cc_map(struct platform_device *pdev, const struct qcom_cc_desc *desc)
{
void __iomem *base;
struct resource *res;
struct device *dev = &pdev->dev;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(dev, res);
if (IS_ERR(base))
return ERR_CAST(base);
return devm_regmap_ini... | false | false | false | false | false | 0 |
brasero_burn_session_can_burn (BraseroBurnSession *session,
gboolean check_flags)
{
BraseroFindLinkCtx ctx = { 0, NULL, 0, };
g_return_val_if_fail (BRASERO_IS_BURN_SESSION (session), BRASERO_BURN_ERR);
ctx.check_session_flags = check_flags;
return brasero_burn_session_supported (session, &ctx);
} | false | false | false | false | false | 0 |
CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len)
{
CRYPTO_gcm128_finish(ctx, NULL, 0);
memcpy(tag, ctx->Xi.c, len<=sizeof(ctx->Xi.c)?len:sizeof(ctx->Xi.c));
} | false | false | false | false | false | 0 |
tk_update_ktime_data(struct timekeeper *tk)
{
u64 seconds;
u32 nsec;
/*
* The xtime based monotonic readout is:
* nsec = (xtime_sec + wtm_sec) * 1e9 + wtm_nsec + now();
* The ktime based monotonic readout is:
* nsec = base_mono + now();
* ==> base_mono = (xtime_sec + wtm_sec) * 1e9 + wtm_nsec
*/
second... | false | false | false | false | false | 0 |
display_file (filename)
char *filename;
{
bfd *file = bfd_openr (filename, target);
if (file == NULL)
{
bfd_nonfatal (filename);
return_code = 1;
return;
}
if (bfd_check_format (file, bfd_archive))
display_archive (file);
else
display_bfd (file);
if (!bfd_close (file)... | false | false | false | false | false | 0 |
bfg_make_plain_node(Block *b)
{
IntSet pred;
IntSet succ;
copy_construct_IntSet(pred, b->pred);
copy_construct_IntSet(succ, b->succ);
return construct_node(b, pred, succ, NULL, FALSE, FALSE);
} | false | false | false | false | false | 0 |
cleanup_children(void)
#else
void
cleanup_children()
#endif
{
int i;
struct client_command cc;
bzero(&cc,sizeof(struct client_command));
cc.c_command = R_DEATH;
for(i=0;i<num_child;i++)
{
cc.c_client_number = (int)i;
/* Child not started yet */
if(child_idents[i].state == C_STATE_ZERO)
;
/* Child is w... | false | false | false | false | false | 0 |
get_wep_tx_idx(struct airo_info *ai)
{
WepKeyRid wkr;
int rc;
__le16 lastindex;
rc = readWepKeyRid(ai, &wkr, 1, 1);
if (rc != SUCCESS)
return -1;
do {
lastindex = wkr.kindex;
if (wkr.kindex == cpu_to_le16(0xffff))
return wkr.mac[0];
rc = readWepKeyRid(ai, &wkr, 0, 1);
if (rc != SUCCESS)
return -1... | false | false | false | false | false | 0 |
gt_encseq_lcpofdifferenttwobitencodings(GtTwobitencoding tbe1,
GtTwobitencoding tbe2)
{
gt_assert((tbe1 ^ tbe2) > 0);
return (unsigned int) GT_DIV2(GT_MULT2(GT_UNITSIN2BITENC) -
requiredUIntBits(tbe1 ^ tbe2));
} | false | false | false | false | false | 0 |
gt_feature_index_gfflike_get_range_for_seqid(GtFeatureIndex *gfi,
GtRange *range,
const char *seqid,
GtError *err)
{
GtFeatureIndexGFFlike *fi;
int had_err = 0, rval;
... | false | false | false | false | false | 0 |
DoSingleKeywordNode(HighlightLanguage language, TiXmlElement* node, const wxString& nodename)
{
TiXmlElement* keywords = node->FirstChildElement(nodename.mb_str());
while (keywords)
{
// LOGSTREAM << "Found " << nodename << '\n';
int keyidx = keywords->Attribute("index") ? atol(keywords->Attr... | false | false | false | false | false | 0 |
tty_trigger_dummy_irq(struct ns16552_data *d,void *arg)
{
d->duart_irq_seq++;
if (d->duart_irq_seq == 2) {
if (d->channel[0].ier & IER_ETXRDY) {
d->channel[0].output = TRUE;
vm_set_irq(d->vm,d->irq);
}
if (d->channel[1].ier & IER_ETXRDY) {
d->channel[1].output = T... | false | false | false | false | false | 0 |
accessField (const statementInfo *const st)
{
const char* result = NULL;
if (isLanguage (Lang_cpp) && st->scope == SCOPE_FRIEND)
result = "friend";
else if (st->member.access != ACCESS_UNDEFINED)
result = accessString (st->member.access);
return result;
} | false | false | false | false | false | 0 |
computeSize(void)
{
int oldW=width();
int oldH=height();
int offset=(highlightThickness()+shadowThickness()+margin())<<1;
int pixmapW=pixmapWidth();
int pixmapH=pixmapHeight();
int labelW=labelWidth();
int labelH=labelHeight();
int labelSp=computeLabelSpacing();
int w,h;
if (labelAlignment()==MSTop|... | false | false | false | false | false | 0 |
inspect_iter_clear(GtkTreeIter *iter, G_GNUC_UNUSED gpointer gdata)
{
remove_children(iter);
gtk_tree_store_set(store, iter, INSPECT_DISPLAY, NULL, INSPECT_VALUE, NULL,
INSPECT_VAR1, NULL, INSPECT_NUMCHILD, 0, INSPECT_PATH_EXPR, NULL, -1);
if (gtk_tree_selection_iter_is_selected(selection, iter))
menu_item_set_... | false | false | false | false | false | 0 |
check_upstart_jobs(const char *action, const struct makenode **nodevec)
{
struct makenode *t;
int count = 0;
if (!init_is_upstart())
return 0;
for (t = tree_list; t; t = t->next)
{
char path[131]; /* three bytes longer than the max allowed init script name... */
struct stat job;
snprintf(path, sizeof(pa... | false | false | false | false | false | 0 |
set_var(const char *var, const char *val, int init)
{
int i, n;
char *ptr;
for (i = 0; i < Vars_Size; i++)
{
if(!strcmp (Vars[i].name, var))
{
if(!init && (Vars[i].flags & CF_ONCE))
{
log_message_level(LOG_LEVEL_SERVER, "set_var: %s may not be reset/only set in the config file", Vars[i].name);
... | true | true | true | false | false | 1 |
run_free(struct run *tmp)
{
if (tmp->how_data != NULL)
free (tmp->how_data);
if (tmp->some_bytes_data != NULL)
free(tmp->some_bytes_data);
if (tmp->notes_set == 1) {
int i;
for (i = 0; i < tmp->notes_length; ++i) {
if (tmp->notes_data[i] != NULL) free(tmp->notes_data[i]);
}
free(... | false | false | false | false | false | 0 |
Update_spare_buffers(int width, int height)
{
#ifndef NOLAYERS
// At least one dimension is different
if (Spare_visible_image.Width*Spare_visible_image.Height != width*height)
{
// Current image
free(Spare_visible_image.Image);
Spare_visible_image.Image = (byte *)malloc(width * height);
if (Spare_... | false | false | false | false | false | 0 |
getHops(IBPort *p_port, unsigned int lid)
{
// make sure it is initialized:
if (MinHopsTable.empty() || (MinHopsTable.size() < lid + 1))
return IB_HOP_UNASSIGNED;
if (MinHopsTable[lid].empty()) return IB_HOP_UNASSIGNED;
if (p_port == NULL) return MinHopsTable[lid][0];
return MinHopsTable[lid... | false | false | false | false | false | 0 |
nxt_unpack_error(nxt_t *nxt) {
int error = (*(nxt->ptr)++)&0xFF;
if (error!=0) nxt->error = error;
return error;
} | false | false | false | false | false | 0 |
setup_create_color_page (void)
{
GtkWidget *tab, *box, *label;
int i;
box = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (box), 6);
tab = gtk_table_new (9, 2, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (tab), 6);
gtk_table_set_row_spacings (GTK_TABLE (tab), 2);
gtk_table_s... | false | false | false | false | false | 0 |
player_controller_update_state (PlayerController* self, PlayerControllerstate new_state) {
GAppInfo* _tmp0_ = NULL;
const gchar* _tmp1_ = NULL;
PlayerControllerstate _tmp2_ = 0;
PlayerControllerstate _tmp3_ = 0;
g_return_if_fail (self != NULL);
_tmp0_ = self->priv->_app_info;
_tmp1_ = g_app_info_get_name (_tmp0_... | false | false | false | false | false | 0 |
FindNextArt(const CAFHEADER *head, CAFTOCENT *toc, ARTNUM *artp)
{
ARTNUM art;
CAFTOCENT *tocp;
art = *artp;
if (art == 0) {
art = head->Low - 1; /* we never use art # 0, so 0 is a flag to start
searching at the beginning */
}
while (true) {
art++;
if (art > head->High) return false... | false | false | false | false | false | 0 |
Ns_MutexTryLock(Ns_Mutex *mutex)
{
Mutex *mutexPtr = GETMUTEX(mutex);
if (!NsLockTry(mutexPtr->lock)) {
return NS_TIMEOUT;
}
++mutexPtr->nlock;
return NS_OK;
} | false | false | false | false | false | 0 |
print_raw_rsc(resource_t * rsc)
{
GListPtr lpc = NULL;
GListPtr children = rsc->children;
if (children == NULL) {
printf("%s\n", rsc->id);
}
for (lpc = children; lpc != NULL; lpc = lpc->next) {
resource_t *child = (resource_t *) lpc->data;
print_raw_rsc(child);
}
} | false | false | false | false | false | 0 |
iscsit_randomize_pdu_lists(
struct iscsi_cmd *cmd,
u8 type)
{
int i = 0;
u32 *array, pdu_count, seq_count = 0, seq_no = 0, seq_offset = 0;
for (pdu_count = 0; pdu_count < cmd->pdu_count; pdu_count++) {
redo:
if (cmd->pdu_list[pdu_count].seq_no == seq_no) {
seq_count++;
continue;
}
array = kcalloc(seq_... | false | false | false | false | false | 0 |
plugin_open(const char* filename)
{
struct uhub_plugin* plugin;
LOG_PLUGIN("plugin_open: \"%s\"", filename);
plugin = (struct uhub_plugin*) hub_malloc_zero(sizeof(struct uhub_plugin));
if (!plugin)
{
return 0;
}
#ifdef HAVE_DLOPEN
plugin->handle = dlopen(filename, RTLD_LAZY);
#else
plugin->handle = LoadLibr... | false | false | false | false | false | 0 |
nal_reader_skip (NalReader * nr, guint nbits)
{
g_return_val_if_fail (nr != NULL, FALSE);
if (G_UNLIKELY (!nal_reader_read (nr, nbits)))
return FALSE;
nr->bits_in_cache -= nbits;
return TRUE;
} | false | false | false | false | false | 0 |
AddLinkLibraryForTarget(const char *target,
const char* lib,
cmTarget::LinkLibraryType llt)
{
cmTargets::iterator i = this->Targets.find(target);
if ( i != this->Targets.end())
{
cmTarget* tgt =
this->GetCMakeInstance()-... | false | false | false | false | false | 0 |
get_branch_field( int idx, pv_name_t *pvn, pv_value_t *res)
{
str uri;
qvalue_t q;
str duri;
str path;
unsigned int flags;
struct socket_info *si;
uri.s = get_branch(idx, &uri.len, &q, &duri, &path, &flags, &si);
if (!uri.s)
return pv_get_null( NULL, NULL, res);
/* got a valid branch, return the field */
... | false | false | false | false | false | 0 |
substr(const uint32_t *s,const int start,const int len) const
{
GP<GStringRep> retval;
if(s && s[0])
{
uint32_t const *eptr;
if(len<0)
{
for(eptr=s;eptr[0];++eptr)
EMPTY_LOOP;
}else
{
eptr=&(s[len]);
}
s=&s[start];
if((size_t)s<(size_t)eptr)
{
mbstate_... | false | false | false | false | false | 0 |
mouseMotion(int x, int y)
{
t_float scalex = 1., scaley=1.;
int width, height;
GemMan::getRealDimen(&width, &height);
switch(m_scaleMode) {
case NONE:
break;
case BOTH:
scalex=m_scaleX/width;
scaley=m_scaleY/height;
break;
case WIDTH:
scalex=m_scaleX/width;
scaley=scalex;
bre... | false | false | false | false | false | 0 |
Func8Bits_ExponentOfPcElement ( Obj self, Obj pcgs, Obj w, Obj pos )
{
UInt expm; /* signed exponent mask */
UInt exps; /* sign exponent mask */
UInt ebits; /* number of exponent bits */
UInt ... | false | false | false | false | false | 0 |
vlistChangeGridIndex(int vlistID, int index, int gridID)
{
int gridIDold;
int varID, nvars;
vlist_t *vlistptr;
vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
if ( reshGetStatus ( vlistID, &vlist_ops ) == CLOSED )
{
xwarning("%s", "Operation not executed." );
re... | false | false | false | false | false | 0 |
print_ali1533_port_status(struct pci_dev *dev)
{
struct port_decoding_access_info *p;
u8 onebyte;
int i;
DEBUG("printing port status");
p = &ali1533_ports[0];
i = 0;
puts("ALi 1533 Decoding status:");
while (p->port != 0) {
DEBUG_VAL("port", p->port);
onebyte = pci_read_... | false | false | false | false | false | 0 |
ntx_del(char **ids)
{
char file[FILE_MAX];
char *buf, *cur;
char *state = NULL;
for(; *ids != NULL; ids++) {
seprintf(file, FILE_MAX, REFS_DIR"/%.2s", *ids);
/* Find the line describing the tags of the given ID. */
if(!(buf = ntx_find(file, *ids)))
die("Unable to locate note %s in %s.", *ids... | true | true | true | false | false | 1 |
getContentLength() const
{
if(endByte >= startByte) {
return endByte-startByte+1;
} else {
return 0;
}
} | false | false | false | false | false | 0 |
minimize(struct pack_list **min)
{
struct pack_list *pl, *unique = NULL,
*non_unique = NULL, *min_perm = NULL;
struct pll *perm, *perm_all, *perm_ok = NULL, *new_perm;
struct llist *missing;
off_t min_perm_size = 0, perm_size;
int n;
pl = local_packs;
while (pl) {
if (pl->unique_objects->size)
pack_list_... | false | true | false | false | false | 1 |
merge_selectors(sstore& input)
{
for(sstore::iterator i = input.begin(), e = input.end(); i != e;)
{
string newsel = "";
// Check if properties also exist in another selector
vector<string> keys;
for(sstore::iterator j = input.begin(); j != input.end(); j++ )
{
if(j->first == i->first)
{
... | false | false | false | false | false | 0 |
img_write(IMAGE *image, char *buffer,int count)
{
int retval;
retval = write(image->file,buffer,count);
if(retval == count)
image->offset += count;
else
image->offset = -1;
return retval;
} | false | false | false | false | false | 0 |
updateForeground(unsigned long oldfg_)
{
MSCompositeField::updateForeground(oldfg_);
if (oldfg_==editorBackground()) editorBackground(foreground());
} | false | false | false | false | false | 0 |
libnumintegerP(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
{
ScmObj obj_scm;
ScmObj obj;
ScmObj SCM_SUBRARGS[1];
int SCM_i;
SCM_ENTER_SUBR("integer?");
for (SCM_i=0; SCM_i<1; SCM_i++) {
SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
}
obj_scm = SCM_SUBRARGS[0];
obj = (obj_scm);
{
{
int SCM_RESULT;
#... | false | false | false | false | false | 0 |
ajStrCutCommentsStart(AjPStr* Pstr)
{
AjPStr thys;
if(!*Pstr)
*Pstr = ajStrNewResLenC("", 1, 0);
else if((*Pstr)->Use > 1)
ajStrGetuniqueStr(Pstr);
thys = *Pstr;
if(!MAJSTRGETLEN(thys)) /* empty string */
return ajFalse;
if(thys->Ptr[0] == '#')
{ /* comment found */... | false | false | false | false | false | 0 |
bw_find_max(int s)
{
int max = 0, i;
for(i = 0; i < bw_matrix_size; i++) {
if(max < bw_matrix_get(s, i))
max = bw_matrix_get(s, i);
}
return max;
} | false | false | false | false | false | 0 |
baseline_zip_cmd(void){
int rid;
Blob zip;
const char *zName;
zName = find_option("name", 0, 1);
db_find_and_open_repository(0, 0);
if( g.argc!=4 ){
usage("VERSION OUTPUTFILE");
}
rid = name_to_typed_rid(g.argv[2],"ci");
if( zName==0 ){
zName = db_text("default-name",
"SELECT replace(%Q... | false | false | false | false | false | 0 |
in_opclass(int oclass, int op) {
if (oclass == INT_OP) {
return (op == GMOP_MOD);
}
if (oclass == NUMERIC_OP) {
return gm_is_numeric_op(op);
}
if (oclass == BOOL_OP) {
return gm_is_boolean_op(op);
}
if (oclass == COMP_OP) {
return gm_is_less_op(op);
}
... | false | false | false | false | false | 0 |
tmiofb_copyarea(struct fb_info *fbi, const struct fb_copyarea *area)
{
const u32 cmd[] = {
TMIOFB_ACC_DSADR((area->dy * fbi->mode->xres + area->dx) * 2),
TMIOFB_ACC_DHPIX(area->width - 1),
TMIOFB_ACC_DVPIX(area->height - 1),
TMIOFB_ACC_SSADR((area->sy * fbi->mode->xres + area->sx) * 2),
TMIOFB_ACC_SCGO,
};
... | false | false | false | false | false | 0 |
lj_debug_pushloc(lua_State *L, GCproto *pt, BCPos pc)
{
GCstr *name = proto_chunkname(pt);
const char *s = strdata(name);
MSize i, len = name->len;
BCLine line = lj_debug_line(pt, pc);
if (*s == '@') {
s++; len--;
for (i = len; i > 0; i--)
if (s[i] == '/' || s[i] == '\\') {
s += i+1;
break;
... | false | false | false | false | false | 0 |
xaccAccountConvertBalanceToCurrencyAsOfDate(const Account *acc, /* for book */
gnc_numeric balance,
gnc_commodity *balance_currency,
gnc_commodity *new_currency,
time64 date)
{
QofBook *book;
GNCPriceDB *pdb;
Timespec ts;
if (gnc_numeric_zero_p (balance) ||
g... | false | false | false | false | false | 0 |
L7()
{register object *base=vs_base;
register object *sup=base+VM7; VC7
vs_check;
{register object V16;
register object V17;
V16=(base[0]);
V17=(base[1]);
vs_top=sup;
goto TTL;
TTL:;
goto T41;
T41:;
if(((V17))==Cnil){
goto T44;}
base[2]= (V16);
base[3]= CMPcaar((V17));
vs_top=(vs_base=base+2)+2;
(void) (... | false | false | false | false | false | 0 |
clamav_stats_submit(struct cl_engine *engine, void *cbdata)
{
char *json;
cli_intel_t *intel, myintel;
cli_flagged_sample_t *sample, *next;
int err;
intel = (cli_intel_t *)cbdata;
if (!(intel) || !(engine))
return;
if (engine->dconf->stats & DCONF_STATS_DISABLED)
return;
... | false | false | false | false | false | 0 |
HPDF_TTFontDef_GetCharBBox (HPDF_FontDef fontdef,
HPDF_UINT16 unicode)
{
HPDF_TTFontDefAttr attr = (HPDF_TTFontDefAttr)fontdef->attr;
HPDF_UINT16 gid = HPDF_TTFontDef_GetGlyphid(fontdef, unicode);
HPDF_STATUS ret;
HPDF_Box bbox = HPDF_ToBox(0, 0, 0, 0);
HPDF_INT16 ... | false | false | false | false | false | 0 |
bday_changed_cb (TpawCalendarButton *button,
GDate *date,
TpawUserInfo *self)
{
const gchar *strv[] = { NULL, NULL };
TpContactInfoField *field;
self->priv->details_changed = TRUE;
field = g_object_get_data ((GObject *) button, DATA_FIELD);
g_assert (field != NULL);
if (date != NULL)
{
... | false | false | false | false | false | 0 |
fill_in_info(GList *tl, guint32 *tracks, guint32 *playtime, gdouble *filesize) {
GList *gl;
g_return_if_fail (tracks);
g_return_if_fail (playtime);
g_return_if_fail (filesize);
*tracks = 0;
*playtime = 0;
*filesize = 0;
for (gl = tl; gl; gl = gl->next) {
Track *s = gl->data;
... | false | false | false | false | false | 0 |
isNickJuped(const char *nick)
{
int pos;
if (nick && *nick) {
for (pos = strhash(nick); (pos &= JUPEHASHMASK), jupeTable[pos][0]; pos++) {
if (0 == ircd_strcmp(nick, jupeTable[pos]))
return 1;
}
}
return 0; /* A bogus pointer is NOT a juped nick, right ? :) */
} | false | false | false | false | false | 0 |
ff_match_label(struct forcefield_pak *ff, gchar **atoms, gint n)
{
gint i;
GString *label, *test;
g_assert(ff != NULL);
/* number of atoms match forcefield? */
if (n != ff->atoms_current)
return(FALSE);
/* create the atom label string */
label = g_string_new(NULL);
for (i=0 ; i<n ; i++)
{
g_assert(atoms[i] != ... | false | false | false | false | true | 1 |
load_cert(gnutls_x509_crt_t *cert, char *name)
{
# define BIGBUFSIZE 65536
char buf[BIGBUFSIZE];
FILE *f;
gnutls_datum_t bptr;
if (!cert_file(name, buf))
return;
if (!(f=fopen(buf, "r")))
return;
bptr.size=fread(buf, 1, BIGBUFSIZE, f);
bptr.data=(unsigned char*)buf;
fc... | true | true | false | false | true | 1 |
eap_success(esp, inp, id, len)
eap_state *esp;
u_char *inp;
int id;
int len;
{
if (esp->es_client.ea_state != eapOpen && !eap_client_active(esp)) {
dbglog("EAP unexpected success message in state %s (%d)",
eap_state_name(esp->es_client.ea_state),
esp->es_client.ea_state);
return;
}
if (esp->es_clien... | false | false | false | false | false | 0 |
GetcString(
void *theEnv,
char *logicalName)
{
struct stringRouter *head;
int rc;
head = FindStringRouter(theEnv,logicalName);
if (head == NULL)
{
SystemError(theEnv,"ROUTER",1);
EnvExitRouter(theEnv,EXIT_FAILURE);
}
if (head->readWriteType != READ_STRING) return(EOF);
if... | false | false | false | false | false | 0 |
ib_sa_get_mcmember_rec(struct ib_device *device, u8 port_num,
union ib_gid *mgid, struct ib_sa_mcmember_rec *rec)
{
struct mcast_device *dev;
struct mcast_port *port;
struct mcast_group *group;
unsigned long flags;
int ret = 0;
dev = ib_get_client_data(device, &mcast_client);
if (!dev)
return -ENODEV;
... | false | false | false | false | false | 0 |
savePropertyValues(AnimationInstance* instance)
{
for (AffectorList::const_iterator it = d_affectors.begin();
it != d_affectors.end(); ++it)
{
(*it)->savePropertyValues(instance);
}
} | false | false | false | false | false | 0 |
v8_init(v8_state_t *s,
int calling_party,
v8_parms_t *parms,
v8_result_handler_t *result_handler,
void *user_data)
{
if (s == NULL)
{
if ((s = (v8_state_t *) malloc... | false | false | false | false | false | 0 |
conv_name_to_rfc2553(const char *p, char *q)
{
#define PUTC(c) if (q) *q++=(c); ++n
size_t n=0;
const char *sep="";
while (*p)
{
if (*p == '/')
{
++p;
continue;
}
while (*sep)
{
PUTC(*sep);
++sep;
}
sep=",";
while (*p && *p != '/')
{
if (*p == '\\' && p[1])
++p;
if (*p ==... | false | false | false | false | false | 0 |
operator<(const DcmStack& arg) const
{
if (cardinality_ < arg.cardinality_) return OFTrue;
if (cardinality_ > arg.cardinality_) return OFFalse;
// cardinality_ is equal. Now walk through stack and do pointer arithmetics
DcmStackNode * thisPtr = topNode_;
DcmStackNode * argPtr = arg.topNode_;
while (thisPtr... | false | false | false | false | false | 0 |
gt_parse_algbounds(Sfxstrategy *sfxstrategy,
const GtStrArray *algbounds,
GtError *err)
{
bool haserr = false;
const char *arg;
long readint;
if (gt_str_array_size(algbounds) != 3UL)
{
gt_error_set(err,"option -algbds must have exactly 3 arguments");
hase... | false | false | false | false | false | 0 |
us_http_header_item_list_remove( us_http_header_item_list_t *self, us_http_header_item_t *item )
{
bool r = false;
us_http_header_item_t *prev = 0;
us_http_header_item_t *i = self->m_first;
while ( i )
{
if ( i == item )
{
if ( prev )
{
prev->m... | false | false | false | false | false | 0 |
getnodename(char *name, size_t len)
{
int error_code, name_len;
char *dot_ptr, path_name[BUFSIZ];
error_code = gethostname(path_name, sizeof(path_name));
if (error_code) {
show_help(NULL, "lib-call-fail", "gethostname", NULL);
return error_code;
}
dot_ptr = strchr(path_name, '.');
if (dot_ptr ==... | true | true | false | false | false | 1 |
operator= (const ACE_Configuration_Section_Key& rhs)
{
if (this != &rhs)
{
if (key_)
key_->dec_ref ();
key_ = rhs.key_;
if (key_)
key_->add_ref ();
}
return *this;
} | false | false | false | false | false | 0 |
parse_number(char *str)
{
unsigned i;
int n;
char c;
size_t len=strlen(str);
for ( i=0; i<len; i++)
{
c = str[i];
if (!isdigit(c)){
return -1;
}
}
str[i]='\0';
n=atoi(str);
return n;
} | false | false | false | false | false | 0 |
parse_command_line(unsigned int argc,
char **argv, int skip)
{
unsigned int optpos = 1 + skip;
unsigned int valpos = 1 + skip;
while(optpos < argc) {
unsigned int increments = 0;
string optstr(argv[optpos]), valstr;
if(optstr[0] != '-') // End of parsable options
break... | false | false | false | false | false | 0 |
setFilter(const QContactFilter& filter)
{
Q_D(QContactLocalIdFetchRequest);
QMutexLocker ml(&d->m_mutex);
d->m_filter = filter;
} | false | false | false | false | false | 0 |
free_hexdata(struct hexdata *hexdata)
{
if(hexdata) {
unsigned int i;
for(i = 0; i < hexdata->maxlines; i++)
if(hexdata->lines[i] != NULL)
free(hexdata->lines[i]);
free(hexdata);
}
} | false | false | false | false | false | 0 |
unuse_pte(struct vm_area_struct *vma, pmd_t *pmd,
unsigned long addr, swp_entry_t entry, struct page *page)
{
struct page *swapcache;
struct mem_cgroup *memcg;
spinlock_t *ptl;
pte_t *pte;
int ret = 1;
swapcache = page;
page = ksm_might_need_to_copy(page, vma, addr);
if (unlikely(!page))
return -ENOMEM;
... | false | false | false | false | false | 0 |
inbox(struct box *box, int x, int y)
{
return (x > box->left && x < box->right && y > box->top &&
y < box->bottom);
} | false | false | false | false | false | 0 |
sdb_done(int err, int *count)
{
/* allow as many rows as the database wants to give */
if (err == SQLITE_ROW) {
*count = 0;
return 0;
}
if (err != SQLITE_BUSY) {
return 1;
}
/* err == SQLITE_BUSY, Dont' retry forever in this case */
if (++(*count) >= SDB_MAX_BUSY_RETRIES) {
return 1;
... | true | true | false | false | true | 1 |
OutputAlignment(vector< set<size_t> > &retAlignmentsS2T, const AlignmentInfo &ai)
{
typedef std::vector< const std::pair<size_t,size_t>* > AlignVec;
AlignVec alignments = ai.GetSortedAlignments();
AlignVec::const_iterator it;
for (it = alignments.begin(); it != alignments.end(); ++it) {
const std::pair<siz... | false | false | false | false | false | 0 |
cryptui_key_chooser_get_recipients (CryptUIKeyChooser *chooser)
{
CryptUIKeyset *keyset;
GList *recipients;
const gchar *key;
gchar *value;
g_return_val_if_fail (chooser->priv->keylist != NULL, NULL);
recipients = cryptui_key_list_get_selected_keys (chooser->priv->keylist);
if (!chooser->p... | false | false | false | false | false | 0 |
calcInitialMeshH()
{
double initial_mesh_h = MAX_RANGE;
if (modelInfo->dimMin > 0 && modelInfo->dimMin < initial_mesh_h)
initial_mesh_h = MESH_H_INIT_FACTOR * modelInfo->dimMin;
if (modelInfo->minEdgeSize > 0 && modelInfo->minEdgeSize < initial_mesh_h)
initial_mesh_h = modelInfo->minEdgeSize;
return ... | false | false | false | false | false | 0 |
H5FD_core_destroy_dirty_list(H5FD_core_t *file)
{
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
HDassert(file);
/* Destroy the list, including any remaining list elements */
if(file->dirty_list) {
H5FD_core_region_t *region = NULL;
#ifdef DER
{
size_t count = H5SL_count(file->dirty... | false | false | false | false | false | 0 |
on_skim_readword_button_clicked (gpointer data)
{
CFirstRecite_skim *parent = (CFirstRecite_skim *)data;
if (parent->selected_wordlist_item>=0 && parent->selected_wordlist_item<g_pReciteWord->now_zu_wordcount) {
if (parent->left_time < 1000)
parent->left_time = 1000; //delay selecting the next word for 1 second.... | false | false | false | false | false | 0 |
import_vpn_from_file_cb (GtkWidget *dialog, gint response, gpointer user_data)
{
char *filename = NULL;
ActionInfo *info = (ActionInfo *) user_data;
GHashTableIter iter;
gpointer key;
NMVpnPluginUiInterface *plugin;
NMConnection *connection = NULL;
GError *error = NULL;
if (response != GTK_RESPONSE_ACCEPT)
g... | false | false | false | false | false | 0 |
gist_redo(XLogRecPtr lsn, XLogRecord *record)
{
uint8 info = record->xl_info & ~XLR_INFO_MASK;
MemoryContext oldCxt;
oldCxt = MemoryContextSwitchTo(opCtx);
switch (info)
{
case XLOG_GIST_PAGE_UPDATE:
gistRedoPageUpdateRecord(lsn, record, false);
break;
case XLOG_GIST_PAGE_DELETE:
gistRedoPageDelete... | false | false | false | false | false | 0 |
profile_iterator(void **iter_p, char **ret_name, char **ret_value)
{
char *name, *value;
errcode_t retval;
struct profile_iterator *iter = *iter_p;
profile_t profile;
if (ret_name)
*ret_name = NULL;
if (ret_value)
*ret_value = NULL;
if (iter->magic != PROF_MAGIC_ITERAT... | false | false | false | false | false | 0 |
launch_p_step_wait(srun_job_t *job, bool got_alloc)
{
int rc = 0;
slurm_step_launch_wait_finish(job->step_ctx);
if ((MPIR_being_debugged == 0) && retry_step_begin &&
(retry_step_cnt < MAX_STEP_RETRIES)) {
retry_step_begin = false;
slurm_step_ctx_destroy(job->step_ctx);
if (got_alloc) {
if (create_job_... | false | false | false | false | false | 0 |
date_am(struct tm *tm, struct tm *now, int *num)
{
int hour, n = *num;
*num = 0;
GIT_UNUSED(now);
hour = tm->tm_hour;
if (n) {
hour = n;
tm->tm_min = 0;
tm->tm_sec = 0;
}
tm->tm_hour = (hour % 12);
} | false | false | false | false | false | 0 |
ses_finishing(struct ap_session *ses)
{
struct radius_pd_t *rpd = find_pd(ses);
if (rpd->auth_ctx) {
rad_server_req_cancel(rpd->auth_ctx->req, 1);
rad_req_free(rpd->auth_ctx->req);
mempool_free(rpd->auth_ctx);
rpd->auth_ctx = NULL;
}
if (rpd->acct_started || rpd->acct_req)
rad_acct_stop(rpd);
} | false | false | false | false | false | 0 |
bgav_read_data_fd(const bgav_options_t * opt,
int fd, uint8_t * ret, int len, int milliseconds)
{
int bytes_read = 0;
int result;
fd_set rset;
struct timeval timeout;
int flags = 0;
// if(milliseconds < 0)
// flags = MSG_WAITALL;
while(bytes_read < len)
{
if(mil... | false | false | false | false | false | 0 |
pcc_init(void)
{
int ret;
struct platform_device *pcc_pdev;
if (acpi_disabled)
return -ENODEV;
/* Check if PCC support is available. */
ret = acpi_pcc_probe();
if (ret) {
pr_debug("ACPI PCC probe failed.\n");
return -ENODEV;
}
pcc_pdev = platform_create_bundle(&pcc_mbox_driver,
pcc_mbox_probe, NULL... | false | false | false | false | false | 0 |
gw_settings_window_box_apply_no ( GtkButton *button, GtkWindow *w)
{
GWSettingsModule *module = NULL;
#ifdef GW_DEBUG_GUI_CALLBACK_COMPONENT
g_print ( "*** GW - %s (%d) :: %s()\n", __FILE__, __LINE__, __PRETTY_FUNCTION__);
#endif
if ( w != NULL )
{
if ( (module = gw_dialog_box_get_user_data ( w)) != NULL )
{... | false | false | false | false | false | 0 |
ensDitagfeatureNewIni(EnsPDitagfeatureadaptor dtfa,
ajuint identifier,
EnsPFeature feature,
EnsPDitag dt,
AjPStr cigar,
EnsED... | false | false | false | false | false | 0 |
gnac_profiles_mgr_copy_file(GFile *src_file,
const gchar *dest_name)
{
GError *error = NULL;
gchar *path = g_build_filename(g_get_tmp_dir(), dest_name, NULL);
GFile *dest_file = g_file_new_for_path(path);
CopyData copy_data = { path, dest_name, &error, FALSE };
gdk_threads_e... | false | false | false | false | false | 0 |
read_swizzle(s_expression *expr)
{
s_symbol *swiz;
s_expression *sub;
s_pattern pat[] = { "swiz", swiz, sub };
if (!MATCH(expr, pat)) {
ir_read_error(expr, "expected (swiz <swizzle> <rvalue>)");
return NULL;
}
if (strlen(swiz->value()) > 4) {
ir_read_error(expr, "expected a valid 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.