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 |
|---|---|---|---|---|---|---|
ensure_cache_filled (CtplInputStream *stream,
GError **error)
{
gboolean success = TRUE;
if (stream->buf_pos >= stream->buf_size) {
gssize read_size;
read_size = g_input_stream_read (stream->stream, stream->buffer,
stream->buf_size, N... | false | false | false | false | false | 0 |
cx231xx_send_gpio_cmd(struct cx231xx *dev, u32 gpio_bit, u8 *gpio_val,
u8 len, u8 request, u8 direction)
{
int status = 0;
struct VENDOR_REQUEST_IN ven_req;
/* Set wValue */
ven_req.wValue = (u16) (gpio_bit >> 16 & 0xffff);
/* set request */
if (!request) {
if (direction)
ven_req.bRequest = VRT_GET_GP... | false | false | false | false | false | 0 |
AddPoint(double p[3])
{
int i;
for (i = 0; i < 3; i++)
{
if (p[i] < this->MinPnt[i])
{
this->MinPnt[i] = p[i];
}
if (p[i] > this->MaxPnt[i])
{
this->MaxPnt[i] = p[i];
}
}
} | false | false | false | false | false | 0 |
bzfile_geterrstr( bzFile *obj ) {
#else
const char *bzfile_geterrstr( obj ) bzFile *obj; {
#endif
int error_num = obj==NULL ? global_bzip_errno : obj->bzip_errno;
char *errstr = error_num * -1 < 0 || error_num * -1 > 9 ? "Unknown" : (char *) bzerrorstrings[ error_num * -1 ];
return errstr;
} | false | false | false | false | false | 0 |
send_log_after(const char* filename, double t, MIOFILE& mf) {
char buf[256];
double x;
FILE* f = fopen(filename, "r");
if (!f) return;
while (fgets(buf, 256, f)) {
int n = sscanf(buf, "%lf", &x);
if (n != 1) continue;
if (x < t) continue;
mf.printf("%s", buf);
}
... | false | false | false | false | false | 0 |
list_deiconify(unsigned long *body)
{
PagerWindow *t;
Window target_w;
target_w = body[0];
t = Start;
while((t!= NULL)&&(t->w != target_w))
{
t = t->next;
}
if(t== NULL)
{
return;
}
else
{
t->flags &= ~ICONIFIED;
t->x = t->frame_x;
t->y = t->frame_y;
... | false | false | false | false | false | 0 |
generic_sendstat (mpg123_handle *fr)
{
off_t current_frame, frames_left;
double current_seconds, seconds_left;
if(!mpg123_position(fr, 0, xfermem_get_usedspace(buffermem), ¤t_frame, &frames_left, ¤t_seconds, &seconds_left))
generic_sendmsg("F %"OFF_P" %"OFF_P" %3.2f %3.2f", (off_p)current_frame, (off_p)... | false | false | false | false | false | 0 |
PrintCode(TProtoFunc* tf)
{
Byte* code=tf->code;
Byte* p=code;
int line=0;
while (1)
{
Opcode OP;
int n=INFO(tf,p,&OP);
int op=OP.op;
int i=OP.arg;
printf("%6d ",(int)(p-code));
{
Byte* q=p;
int j=n;
while (j--) printf("%02X",*q++);
}
printf("%*s%-13s",2*(5-n),"",OP.name);
if (n!=1 || op<0) printf... | false | false | false | false | false | 0 |
closeDevice()
{
if (ownIodev)
{
iodev->close();
delete iodev;
iodev = 0;
}
} | false | false | false | false | false | 0 |
get_ack(int fd, unsigned char *result_sha1)
{
static char line[1000];
int len = packet_read_line(fd, line, sizeof(line));
if (!len)
die("git fetch-pack: expected ACK/NAK, got EOF");
if (line[len-1] == '\n')
line[--len] = 0;
if (!strcmp(line, "NAK"))
return NAK;
if (!prefixcmp(line, "ACK ")) {
if (!get_sh... | false | false | false | false | false | 0 |
sig_print_text(void)
{
GSList *tmp;
time_t t;
struct tm *tm;
t = time(NULL);
tm = localtime(&t);
if (tm->tm_hour != 0 || tm->tm_min != 0)
return;
daycheck = 2;
signal_remove("print text", (SIGNAL_FUNC) sig_print_text);
/* day changed, print notice about it to every window */
for (tmp = windows; tmp != NU... | false | false | false | false | false | 0 |
s_minilogv(GLogLevelFlags level, bool copy, const char *fmt, va_list args)
{
char data[LOG_MSG_MAXLEN];
DECLARE_STR(11);
char time_buf[18];
const char *prefix;
unsigned stid;
int saved_errno;
if G_UNLIKELY(logfile[LOG_STDERR].disabled)
return;
/*
* Force emisison on stdout as well for fatal messages.
*/... | true | true | false | false | false | 1 |
handle_special_request (FileteaNode *self,
EvdHttpConnection *conn,
EvdHttpRequest *request,
SoupURI *uri,
gchar **tokens)
{
const gchar *id;
const gchar *action;
id = tokens[1];... | false | false | false | false | false | 0 |
_torture_create_kthread(int (*fn)(void *arg), void *arg, char *s, char *m,
char *f, struct task_struct **tp)
{
int ret = 0;
VERBOSE_TOROUT_STRING(m);
*tp = kthread_run(fn, arg, "%s", s);
if (IS_ERR(*tp)) {
ret = PTR_ERR(*tp);
VERBOSE_TOROUT_ERRSTRING(f);
*tp = NULL;
}
torture_shuffle_task_register(*... | false | false | false | false | false | 0 |
ipw_rf_kill(void *adapter)
{
struct ipw_priv *priv = adapter;
unsigned long flags;
spin_lock_irqsave(&priv->lock, flags);
if (rf_kill_active(priv)) {
IPW_DEBUG_RF_KILL("RF Kill active, rescheduling GPIO check\n");
schedule_delayed_work(&priv->rf_kill, 2 * HZ);
goto exit_unlock;
}
/* RF Kill is now disabl... | false | false | false | false | false | 0 |
prop_parse_boolean(const char *name,
const char *str, const char **endptr, gpointer vec, size_t i)
{
static const struct {
const char *s;
const gboolean v;
} tab[] = {
{ "0", FALSE },
{ "1", TRUE },
{ "FALSE", FALSE },
{ "TRUE", TRUE },
};
gboolean b = FALSE;
const char *p = NULL;
guint j;
int err... | false | false | false | false | false | 0 |
getInfoName(int infoType)
{
std::map<int, std::string>::iterator iter = myInfoTypeToNameMap.find(infoType);
if (iter != myInfoTypeToNameMap.end()) {
const std::string &name = iter->second;
return name.c_str();
}
return NULL;
} | false | false | false | false | false | 0 |
gx_flattened_iterator__prev(gx_flattened_iterator *self)
{
bool last; /* i.e. the first one in the forth order. */
if (self->i >= 1 << self->k)
return_error(gs_error_unregistered); /* Must not happen. */
self->lx1 = self->lx0;
self->ly1 = self->ly0;
if (self->k <= 1) {
/* If k==0, w... | false | false | false | false | false | 0 |
vs_scanline_resample_nearest_AYUV64 (uint8_t * dest8, uint8_t * src8,
int src_width, int n, int *accumulator, int increment)
{
guint16 *dest = (guint16 *) dest8;
guint16 *src = (guint16 *) src8;
int acc = *accumulator;
int i, j;
for (i = 0; i < n; i++) {
j = (acc + 0x8000) >> 16;
dest[i * 4 + 0]... | false | false | false | false | false | 0 |
last_active_insn (bb, skip_use_p)
basic_block bb;
int skip_use_p;
{
rtx insn = bb->end;
rtx head = bb->head;
while (GET_CODE (insn) == NOTE
|| GET_CODE (insn) == JUMP_INSN
|| (skip_use_p
&& GET_CODE (insn) == INSN
&& GET_CODE (PATTERN (insn)) == USE))
{
if (insn == head)
retu... | false | false | false | false | false | 0 |
cb_insert_cell_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
InsertCellState *state)
{
WorkbookControl *wbc = WORKBOOK_CONTROL (state->wbcg);
GtkWidget *radio_0;
int cols, rows;
int i;
radio_0 = go_gtk_builder_get_widget (state->gui, "radio_0");
g_return_if_fail (radio_0 != NULL);
i = gnm_gtk_radio_group... | false | false | false | false | false | 0 |
WriteArray(vtkKdNode *kd, int loc)
{
int nextloc = loc + 1;
int dim = kd->GetDim(); // 0 (X), 1 (Y), 2 (Z)
this->Npoints[loc] = kd->GetNumberOfPoints();
if (kd->GetLeft())
{
this->Dim[loc] = dim;
vtkKdNode *left = kd->GetLeft();
vtkKdNode *right = kd->GetRight();
this->Coord[loc]... | false | false | false | false | false | 0 |
map_edge(edge_t * e)
{
int j, k;
bezier bz;
if (ED_spl(e) == NULL) {
if ((Concentrate == FALSE) && (ED_edge_type(e) != IGNORED))
agerr(AGERR, "lost %s %s edge\n", agnameof(agtail(e)),
agnameof(aghead(e)));
return;
}
for (j = 0; j < ED_spl(e)->size; j++) {
bz = ED_spl(e)->list[j];
for (... | false | false | false | false | false | 0 |
iscsi_sysfs_for_each_iface_on_host(void *data, uint32_t host_no,
int *nr_found,
iscsi_sysfs_iface_op_fn *fn)
{
struct dirent **namelist;
int rc = 0, i, n;
struct iface_rec iface;
char devpath[PATH_SIZE];
char sysfs_path[PATH_SIZE];
char id[NAME_SIZE];
snprintf(i... | false | false | false | false | false | 0 |
gf_seng_encode_from_file(GF_SceneEngine *seng, u16 ESID, Bool disable_aggregation, char *auFile, gf_seng_callback callback)
{
GF_Err e;
GF_StreamContext *sc;
u32 i;
Bool dims = 0;
seng->loader.fileName = auFile;
seng->loader.ctx = seng->ctx;
seng->loader.force_es_id = ESID;
sc = NULL;
i=0;
while ((sc = (GF_... | false | false | false | false | false | 0 |
UpdateAI(const uint32 uiDiff) override
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
{
return;
}
// Shadow Flame Timer
if (m_uiShadowFlameTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_SHADOW_FLAME) == CAST_OK... | false | false | false | false | false | 0 |
dispatch(Interface* obj1, void* _obj2)
{
FWObject *obj2 = (FWObject*)(_obj2);
if (obj1->getParent()->getId() == obj2->getId()) return obj1;
if (!obj1->isRegular()) return NULL;
if ((obj1->getByType(IPv4::TYPENAME)).size()>1) return NULL;
if ((obj1->getByType(IPv6::TYPENAME)).size()>1) return NULL;... | false | false | false | false | false | 0 |
Accept(double Temperature, double DeltaCost)
{
if ((DeltaCost <= 0.0) || ((Temperature != 0.0) && (exp(-DeltaCost / Temperature) > DoubleRand())))
return true;
else
return false;
} | false | false | false | false | false | 0 |
mxf_write_essence_container_refs(AVFormatContext *s)
{
MXFContext *c = s->priv_data;
ByteIOContext *pb = s->pb;
int i;
mxf_write_refs_count(pb, c->essence_container_count);
av_log(s,AV_LOG_DEBUG, "essence container count:%d\n", c->essence_container_count);
for (i = 0; i < c->essence_container_c... | false | false | false | false | false | 0 |
st_table_child_get_x_expand (StTable *table,
ClutterActor *child)
{
StTableChild *meta;
g_return_val_if_fail (ST_IS_TABLE (table), 0);
g_return_val_if_fail (CLUTTER_IS_ACTOR (child), 0);
meta = get_child_meta (table, child);
return meta->x_expand;
} | false | false | false | false | false | 0 |
_dbus_message_iter_init_common (DBusMessage *message,
DBusMessageRealIter *real,
int iter_type)
{
_dbus_assert (sizeof (DBusMessageRealIter) <= sizeof (DBusMessageIter));
/* Since the iterator will read or write who-knows-what... | false | false | false | false | false | 0 |
printLogo(void)
{
uint32_t versionMajor, versionMinor, versionPatch;
MDynamicAudioNormalizer::getVersionInfo(versionMajor, versionMinor, versionPatch);
const char *buildDate, *buildTime, *buildCompiler, *buildArch; bool buildDebug;
MDynamicAudioNormalizer::getBuildInfo(&buildDate, &buildTime, &buildCompiler, &buil... | false | false | false | false | false | 0 |
cddb_direct_mc_alloc (struct disc_mc_data *data, int tracks)
{
int index, deindex;
data->data_total_tracks = tracks;
data->data_title_len = -1;
data->data_title = NULL;
data->data_artist_len = -1;
data->data_artist = NULL;
data->data_extended_len = -1;
data->data_extended = NULL;
if ((data->da... | false | false | false | false | true | 1 |
cisco_type_trans(struct sk_buff *skb, struct net_device *dev)
{
struct hdlc_header *data = (struct hdlc_header*)skb->data;
if (skb->len < sizeof(struct hdlc_header))
return cpu_to_be16(ETH_P_HDLC);
if (data->address != CISCO_MULTICAST &&
data->address != CISCO_UNICAST)
return cpu_to_be16(ETH_P_HDLC);
sw... | false | false | false | false | false | 0 |
accel_edited (GtkCellRendererAccel * accel,
gchar * path_string,
guint accel_key,
GdkModifierType accel_mods,
guint hardware_keycode, GladeEPropAccel * eprop_accel)
{
gboolean key_was_set;
GtkTreeIter iter, parent_iter, new_iter;
gchar *accel_text;
GladePr... | false | false | false | false | false | 0 |
main(int argc, char **argv)
{
int c;
progname = argv[0];
output_file = stdout;
while ((c = getopt(argc, argv, "o:V")) != -1)
switch (c) {
case 'o':
if (output_file != stdout)
fclose(output_file);
if ((output_file = fopen(optarg, "w")) == NULL)
err(1, "%s", optarg);
break;
case 'V':
fprin... | false | true | true | false | true | 1 |
strntoumax(const char *nptr, char **endptr, int base, size_t n)
{
int minus = 0;
uintmax_t v = 0;
int d;
while (n && isspace((unsigned char)*nptr)) {
nptr++;
n--;
}
/* Single optional + or - */
if (n && *nptr == '-') {
minus = 1;
nptr++;
n--;
} else if (n && *nptr == '+') {
nptr+... | false | false | false | false | false | 0 |
getline_UYVP (guint8 * dest, const GstBlendVideoFormatInfo * src, guint xoff,
int j)
{
int i;
const guint8 *srcline = GET_LINE (src, 0, j)
+ xoff * 3;
for (i = 0; i < src->width; i += 2) {
guint16 y0, y1;
guint16 u0;
guint16 v0;
u0 = (srcline[(i / 2) * 5 + 0] << 2) | (srcline[(i / 2) *... | false | false | false | false | false | 0 |
imgl_dialog_event(zdialog *zd, cchar *event)
{
GtkTextBuffer *textBuff;
GtkTextIter iter1, iter2;
char *ftemp;
static char *imagefile = 0;
int line, posn;
if (strEqu(event,"delete")) // delete file at cursor position
{
... | false | false | false | false | false | 0 |
set_paradoxical_subreg (rtx *subreg, void *pdx_subregs)
{
rtx reg;
if ((*subreg) == NULL_RTX)
return 1;
if (GET_CODE (*subreg) != SUBREG)
return 0;
reg = SUBREG_REG (*subreg);
if (!REG_P (reg))
return 0;
if (paradoxical_subreg_p (*subreg))
((bool *)pdx_subregs)[REGNO (reg)] = true;
retu... | false | false | false | false | false | 0 |
btmrvl_sdio_get_rx_unit(struct btmrvl_sdio_card *card)
{
u8 reg;
int ret;
reg = sdio_readb(card->func, card->reg->card_rx_unit, &ret);
if (!ret)
card->rx_unit = reg;
return ret;
} | false | false | false | false | false | 0 |
fpDiff(TIFF* tif, tidata_t cp0, tsize_t cc)
{
tsize_t stride = PredictorState(tif)->stride;
uint32 bps = tif->tif_dir.td_bitspersample / 8;
tsize_t wc = cc / bps;
tsize_t count;
uint8 *cp = (uint8 *) cp0;
uint8 *tmp = (uint8 *)_TIFFmalloc(cc);
if (!tmp)
... | false | false | false | false | false | 0 |
_k_view_list_do_postdraw(state_t *s, gfxw_list_t *list)
{
gfxw_dyn_view_t *widget = (gfxw_dyn_view_t *) list->contents;
while (widget) {
reg_t obj = make_reg(widget->ID, widget->subID);
if (widget->type == GFXW_SORTED_LIST)
_k_view_list_do_postdraw(s, GFXWC(widget));
if (widget->type != GFXW_DYN_VIEW) {
... | false | false | false | false | false | 0 |
crypto_cert_select_default(krb5_context context,
pkinit_plg_crypto_context plg_cryptoctx,
pkinit_req_crypto_context req_cryptoctx,
pkinit_identity_crypto_context id_cryptoctx)
{
krb5_error_code retval;
int cert_count = 0;
retv... | false | false | false | false | false | 0 |
write_uninitialized_csrs_and_memories(struct hfi1_devdata *dd)
{
int i, j;
/* CceIntMap */
for (i = 0; i < CCE_NUM_INT_MAP_CSRS; i++)
write_csr(dd, CCE_INT_MAP+(8*i), 0);
/* SendCtxtCreditReturnAddr */
for (i = 0; i < dd->chip_send_contexts; i++)
write_kctxt_csr(dd, i, SEND_CTXT_CREDIT_RETURN_ADDR, 0);
/* ... | false | false | false | false | false | 0 |
initialize( Chuck_VM_Code * c,
t_CKUINT mem_stack_size,
t_CKUINT reg_stack_size )
{
// allocate mem and reg
if( !mem->initialize( mem_stack_size ) ) return FALSE;
if( !reg->initialize( reg_stack_size ) ) return FALSE;
// program... | false | false | false | false | false | 0 |
expand_string_for_rhs (string, quoted, dollar_at_p, has_dollar_at)
char *string;
int quoted, *dollar_at_p, *has_dollar_at;
{
WORD_DESC td;
WORD_LIST *tresult;
if (string == 0 || *string == '\0')
return (WORD_LIST *)NULL;
td.flags = 0;
td.word = string;
tresult = call_expand_word_internal (&t... | false | false | false | false | false | 0 |
nm_setting_vpn_add_data_item (NMSettingVPN *setting,
const char *key,
const char *item)
{
g_return_if_fail (NM_IS_SETTING_VPN (setting));
g_return_if_fail (key != NULL);
g_return_if_fail (strlen (key) > 0);
g_return_if_fail (item != NULL);
g_return_if_fai... | false | false | false | false | false | 0 |
variable_add(plugin_t *plugin, const char *name, int type, int display, void *ptr, variable_notify_func_t *notify, variable_map_t *map, variable_display_func_t *dyndisplay) {
variable_t *v;
char *__name;
if (!name)
return NULL;
if (plugin && !xstrchr(name, ':'))
__name = saprintf("%s:%s", plugin->name, name);... | false | false | false | false | false | 0 |
extractMemberName( const QMetaMethod &member )
{
QString sig = member.signature();
return sig.left( sig.indexOf('(') ).toLatin1();
} | false | false | false | false | false | 0 |
set_hash(struct hashtable *h, char *key, char *value)
{
int i,j;
if (h->nent*5 > h->size*4)
rehash(h, h->nval*3);
j=-1;
i=crc(key)%h->size;
while (h->tab[i].left)
{
if (h->tab[i].left==DELETED_HASHENTRY)
if (j==-1)
j=i;
if (!strcmp(h->tab[i].l... | false | false | false | false | false | 0 |
ProcessData(char* p, int len)
{
int res;
enum Command commandId = GetCurrentCommandId();
switch (commandId)
{
case cmd_transfer:
res = FileTransferParseResponse(p, len);
break;
default:
LogMessage(Debug_Warning, _T("No action for parsing data for command %d"), (int)commandId);
ResetOperation(FZ_REPLY_INTE... | false | false | false | false | false | 0 |
kobj_to_hstate(struct kobject *kobj, int *nidp)
{
int i;
for (i = 0; i < HUGE_MAX_HSTATE; i++)
if (hstate_kobjs[i] == kobj) {
if (nidp)
*nidp = NUMA_NO_NODE;
return &hstates[i];
}
return kobj_to_node_hstate(kobj, nidp);
} | false | false | false | false | false | 0 |
skip_ascii(FILE *fp, int num)
{
int c,prev,curr,found;
c = getc(fp);
if (c == ' ' || c == '\n' || c == '\t'){
prev = 0;
found = 0;
}
else {
prev = 1;
found = 1;
}
while (1) {
c = getc(fp);
if (c == ' ' || c == '\n' || c == '\t') curr = 0;
else curr = 1;
... | false | true | false | false | true | 1 |
qpol_role_get_type_iter(const qpol_policy_t * policy, const qpol_role_t * datum, qpol_iterator_t ** types)
{
role_datum_t *internal_datum = NULL;
policydb_t *db = NULL;
ebitmap_t *expanded_set = NULL;
int error;
ebitmap_state_t *es = NULL;
if (policy == NULL || datum == NULL || types == NULL) {
if (types != NU... | false | false | false | false | false | 0 |
do_newobj (VerifyContext *ctx, int token)
{
ILStackDesc *value;
int i;
MonoMethodSignature *sig;
MonoMethod *method;
gboolean is_delegate = FALSE;
if (!(method = verifier_load_method (ctx, token, "newobj")))
return;
if (!mono_method_is_constructor (method)) {
ADD_VERIFY_ERROR (ctx, g_strdup_printf ("Metho... | false | false | false | false | false | 0 |
ooTimerNextTimeout (DList *pList, struct timeval* ptimeout)
{
OOTimer* ptimer;
struct timeval tvstr;
if (pList->count == 0) return 0;
ptimer = (OOTimer*) pList->head->data;
ooGetTimeOfDay (&tvstr, 0);
ptimeout->tv_sec =
OOMAX ((int) 0, (int) (ptimer->expireTime.tv_sec - tvstr.tv_sec));
... | false | false | false | false | false | 0 |
hugetlb_cgroup_move_parent(int idx, struct hugetlb_cgroup *h_cg,
struct page *page)
{
unsigned int nr_pages;
struct page_counter *counter;
struct hugetlb_cgroup *page_hcg;
struct hugetlb_cgroup *parent = parent_hugetlb_cgroup(h_cg);
page_hcg = hugetlb_cgroup_from_page(page);
/*
* We can have pages i... | false | false | false | false | false | 0 |
symsize(unsigned sym, const struct huftrees *trees)
{
unsigned basesym = sym &~ SYMPFX_MASK;
switch (sym & SYMPFX_MASK) {
case SYMPFX_LITLEN:
return trees->len_litlen[basesym];
case SYMPFX_DIST:
return trees->len_dist[basesym];
case SYMPFX_CODELEN:
return trees->len_codelen[basesym];
... | false | false | false | false | false | 0 |
xlsx_write_autofilters (XLSXWriteState *state, GsfXMLOut *xml)
{
GnmFilter const *filter;
GnmFilterCondition const *cond;
unsigned i;
if (NULL == state->sheet->filters)
return;
filter = state->sheet->filters->data;
gsf_xml_out_start_element (xml, "autoFilter");
xlsx_add_range (xml, "ref", &filter->r);
for ... | false | false | false | false | false | 0 |
bson_oid_from_string( bson_oid_t *oid, const char *str ) {
int i;
for ( i=0; i<12; i++ ) {
oid->bytes[i] = ( hexbyte( str[2*i] ) << 4 ) | hexbyte( str[2*i + 1] );
}
} | false | false | false | false | false | 0 |
GetOverview(int nLevel)
{
if (nZoomLevel != 0)
return NULL;
OZIDataset *poGDS = (OZIDataset *) poDS;
if (nLevel < 0 || nLevel >= poGDS->nZoomLevelCount - 1)
return NULL;
return poGDS->papoOvrBands[nLevel + 1];
} | false | false | false | false | false | 0 |
get_key_buffer(WINDOW *win)
{
int input;
size_t errcount;
/* If the keystroke buffer isn't empty, get out. */
if (key_buffer != NULL)
return;
/* Read in the first character using blocking input. */
#ifndef NANO_TINY
allow_pending_sigwinch(TRUE);
#endif
/* Just before reading in the first... | false | false | false | false | false | 0 |
flickr_service_add_signature (FlickrService *self,
const char *method,
const char *url,
GHashTable *parameters)
{
if (self->priv->server->new_authentication)
oauth_service_add_signature (OAUTH_SERVICE (self), method, url, parameters);
else
flickr_service_old_auth_add_api_sig (s... | false | false | false | false | false | 0 |
on_radiobutton17_toggled (GtkToggleButton *togglebutton,
gpointer user_data)
{
gboolean success = FALSE;
GError **error = NULL;
global_alt_unit = (gtk_toggle_button_get_active(togglebutton)) ? 0 : global_alt_unit;
success = gconf_client_set_int(
... | false | false | false | false | false | 0 |
loadingScreen() {
if(!gGourceDrawBackground) return;
display.mode2D();
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glEnable(GL_TEXTURE_2D);
glColor4f(1.0, 1.0, 1.0, 1.0);
const char* progress = "";
switch(int(runtime*3.0f)%4) {
case 0:
... | false | false | false | false | false | 0 |
operator* (const cl_RA& r, const cl_RA& s)
{
// Methode (vgl. [Buchberger, Collins, Loos: Computer Algebra, S.201])
// r,s beide Integers -> klar.
// r=a/b, s=c ->
// Bei c=0 Ergebnis 0.
// g:=ggT(b,c).
// Falls g=1: Ergebnis (a*c)/b (mit b>1, ggT(a*c,b)=1).
// Sonst: b':=b/g, c':=c/g, Ergebnis (a*c')/b' (mit g... | false | false | false | false | false | 0 |
pci_common_swizzle(struct pci_dev *dev, u8 *pinp)
{
u8 pin = *pinp;
while (!pci_is_root_bus(dev->bus)) {
pin = pci_swizzle_interrupt_pin(dev, pin);
dev = dev->bus->self;
}
*pinp = pin;
return PCI_SLOT(dev->devfn);
} | false | false | false | false | false | 0 |
compute_bb_for_insn (void)
{
basic_block bb;
FOR_EACH_BB (bb)
{
rtx end = BB_END (bb);
rtx insn;
for (insn = BB_HEAD (bb); ; insn = NEXT_INSN (insn))
{
BLOCK_FOR_INSN (insn) = bb;
if (insn == end)
break;
}
}
} | false | false | false | false | false | 0 |
load_revtype_data(void) {
int i;
/* load combs data */
num_combs = 2 * curr->num_combs;
for (i = 0; i < curr->num_combs; i++) {
combs[2*i].buflen = curr->combs_data[3*i] * sample_rate / 1000.0f;
combs[2*i].feedback = curr->combs_data[3*i+1];
combs[2*i].freq_resp = LIMIT(curr->combs_data[3*i+2]
*... | false | false | false | false | false | 0 |
free_field_buffers_larger_than(TABLE *table, uint32 size)
{
uint *ptr, *end;
for (ptr= table->s->blob_field, end=ptr + table->s->blob_fields ;
ptr != end ;
ptr++)
{
Field_blob *blob= (Field_blob*) table->field[*ptr];
if (blob->get_field_buffer_size() > size)
blob->free();
}
} | false | false | false | false | false | 0 |
lad_sm_make_offset(Module_table *module,
Loop *sm_loop,
StripMining *sm,
Array_table *ldm,
int dim)
{
StripMiningInnerLoop *smil;
Block *block;
List *li;
SemTree *vss, *vss_prev, *vss_max, *vss_max_prev, *max_access_sem, *min_access_sem;
Operand *min_access_op, *max_access_op... | false | false | false | false | false | 0 |
gitg_commit_refresh (GitgCommit *commit)
{
g_return_if_fail (GITG_IS_COMMIT (commit));
shell_cancel (commit);
g_hash_table_foreach (commit->priv->files, (GHFunc)set_can_delete, commit);
/* Read other files */
if (commit->priv->repository)
{
update_index (commit);
}
else
{
refresh_done (commit->priv->she... | false | false | false | false | false | 0 |
SECOID_Init(void)
{
PLHashEntry *entry;
const SECOidData *oid;
int i;
char * envVal;
volatile char c; /* force a reference that won't get optimized away */
c = __nss_util_rcsid[0] + __nss_util_sccsid[0];
if (oidhash) {
return SECSuccess; /* already initialized */
}
if (!PR_GetEnv... | false | false | false | false | false | 0 |
pushCommand(const UndoCommand& cmd)
{
m_commands.append(cmd);
emit q->undoAvailable(true);
emit q->undoTextChanged(q->undoText());
} | false | false | false | false | false | 0 |
find_symbol( const char * name )
{
size_t i;
for ( i = 0; i < nsymbols; i++ )
if ( ! strcmp( symbols[ i ].name, name ) )
break;
return i < nsymbols ? symbols + i : NULL;
} | false | false | false | false | false | 0 |
lutil_passwd(
const struct berval *passwd, /* stored passwd */
const struct berval *cred, /* user cred */
const char **schemes,
const char **text )
{
struct pw_slist *pws;
if ( text ) *text = NULL;
if (cred == NULL || cred->bv_len == 0 ||
passwd == NULL || passwd->bv_len == 0 )
{
return -1;
}
if (!pw_... | false | false | false | false | false | 0 |
midgard_storage_exists (MidgardConnection *mgd, const gchar *name)
{
g_return_val_if_fail (mgd != NULL, FALSE);
g_return_val_if_fail (name != NULL, FALSE);
MidgardDBObjectClass *klass = g_type_class_peek (g_type_from_name (name));
if (!MIDGARD_IS_DBOBJECT_CLASS (klass)) {
g_warning ("Expected DBObject derived in... | false | false | false | false | false | 0 |
LaunchScript (int *NbArg,long *TabArg)
{
char *arg,*execstr,*str,*scriptarg,*scriptname;
unsigned long leng;
int i;
Atom MyAtom;
/* Lecture des arguments */
(*NbArg)++;
arg = CalcArg(TabArg,NbArg);
str = (char*)safecalloc(100,sizeof(char));
/* Calcul du nom du script fils */
x11base->TabScriptId[x... | false | false | false | false | false | 0 |
UpdateExtraTable(TXT_UNCAST_ARG(widget),
TXT_UNCAST_ARG(extra_table))
{
TXT_CAST_ARG(txt_table_t, extra_table);
// Rebuild the GUS table. Start by emptying it, then only add the
// GUS control widget if we are in GUS music mode.
TXT_ClearTable(extra_table);
if (snd_mu... | false | false | false | false | false | 0 |
cp_set_mac_address(struct net_device *dev, void *p)
{
struct cp_private *cp = netdev_priv(dev);
struct sockaddr *addr = p;
if (!is_valid_ether_addr(addr->sa_data))
return -EADDRNOTAVAIL;
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
spin_lock_irq(&cp->lock);
cpw8_f(Cfg9346, Cfg9346_Unlock);
cpw32_f(... | false | true | false | false | false | 1 |
AcpiOsReleaseObject (
ACPI_MEMORY_LIST *Cache,
void *Object)
{
ACPI_STATUS Status;
ACPI_FUNCTION_ENTRY ();
if (!Cache || !Object)
{
return (AE_BAD_PARAMETER);
}
/* If cache is full, just free this object */
if (Cache->CurrentDepth >... | false | false | false | false | false | 0 |
parse_options(int argc, char ** argv)
{
int c;
for (c=getopt(argc, argv, OPTIONS_LIST);
c!=-1;
c=getopt(argc, argv, OPTIONS_LIST))
{
switch(c)
{
case 'h':
usage();
exit(0);
case '?':
break;
default:
fprintf (stderr, "?? getopt returned cha... | false | false | false | false | false | 0 |
asd_com_sas_isr(struct asd_ha_struct *asd_ha)
{
u32 comstat = asd_read_reg_dword(asd_ha, COMSTAT);
/* clear COMSTAT int */
asd_write_reg_dword(asd_ha, COMSTAT, 0xFFFFFFFF);
if (comstat & CSBUFPERR) {
asd_printk("%s: command/status buffer dma parity error\n",
pci_name(asd_ha->pcidev));
} else if (comstat ... | false | false | false | false | false | 0 |
getForeignDataWrappers(int *numForeignDataWrappers)
{
PGresult *res;
int ntups;
int i;
PQExpBuffer query = createPQExpBuffer();
FdwInfo *fdwinfo;
int i_tableoid;
int i_oid;
int i_fdwname;
int i_rolname;
int i_fdwvalidator;
int i_fdwacl;
int i_fdwoptions;
/* Before 8.4, there are no ... | false | true | false | false | false | 1 |
sche_task_array_set_order(Sche_task ****array, int pc_num, int acc_num)
{
Sche_task ***array_cpu = array[PROC_CPU];
Sche_task ***array_acc = array[PROC_ACC];
Sche_task *task;
int pc_no;
int pred = 0;
int *cntr = alloc_int_vector(pc_num + acc_num);
for (pc_no = 0; pc_no < pc_num; pc_no++) {
... | false | false | false | false | false | 0 |
progressBar(QWidget *w)
{
if (!d->m_ProgressBar)
d->m_ProgressBar = new QProgressBar(w);
return d->m_ProgressBar;
} | false | false | false | false | false | 0 |
WriteToAsWrappedType( const WrappedType & W )
{
wxASSERT( W.eWrappedType == eWrappedType );
switch( eWrappedType )
{
case eWrappedString:
*mpStr = *W.mpStr;
break;
case eWrappedInt:
*mpInt = *W.mpInt;
break;
case eWrappedDouble:
*mpDouble = *W.mpDouble;
break;
ca... | false | false | false | false | false | 0 |
GetEvents(alist<astring> &events)
{
lock();
if (m_socket == -1 && !open()) {
unlock();
return false;
}
if (net_send(m_socket, "events", 6) != 6) {
close();
unlock();
return false;
}
events.clear();
char temp[1024];
int len;
while ((len = net_recv(m_socket, te... | false | false | false | false | false | 0 |
adis16203_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2,
long mask)
{
struct adis *st = iio_priv(indio_dev);
int ret;
int bits;
u8 addr;
s16 val16;
switch (mask) {
case IIO_CHAN_INFO_RAW:
return adis_single_conversion(indio_dev, chan,
... | false | false | false | false | false | 0 |
frontlocate(struct mesh *m, struct splaynode *splayroot,
struct otri *bottommost, vertex searchvertex,
struct otri *searchtri, int *farright)
#else /* not ANSI_DECLARATORS */
struct splaynode *frontlocate(m, splayroot, bottommost, searchvertex,
... | false | false | false | false | false | 0 |
locate(pattern,linep)
/* locate: find a character in a closure */
char *pattern;
register char *linep;
{
register char *p = 1+pattern;
register int count;
if ((count = (*p++)&0xff) == 0)
return FALSE;
while (count--)
if (*p++ == *linep)
return TRUE;
return FALSE;
} | false | false | false | false | false | 0 |
ajGraphicsDrawposBox(PLFLT x, PLFLT y,PLFLT size)
{
PLFLT xa[5];
PLFLT ya[5];
if(graphData)
{
ajFmtPrintF(graphData->File,"Rectangle x1 %f y1 %f x2 %f"
" y2 %f colour %d\n",
x, y, x+size, y+size, currentfgcolour);
graphData->Lines++;
}
else
{
xa[0] = x;
ya[0] = y;
xa[1] = x... | false | false | false | false | false | 0 |
remparty(char *bot, int sock)
{
int i;
for (i = 0; i < parties; i++)
if ((!egg_strcasecmp(party[i].bot, bot)) && (party[i].sock == sock)) {
parties--;
if (party[i].from)
nfree(party[i].from);
if (party[i].away)
nfree(party[i].away);
if (i < parties) {
strcpy(part... | false | false | false | false | false | 0 |
chk_filter_chain(ap_filter_t *f)
{
ap_filter_t *curf;
charset_filter_ctx_t *curctx, *last_xlate_ctx = NULL,
*ctx = f->ctx;
int output = !strcasecmp(f->frec->name, XLATEOUT_FILTER_NAME);
if (ctx->noop) {
return;
}
/* walk the filter chain; see if it makes sense for our filter to... | false | false | false | false | false | 0 |
_node(struct dm_pool *mem, int type,
struct rx_node *l, struct rx_node *r)
{
struct rx_node *n = dm_pool_zalloc(mem, sizeof(*n));
if (n) {
if (type == CHARSET && !(n->charset = dm_bitset_create(mem, 256))) {
dm_pool_free(mem, n);
return NULL;
}
n->type = type;
n->left = l;
n->right = r;
}
... | false | false | false | false | false | 0 |
trace_ok_for_array(struct tracer *t, struct trace_array *tr)
{
return (tr->flags & TRACE_ARRAY_FL_GLOBAL) || t->allow_instances;
} | false | false | false | false | false | 0 |
mono_ssa_deadce (MonoCompile *cfg)
{
int i;
GList *work_list;
g_assert (cfg->comp_done & MONO_COMP_SSA);
//printf ("DEADCE %s\n", mono_method_full_name (cfg->method, TRUE));
if (!(cfg->comp_done & MONO_COMP_SSA_DEF_USE))
mono_ssa_create_def_use (cfg);
mono_ssa_copyprop (cfg);
work_list = NULL;
for (i = ... | false | false | false | false | false | 0 |
bdc_gadget_ep_queue(struct usb_ep *_ep,
struct usb_request *_req, gfp_t gfp_flags)
{
struct bdc_req *req;
unsigned long flags;
struct bdc_ep *ep;
struct bdc *bdc;
int ret;
if (!_ep || !_ep->desc)
return -ESHUTDOWN;
if (!_req || !_req->complete || !_req->buf)
return -EINVAL;
ep = to_bdc_ep(_ep);
req ... | false | false | false | false | false | 0 |
insertBetween(AVLTree *l, AVLTree *r)
{
if (l)
l->elem[RIGHT] = this;
if (r)
r->elem[LEFT] = this;
elem[LEFT] = l;
elem[RIGHT] = r;
} | 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.