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 |
|---|---|---|---|---|---|---|
terminate(Solver& s, bool complete) {
if (!shared_->terminate()) {
if (complete && shared_->enumerator()->optimizeHierarchical() && s.popRootLevel(s.rootLevel())) {
// Problem is unsat and hierarchical optimization is active.
// The active level is at its optimum, but lower-priority levels might
// still be... | false | false | false | false | false | 0 |
_GD_CopyGlobalError(DIRFILE* D)
{
dtrace("%p", D);
_GD_GlobalErrors.suberror = D->suberror;
_GD_GlobalErrors.error_line = D->error_line;
free(_GD_GlobalErrors.error_file);
_GD_GlobalErrors.error_file = (D->error_file) ? strdup(D->error_file) : NULL;
free(_GD_GlobalErrors.error_string);
_GD_GlobalErrors.e... | true | true | false | false | false | 1 |
ario_radio_state_changed_cb (ArioServer *server,
ArioRadio *radio)
{
ARIO_LOG_FUNCTION_START;
if (radio->priv->connected != ario_server_is_connected ()) {
radio->priv->connected = ario_server_is_connected ();
/* Fill radio list */
... | false | false | false | false | false | 0 |
png_set_pHYs(png_const_structrp png_ptr, png_inforp info_ptr,
png_uint_32 res_x, png_uint_32 res_y, int unit_type)
{
png_debug1(1, "in %s storage function", "pHYs");
if (png_ptr == NULL || info_ptr == NULL)
return;
info_ptr->x_pixels_per_unit = res_x;
info_ptr->y_pixels_per_unit = res_y;
info... | false | false | false | false | false | 0 |
afs_mntpt_kill_timer(void)
{
_enter("");
ASSERT(list_empty(&afs_vfsmounts));
cancel_delayed_work_sync(&afs_mntpt_expiry_timer);
} | false | false | false | false | false | 0 |
boinc_fopen(const char* const path, const char* mode) {
// if opening for read, and file isn't there,
// leave now (avoid 5-second delay!!)
//
if (strchr(mode, 'r')) {
if (!boinc_file_exists(path)) {
return 0;
}
}
#ifndef _USING_FCGI_
FILE *f = fopen(path, mode);
#els... | false | false | false | false | false | 0 |
go_pattern_palette_render_func (cairo_t *cr,
GdkRectangle const *area,
int index,
gpointer data)
{
GOPattern pattern;
GOPatternSelectorState *state = data;
cairo_pattern_t *cr_pattern;
if (state) {
pattern.fore = state->foreground;
pattern.back = state->background;
} else {
pattern.fore = GO_COL... | false | false | false | false | false | 0 |
ConvertPath(const char* texture_name, const char* header_name, std::string& out) const
{
// If the MD3's internal path itself and the given path are using
// the same directory, remove it completely to get right output paths.
const char* end1 = ::strrchr(header_name,'\\');
if (!end1)end1 = ::strrchr(header_name,'... | false | false | false | false | false | 0 |
ib_mad_post_receive_mads(struct ib_mad_qp_info *qp_info,
struct ib_mad_private *mad)
{
unsigned long flags;
int post, ret;
struct ib_mad_private *mad_priv;
struct ib_sge sg_list;
struct ib_recv_wr recv_wr, *bad_recv_wr;
struct ib_mad_queue *recv_queue = &qp_info->recv_queue;
/* Initialize common scatter... | false | false | false | false | false | 0 |
decRefCnt() {
GBool done;
#if MULTITHREADED
gLockMutex(&mutex);
#endif
done = --refCnt == 0;
#if MULTITHREADED
gUnlockMutex(&mutex);
#endif
if (done) {
delete this;
}
} | false | false | false | false | false | 0 |
ctf_env_visit(FILE *fd, int depth, struct ctf_node *node, struct ctf_trace *trace)
{
int ret = 0;
struct ctf_node *iter;
if (node->visited)
return 0;
node->visited = 1;
trace->env.vpid = -1;
trace->env.procname[0] = '\0';
trace->env.hostname[0] = '\0';
trace->env.domain[0] = '\0';
trace->env.sysname[0] = '... | false | false | false | false | false | 0 |
eventFilter(QObject* object, QEvent* event)
{
ASSERT_ENGAUGE(event != 0);
switch (event->type())
{
case QEvent::Close:
if ((DigitMain*) object == this)
{
// close button in titlebar was clicked
if (!safeToQuit())
return true; // true filters the event out according to QOb... | false | false | false | true | false | 1 |
cmdline_add_efi(char *cmdline)
{
FILE *fp;
int cmdlen, len;
char line[MAX_LINE], *s;
const char *acpis = " acpi_rsdp=";
fp = fopen("/sys/firmware/efi/systab", "r");
if (!fp)
return;
while(fgets(line, sizeof(line), fp) != 0) {
/* ACPI20= always goes before ACPI= */
if ((strstr(line, "ACPI20=")) || (strstr... | false | false | false | false | false | 0 |
_status_sess_end(mod_instance_t mi, sess_t sess) {
time_t t, lastlogin;
os_t os;
os_object_t o;
st_ret_t ret;
nad_t nad;
/* not interested if there is other top session */
if(sess->user->top != NULL && sess != sess->user->top)
return;
ret = storage_get(sess->user->sm->st, "stat... | false | false | false | false | false | 0 |
runReconUnits ( )
{
vector<int> reconUnits;
Player::VehicleList::iterator nvi;
for ( Player::VehicleList::iterator vi = getPlayer().vehicleList.begin(); vi != getPlayer().vehicleList.end(); ++vi) {
Vehicle* veh = *vi;
if ( veh->aiparam[getPlayerNum()] && veh->aiparam[getPlayerNum()]->getJob... | false | false | false | false | false | 0 |
vmw_dx_shader_create(struct vmw_resource *res)
{
struct vmw_private *dev_priv = res->dev_priv;
struct vmw_dx_shader *shader = vmw_res_to_dx_shader(res);
int ret = 0;
WARN_ON_ONCE(!shader->committed);
if (!list_empty(&res->mob_head)) {
mutex_lock(&dev_priv->binding_mutex);
ret = vmw_dx_shader_unscrub(res);
... | false | false | false | false | false | 0 |
gst_tcp_client_sink_render (GstBaseSink * bsink, GstBuffer * buf)
{
GstTCPClientSink *sink;
GstMapInfo map;
gsize written = 0;
gssize rret;
GError *err = NULL;
sink = GST_TCP_CLIENT_SINK (bsink);
g_return_val_if_fail (GST_OBJECT_FLAG_IS_SET (sink, GST_TCP_CLIENT_SINK_OPEN),
GST_FLOW_FLUSHING);
... | false | false | false | false | false | 0 |
dev_c3725_read_wic_eeprom(struct c3725_iofpga_data *d)
{
struct cisco_eeprom *eeprom;
u_int wic_port;
u_int eeprom_offset;
m_uint8_t val[2];
switch(d->wic_select) {
case 0x1700:
wic_port = 0x10;
break;
case 0x1D00:
wic_port = 0x20;
break;
case 0x3... | false | false | false | false | false | 0 |
characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) {
return 0;
}
if (offset < 0 || count < 0 || max < 0 || offset >= max... | false | false | false | false | false | 0 |
Scan_Process_Fields_Functions (gchar **string)
{
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ProcessFieldsConvertIntoSpace)))
{
Scan_Convert_Underscore_Into_Space(*string);
Scan_Convert_P20_Into_Space(*string);
}
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ProcessFieldsCon... | false | false | false | false | false | 0 |
gnutls_x509_crt_import (gnutls_x509_crt_t cert,
const gnutls_datum_t * data,
gnutls_x509_crt_fmt_t format)
{
int result = 0, need_free = 0;
gnutls_datum_t _data;
if (cert == NULL)
{
gnutls_assert ();
return GNUTLS_E_INVALID_REQUEST;
}
_data.d... | false | false | false | false | false | 0 |
ath6kl_wmi_set_apsd_bfrd_traf(struct wmi *wmi, u8 if_idx,
u16 aid, u16 bitmap, u32 flags)
{
struct wmi_ap_apsd_buffered_traffic_cmd *cmd;
struct sk_buff *skb;
skb = ath6kl_wmi_get_new_buf(sizeof(*cmd));
if (!skb)
return -ENOMEM;
cmd = (struct wmi_ap_apsd_buffered_traffic_cmd *)skb->data;
cmd->aid = ... | false | false | false | false | false | 0 |
handle_aeskey (unsigned char *payload, int len)
{
CHANNEL *ch;
int ret;
DSFYDEBUG ("Server said 0x0d (AES key) for channel %d\n",
ntohs (*(unsigned short *) (payload + 2)))
if ((ch =
channel_by_id (ntohs
(*(unsigned short *) (payload + 2)))) !=
NULL) {
ret = ch->callback (ch, payload +... | false | false | false | false | true | 1 |
str_lower (lua_State *L) {
size_t l;
size_t i;
luaL_Buffer b;
const char *s = luaL_checklstring(L, 1, &l);
luaL_buffinit(L, &b);
for (i=0; i<l; i++)
luaL_addchar(&b, tolower(uchar(s[i])));
luaL_pushresult(&b);
return 1;
} | false | false | false | false | false | 0 |
r820t_read_gain(struct r820t_priv *priv)
{
u8 data[4];
int rc;
rc = r820t_read(priv, 0x00, data, sizeof(data));
if (rc < 0)
return rc;
return ((data[3] & 0x08) << 1) + ((data[3] & 0xf0) >> 4);
} | false | false | false | false | false | 0 |
gst_section_filter_init (GstSectionFilter * filter)
{
g_return_if_fail (filter != NULL);
filter->adapter = gst_adapter_new ();
/* continuity counter can at max be 15
* we make 255 as an indication that
* there is no last continuity counter */
filter->last_continuity_counter = 255;
filter->section_length... | false | false | false | false | false | 0 |
postCreateGpuPrograms( ProgramSet* programSet )
{
// Bind vertex shader auto parameters.
bindAutoParameters(programSet->getCpuVertexProgram(), programSet->getGpuVertexProgram());
// Bind fragment shader auto parameters.
bindAutoParameters(programSet->getCpuFragmentProgram(), programSet->getGpuFragmentP... | false | false | false | false | false | 0 |
r_noun(struct SN_env * z) {
int among_var;
z->ket = z->c; /* [, line 160 */
among_var = find_among_b(z, a_5, 36); /* substring, line 160 */
if (!(among_var)) return 0;
z->bra = z->c; /* ], line 160 */
switch(among_var) {
case 0: return 0;
case 1:
{ int ret = slice_d... | false | false | false | false | false | 0 |
avr_free_part(AVRPART * d)
{
int i;
ldestroy_cb(d->mem, (void(*)(void *))avr_free_mem);
d->mem = NULL;
for(i=0;i<sizeof(d->op)/sizeof(d->op[0]);i++)
{
if (d->op[i] != NULL)
{
avr_free_opcode(d->op[i]);
d->op[i] = NULL;
}
}
free(d);
} | false | false | false | false | false | 0 |
ns__sendString(struct soap *soap, char *str)
{ if (check_header(soap))
printf("Malformed header\n");
else if (check_received(soap->header->wsa__MessageID))
printf("One-way message %s already received\n", soap->header->wsa__MessageID);
else
printf("One-way message %s accepted and serviced\n", soap->heade... | false | false | false | false | false | 0 |
packet_iterator_next_cprl (PacketIterator * it)
{
g_return_val_if_fail (it->cur_resolution < it->n_resolutions, FALSE);
if (it->first) {
packet_iterator_changed_resolution_or_component (it);
it->first = FALSE;
return TRUE;
}
it->cur_layer += 1;
if (it->cur_layer >= it->n_layers) {
it->cur_la... | false | false | false | false | false | 0 |
mdc_key_load_set (struct mdc_key *keys, char *pattern, gf_boolean_t val)
{
struct mdc_key *key = NULL;
for (key = keys; key->name; key++) {
if (is_strpfx (key->name, pattern))
key->load = val;
}
return 0;
} | false | false | false | false | false | 0 |
tag2_pref_browser_remove(GtkWidget * but, GtkComboBox * box)
{
GtkTreeIter iter;
if (gtk_combo_box_get_active_iter(box, &iter))
{
GtkTreeModel *model = gtk_combo_box_get_model(box);
gchar *name;
gchar *key;
tag_browser *tb;
gtk_tree_model_get(model, &iter, 2, &tb, -1);
gtk_list_store_remove(GTK_LIST_STOR... | false | false | false | false | false | 0 |
X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)
{
EVP_PKEY *xk=NULL;
int ok=0;
xk=X509_REQ_get_pubkey(x);
switch (EVP_PKEY_cmp(xk, k))
{
case 1:
ok=1;
break;
case 0:
X509err(X509_F_X509_REQ_CHECK_PRIVATE_KEY,X509_R_KEY_VALUES_MISMATCH);
break;
case -1:
X509err(X509_F_X509_REQ_CHECK_PRIVATE_KEY... | false | false | false | false | false | 0 |
keep_alive()
{
CL_ThreadId cur_thread_id = CL_Thread::get_current_id();
CL_MutexSection mutex_lock(&mutex_keep_alive);
std::map<CL_ThreadId, std::list<CL_KeepAlive*>* >::iterator it_map;
it_map = keep_alives.find(cur_thread_id);
if (it_map == keep_alives.end()) return;
std::list<CL_KeepAlive*> *list = it_map->se... | false | false | false | false | false | 0 |
get_parameterized_joinrel_size(PlannerInfo *root, RelOptInfo *rel,
double outer_rows,
double inner_rows,
SpecialJoinInfo *sjinfo,
List *restrict_clauses)
{
double nrows;
/*
* Estimate the number of rows returned by the parameterized join as the
* sizes of the input paths ... | false | false | false | false | false | 0 |
cff_Encoding_size(int num_encoded, int num_encoded_chars)
{
int n = min(num_encoded, 255);
return 2 + n +
(num_encoded_chars > n ?
1 + (num_encoded_chars - n) * 3 : 0);
} | false | false | false | false | false | 0 |
owReadBitISR(int state) {
switch (state) {
case OW_STATE_0:
owLo();
timerSetAlarm1(2, owReadBitISR, OW_STATE_1);
break;
case OW_STATE_1:
owPinIn();
timerSetAlarm1(10, owReadBitISR, OW_STATE_2);
break;
case OW_STATE_2:
owData.bitValue = owRead();
timerSetAlarm1(25, owReadBitISR, OW_STATE... | false | false | false | false | false | 0 |
do_getpw()
{
struct passwd *pw=getpwuid(getuid());
if (!pw)
{
perror("getpwuid");
exit(1);
}
return(pw);
} | false | false | false | false | false | 0 |
onRefreshTimer(FXObject*,FXSelector,void*){
if(flags&FLAG_UPDATE){
scan(FALSE);
counter=(counter+1)%REFRESHFREQUENCY;
}
getApp()->addTimeout(this,ID_REFRESHTIMER,REFRESHINTERVAL);
return 0;
} | false | false | false | false | false | 0 |
SPF_dns_test_new(SPF_dns_server_t *layer_below,
const char *name, int debug)
{
SPF_dns_server_t *spf_dns_server;
int i;
if (name == NULL)
name = "test";
spf_dns_server = SPF_dns_zone_new(layer_below, name, debug);
if (spf_dns_server == NULL)
return NULL;
for( i = 0; i < array_elem( SPF_dn... | false | false | false | false | false | 0 |
drv_PHAnderson_quit(const int quiet)
{
info("%s: shutting down.", Name);
drv_generic_text_quit();
drv_PHAnderson_clear();
/* say goodbye... */
if (!quiet) {
drv_generic_text_greet("goodbye!", NULL);
}
debug("closing connection");
drv_PHAnderson_close();
return (0);
} | false | false | false | false | false | 0 |
do_ntfsfix (const char *device, int clearbadsectors)
{
const char *argv[MAX_ARGS];
size_t i = 0;
int r;
CLEANUP_FREE char *err = NULL;
ADD_ARG (argv, i, str_ntfsfix);
if ((optargs_bitmask & GUESTFS_NTFSFIX_CLEARBADSECTORS_BITMASK) &&
clearbadsectors)
ADD_ARG (argv, i, "-b");
ADD_ARG (argv, i,... | true | true | false | false | false | 1 |
convertKeywordSearchToUrl(const QString &string)
{
int i = string.indexOf(QLatin1Char(' '));
if (i <= 0)
return QUrl();
const QString keyword = string.left(i);
const QString terms = string.mid(i + 1);
if (terms.isEmpty())
return QUrl();
if (OpenSearchEngine *engine = engineForK... | false | false | false | false | false | 0 |
auok1901_update_region(struct auok190xfb_par *par, int mode,
u16 y1, u16 y2)
{
struct device *dev = par->info->device;
unsigned char *buf = (unsigned char *)par->info->screen_base;
int xres = par->info->var.xres;
int line_length = par->info->fix.line_length;
u16 args[5];
pm_runtime_get_sync(dev);
mutex_l... | false | false | false | false | false | 0 |
UpdateModeSeparator(TXT_UNCAST_ARG(widget),
TXT_UNCAST_ARG(separator))
{
TXT_CAST_ARG(txt_separator_t, separator);
if (fullscreen)
{
TXT_SetSeparatorLabel(separator, "Screen mode");
}
else
{
TXT_SetSeparatorLabel(separator, "Window size");
}
} | false | false | false | false | false | 0 |
getVisibilityStatistics( GameMap* actmap )
{
ASCString msg;
computeview ( actmap, 0, true );
for ( int i = 0; i < actmap->getPlayerCount(); i++ ) {
if ( actmap->player[i].exist() ) {
msg += ASCString("#fontsize=14#Player ") + ASCString::toString( i ) + ": "+ actmap->player[i].getName() + "#f... | false | false | false | false | false | 0 |
acpi_rs_dump_word_list(u16 length, u16 *data)
{
u16 i;
for (i = 0; i < length; i++) {
acpi_os_printf("%25s%2.2X : %4.4X\n", "Word", i, data[i]);
}
} | false | false | false | false | false | 0 |
vgadd(char *hfile, char *vgname)
{
HFILEID f;
int32 ref;
int32 vg;
f = Hopen(hfile, DFACC_ALL, 0);
if (f == FAIL)
{
fprintf(stderr, "cannot open %s. \n", hfile);
exit(0);
}
Vinitialize(f);
vg = Vattach(f, -1, "w");
if (vg == FAIL)
{
... | false | false | false | false | false | 0 |
vc4_cancel_page_flip(struct drm_crtc *crtc, struct drm_file *file)
{
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
struct drm_device *dev = crtc->dev;
unsigned long flags;
spin_lock_irqsave(&dev->event_lock, flags);
if (vc4_crtc->event && vc4_crtc->event->base.file_priv == file) {
vc4_crtc->event->base.destro... | false | false | false | false | false | 0 |
gst_rtsp_message_parse_response (GstRTSPMessage * msg,
GstRTSPStatusCode * code, const gchar ** reason, GstRTSPVersion * version)
{
g_return_val_if_fail (msg != NULL, GST_RTSP_EINVAL);
g_return_val_if_fail (msg->type == GST_RTSP_MESSAGE_RESPONSE ||
msg->type == GST_RTSP_MESSAGE_HTTP_RESPONSE, GST_RTSP_EIN... | false | false | false | false | false | 0 |
BStream_readTaggedUint32(BStream *self)
{
unsigned char c = BStream_readByte(self);
BStreamTag t = BStreamTag_FromUnsignedChar(c);
if (t.type == BSTREAM_UNSIGNED_INT && t.byteCount == 1)
{ return (uint32_t)BStream_readUint8(self); }
if (t.type == BSTREAM_UNSIGNED_INT && t.byteCount == 4)
{ return (uint32_t)BStr... | false | false | false | false | false | 0 |
on_properties(G_GNUC_UNUSED GtkWidget* widget, Window* Win)
{
new DocPropDlg (Win->GetDocument ());
} | false | false | false | false | false | 0 |
ik_uuid(ikptr bv){
static int fd = -1;
if(fd == -1){
fd = open("/dev/urandom", O_RDONLY);
if(fd == -1){
return ik_errno_to_code();
}
uuid_strlen = strlen(uuid_chars);
}
long int n = unfix(ref(bv, off_bytevector_length));
unsigned char* data = (unsigned char*)(long)(bv+off_bytevector_data... | false | true | false | false | true | 1 |
dfs(Agraph_t * g, Agnode_t * n, Agraph_t * tree)
{
Agedge_t *e;
Agnode_t *neighbor;
SET_VISITED(n);
for (e = agfstedge(g, n); e; e = agnxtedge(g, e, n)) {
neighbor = aghead(e);
if (neighbor == n)
neighbor = agtail(e);
if (!VISITED(neighbor)) {
/* add the edge to the dfs tree */
agsub... | true | true | false | false | false | 1 |
cmd_touch(struct command *cmd) {
const char *path = arg_value(cmd, "path");
int r;
r = aug_match(cmd->aug, path, NULL);
if (r == 0) {
r = aug_set(cmd->aug, path, NULL);
if (r < 0)
ERR_REPORT(cmd, AUG_ECMDRUN, "Touching %s failed", path);
}
} | false | false | false | false | false | 0 |
hsi(int n, const SeVec3d* args)
{
if (n < 4) return 0.0;
double h = args[1][0];
double s = args[2][0];
double i = args[3][0];
if (n >= 5) {
// apply mask
double m = args[4][0];
h *= m;
s = (s - 1) * m + 1;
i = (i - 1) * m + 1;
}
return hsiAdjust(args[0], h, s, i);
} | false | false | false | false | false | 0 |
__jbd2_journal_insert_checkpoint(struct journal_head *jh,
transaction_t *transaction)
{
JBUFFER_TRACE(jh, "entry");
J_ASSERT_JH(jh, buffer_dirty(jh2bh(jh)) || buffer_jbddirty(jh2bh(jh)));
J_ASSERT_JH(jh, jh->b_cp_transaction == NULL);
/* Get reference for checkpointing transaction */
jbd2_journal_grab_j... | false | false | false | false | false | 0 |
isOppositeCond(const Token * const cond1, const Token * const cond2, const std::set<std::string> &constFunctions)
{
if (!cond1 || !cond1->isComparisonOp() || !cond2 || !cond2->isComparisonOp())
return false;
const std::string &comp1 = cond1->str();
// condition found .. get comparator
std::str... | false | false | false | false | false | 0 |
nonlocal_mentioned_p_1 (loc, data)
rtx *loc;
void *data ATTRIBUTE_UNUSED;
{
rtx x = *loc;
rtx base;
int regno;
if (! x)
return 0;
switch (GET_CODE (x))
{
case SUBREG:
if (GET_CODE (SUBREG_REG (x)) == REG)
{
/* Global registers are not local. */
if (REGNO (SUBREG_REG (x)) ... | false | false | false | false | false | 0 |
read_widget (GtkBuilder *builder, char *name, gboolean read_only)
{
GtkWidget *widget = GTK_WIDGET(gtk_builder_get_object (builder, name));
if (read_only)
{
GtkAdjustment *adj;
gtk_editable_set_editable (GTK_EDITABLE (widget), FALSE);
adj = gtk_spin_button_get_adjustment (GTK_SPIN_BU... | false | false | false | false | false | 0 |
wi_enumerator_array_data_enumerator(wi_runtime_instance_t *instance, wi_enumerator_context_t *context) {
wi_array_t *array = instance;
void *data;
if(context->index == array->data_count)
return NULL;
data = wi_array_data_at_index(array, context->index);
context->index++;
return data;
} | false | false | false | false | false | 0 |
encode_eol(t4_state_t *s)
{
uint32_t code;
int length;
if (s->line_encoding == T4_COMPRESSION_ITU_T4_2D)
{
code = 0x0800 | ((!s->row_is_2d) << 12);
length = 13;
}
else
{
/* T.4 1D EOL, or T.6 EOFB */
code = 0x800;
length = 12;
}
if (s->row_bit... | false | false | false | false | false | 0 |
Recover(byte *recoveredMessage, PK_MessageAccumulator *messageAccumulator) const
{
std::auto_ptr<PK_MessageAccumulator> m(messageAccumulator);
return RecoverAndRestart(recoveredMessage, *m);
} | false | false | false | false | false | 0 |
print() const
{
const_iterator i, iend;
for (i = begin(), iend = end(); i != iend; ++i) {
(*i).print();
}
} | false | false | false | false | false | 0 |
art_blend_luminosity_custom_8(int n_chan, byte *dst, const byte *backdrop,
const byte *src)
{
int delta_y = 0, test = 0;
int r[ART_MAX_CHAN];
int i;
/*
* Since we do not know the details of the blending color space, we are
* simply using the average as the lumi... | false | false | false | false | false | 0 |
expand_line_buffer(char **adrBuf, int *ptrSize, char **adrPtr)
{
char *newbuf;
int newsize;
newsize = *ptrSize + 512;
newbuf = (char *) malloc(newsize);
if (newbuf == 0) {
fprintf(stderr, "Insufficient memory for line");
exit (EXIT_FAILURE);
}
if (*ptrSize == 0) {
... | false | true | false | false | false | 1 |
SHPGetInfo(SHPHandle psSHP, int * pnEntities, int * pnShapeType,
double * padfMinBound, double * padfMaxBound )
{
int i;
if( psSHP == NULL )
return;
if( pnEntities != NULL )
*pnEntities = psSHP->nRecords;
if( pnShapeType != NULL )
*pnShapeType = psSHP->nShapeT... | false | false | false | false | false | 0 |
do_search_in_memory (CamelFolder *search_in_folder,
const gchar *expr,
gchar **psql_query)
{
/* if the expression contains any of these tokens, then perform a memory search, instead of the SQL one */
const gchar *in_memory_tokens[] = {
"body-contains",
"body-regex",
"ma... | false | false | false | false | false | 0 |
newConstraint(const Solver&, const Literal* first, LitVec::size_type size, ConstraintType t) {
if (t == Constraint_t::learnt_conflict) {
hasActivities(true);
}
if (order_.huang == (t == Constraint_t::static_constraint)) {
for (const Literal* x = first, *end = first+size; x != end; ++x) {
order_.incOcc(*x);
... | false | false | false | false | false | 0 |
wtable_set(struct wtable *t, const char *key, void *value)
{
if (is_wildcard(key, strlen(key))) {
if ((t->ws_size - t->ws_used_count) <= 1) {
/* If we only have one entry left, grow by 30%, plus
* one to make sure we always increase even if the
* percentage isn't enough. */
if (!resize_table(t, t->ws_s... | false | false | false | false | false | 0 |
finish_out_of_ssa (struct ssaexpand *sa)
{
free (sa->partition_to_pseudo);
if (sa->values)
BITMAP_FREE (sa->values);
delete_var_map (sa->map);
BITMAP_FREE (sa->partition_has_default_def);
memset (sa, 0, sizeof *sa);
} | false | false | false | false | false | 0 |
magic_comment_marker(const char *str, long len)
{
long i = 2;
while (i < len) {
switch (str[i]) {
case '-':
if (str[i-1] == '*' && str[i-2] == '-') {
return str + i + 1;
}
i += 2;
break;
case '*':
if (i + 1 >= len) return 0;
if (str[i+1] != '-') {
i += 4;
}
el... | false | false | false | false | false | 0 |
gar_read_nod2(struct gar_subfile *sub, u_int32_t offset)
{
struct gimg *gimg = sub->gimg;
struct nod_road_data nrd;
struct gar_road_nod *nr = NULL;
u_int32_t n1 = -1;
off_t o = sub->net->nod->nodoff + sub->net->nod->nod2_offset + offset;
if (glseek(gimg, o, SEEK_SET) != o) {
log(1, "NET: Error can not seek to %... | false | false | false | false | false | 0 |
dwc3_gadget_ep0_queue(struct usb_ep *ep, struct usb_request *request,
gfp_t gfp_flags)
{
struct dwc3_request *req = to_dwc3_request(request);
struct dwc3_ep *dep = to_dwc3_ep(ep);
struct dwc3 *dwc = dep->dwc;
unsigned long flags;
int ret;
spin_lock_irqsave(&dwc->lock, flags);
if (!dep->endpoint.de... | false | false | false | false | false | 0 |
ompi_coll_tuned_forced_getvalues( enum COLLTYPE type,
coll_tuned_force_algorithm_params_t *forced_values )
{
coll_tuned_force_algorithm_mca_param_indices_t* mca_params;
const int *tmp;
mca_params = &(ompi_coll_tuned_forced_params[type]);
/**
* Set the selected a... | false | false | false | false | false | 0 |
SyfSynthTrans2Abl( FsmFigure )
fsmfig_list *FsmFigure;
{
syfinfo *SyfInfo;
fsmstate_list *ScanState;
syfstate *ScanSyfState;
syfstate *FromSyfState;
ablexpr *ScanChain;
ablexpr *Atom;
fsmtrans_list *ScanTrans;
SyfInfo = FSM_SYF_INFO( FsmFigure );
for ( ScanState = Fsm... | false | false | false | false | false | 0 |
parameters(STD_ISTREAM& is, GABoolean flag){
params.read(is, flag);
for(int i=0; i<params.size(); i++)
setptr(params[i].fullname(), params[i].value());
return params;
} | false | false | false | false | false | 0 |
xim_instantiate_cb(Display * display, XPointer client_data, XPointer call_data)
{
xim_real_init();
if (xim_input_context) {
XUnregisterIMInstantiateCallback(Xdisplay, NULL, NULL, NULL, xim_instantiate_cb, NULL);
}
display = NULL;
client_data = call_data = (XPointer) 0;
} | false | false | false | false | false | 0 |
LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte *bufLimit)
{
do
{
SizeT limit2 = limit;
if (p->checkDicSize == 0)
{
UInt32 rem = p->prop.dicSize - p->processedPos;
if (limit - p->dicPos > rem)
limit2 = p->dicPos + rem;
}
RINOK(LzmaDec_DecodeReal(p, limit2,... | false | false | false | false | false | 0 |
radio_tea5777_update_read_reg(struct radio_tea5777 *tea, int wait)
{
int res;
if (tea->read_reg != -1)
return 0;
if (tea->write_before_read && tea->needs_write) {
res = radio_tea5777_set_freq(tea);
if (res)
return res;
}
if (wait) {
if (schedule_timeout_interruptible(msecs_to_jiffies(wait)))
retur... | false | false | false | false | false | 0 |
asn1_store_named_data( asn1_named_data **head,
const char *oid, size_t oid_len,
const unsigned char *val,
size_t val_len )
{
asn1_named_data *cur;
if( ( cur = asn1_find_named_data( *head, oid... | false | false | false | false | false | 0 |
ch_end_seek()
{
POSITION len;
if (ch_flags & CH_CANSEEK)
ch_fsize = filesize(ch_file);
len = ch_length();
if (len != NULL_POSITION)
return (ch_seek(len));
/*
* Do it the slow way: read till end of data.
*/
while (ch_forw_get() != EOI)
if (ABORT_SIGS())
return (1);
return (0);
} | false | false | false | false | false | 0 |
map_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
PyObject *it, *iters, *func;
mapobject *lz;
Py_ssize_t numargs, i;
if (type == &PyMap_Type && !_PyArg_NoKeywords("map()", kwds))
return NULL;
numargs = PyTuple_Size(args);
if (numargs < 2) {
PyErr_SetString(PyExc_Typ... | false | false | false | false | true | 1 |
setTimer(struct timeval tv)
{
gettimeofday(&timeout, NULL);
timeout.tv_sec += tv.tv_sec;
timeout.tv_usec += tv.tv_usec;
if (timeout.tv_usec >= 1000000)
{
++timeout.tv_sec;
timeout.tv_usec %= 1000000;
}
} | false | false | false | false | false | 0 |
__ecereInstMeth___ecereNameSpace__ecere__gui__controls__MenuItem_NotifySelect__00000004(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * item, unsigned int mods)
{
struct __ecereNameSpace__ecere__gui__controls__EditBox * __ecerePointer___ecereNameSpace__ecere__gui__c... | false | false | false | false | false | 0 |
Select(SDNode *N) {
SDLoc dl(N);
if (N->isMachineOpcode()) {
N->setNodeId(-1);
return nullptr; // Already selected.
}
switch (N->getOpcode()) {
default: break;
case ISD::INLINEASM: {
SDNode *ResNode = SelectInlineAsm(N);
if (ResNode)
return ResNode;
break;
}
case SPISD::GL... | false | false | false | false | false | 0 |
save_time(time_t start, time_t end, void *vp)
{
struct event_time_list **ptr=(struct event_time_list **)vp;
struct event_time_list *etl=
(struct event_time_list *)
malloc(sizeof(struct event_time_list));
if (!etl)
{
perror("malloc");
exit(1);
}
for (; *ptr; ptr=&(*ptr)->next)
;
*ptr=etl;
etl->next... | true | true | false | false | true | 1 |
get_type(char *name)
{
if (!strncmp(name, "Nsurf", 5))
return (SURF);
else if (!strncmp(name, "Nsite", 5))
return (SITE);
else if (!strncmp(name, "Nvect", 5))
return (VECT);
else if (!strncmp(name, "Nvol", 4))
return (VOL);
else
return (-1);
} | false | false | false | false | false | 0 |
Elt0D_NoPerspective(PickBuf *pick, int poke, Point2D xy, Point *xPoints,
int nPts, float nearPlane, float sens, float min, float max)
{
int i;
nearPlane += ZOFFSET;
for (i = 0; i < nPts; i++)
{
if (xPoints[i].z < nearPlane &&
fabs(xPoints[i].x - xy.x) < sens &&
fabs(xPoints[i].y... | false | false | false | false | false | 0 |
ismt_desc_dump(struct ismt_priv *priv)
{
struct device *dev = &priv->pci_dev->dev;
struct ismt_desc *desc = &priv->hw[priv->head];
dev_dbg(dev, "Dump of the descriptor struct: 0x%X\n", priv->head);
__ismt_desc_dump(dev, desc);
} | false | false | false | false | false | 0 |
initLookUp(t_Params *ptParams)
{
int i = 0, j = 0;
FILE *ifp = NULL;
adLookUp = (double *) malloc(N_BASES*N_BASES*sizeof(double));
if(!adLookUp)
goto memoryError;
ifp = fopen(ptParams->szLookUpFile,"r");
if(bVerbose){
printf("Using look up file %s\n",ptParams->szLookUpFile);
}
if(ifp){
ch... | true | true | true | false | true | 1 |
msm_otg_suspend(struct msm_otg *motg)
{
struct usb_phy *phy = &motg->phy;
struct usb_bus *bus = phy->otg->host;
struct msm_otg_platform_data *pdata = motg->pdata;
void __iomem *addr;
int cnt = 0;
if (atomic_read(&motg->in_lpm))
return 0;
disable_irq(motg->irq);
/*
* Chipidea 45-nm PHY suspend sequence:
... | false | false | false | false | false | 0 |
delete_log_console(int handle)
{
CVmConsoleLog *con;
/* if the handle is invalid, ignore the request */
if ((con = (CVmConsoleLog *)get_object(handle)) == 0)
return;
/* delete the console */
delete con;
/* clear the slot */
clear_handle(handle);
} | false | false | false | false | false | 0 |
AttemptFileRepair ( LFA_FileRef qtFile, XMP_Int64 fileSpace, QTErrorMode status )
{
switch ( status ) {
case kBadQT_NoError : return; // Sanity check.
case kBadQT_SmallInner : return; // Fixed in normal update code for the 'udta' box.
case kBadQT_LargeInner : XMP_Throw ( "Can't repair QuickTime file", kXMPEr... | false | false | false | false | false | 0 |
find_or_create_connection_for_map(object *pl, short x, short y, object *rune) {
object *force;
int connected;
if (!rune)
rune = get_connection_rune(pl, x, y);
if (!rune || !rune->msg) {
draw_ext_info(NDI_UNIQUE, 0, pl, MSG_TYPE_APPLY, MSG_TYPE_APPLY_BUILD,
"You ne... | false | false | false | false | false | 0 |
SpellHit(Unit* pCaster, const SpellEntry* pSpell) override
{
if (pCaster->GetTypeId() == TYPEID_PLAYER)
{
if (!m_bIsTagged && pSpell->Id == SPELL_EGAN_BLASTER && ((Player*)pCaster)->GetQuestStatus(QUEST_RESTLESS_SOUL) == QUEST_STATUS_INCOMPLETE)
{
m_bIsTagged ... | false | false | false | false | false | 0 |
anthy_input_resize(struct anthy_input_context* ictx, int lr)
{
switch (ictx->state) {
case ANTHY_INPUT_ST_OFF:
break;
case ANTHY_INPUT_ST_NONE:
break;
case ANTHY_INPUT_ST_EDIT:
break;
case ANTHY_INPUT_ST_CONV:
enter_cseg_state(ictx);
cmd_resize(ictx, lr);
break;
case ANTHY_INPUT_ST... | false | false | false | false | false | 0 |
nemo_icon_container_reveal (NemoIconContainer *container, NemoIconData *data)
{
NemoIcon *icon;
g_return_if_fail (NEMO_IS_ICON_CONTAINER (container));
g_return_if_fail (data != NULL);
icon = g_hash_table_lookup (container->details->icon_set, data);
if (icon != NULL) {
reveal_icon (container, icon);
}
} | false | false | false | false | false | 0 |
notifyListeners(AV_View * pView, const AV_ChangeMask hint, void * pPrivateData)
{
/*
App-specific logic calls this virtual method when relevant portions of
the view state *may* have changed. (That's why it's called a hint.)
This base class implementation doesn't do any filtering of those
hints, it just bro... | 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.