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 |
|---|---|---|---|---|---|---|
skd_process_scsi_inq(struct skd_device *skdev,
volatile struct fit_completion_entry_v1
*skcomp,
volatile struct fit_comp_error_info *skerr,
struct skd_special_context *skspcl)
{
uint8_t *buf;
struct fit_msg_hdr *fmh = (struct fit_msg_hdr *)skspcl->msg_buf;
struct skd_scsi_request *scsi_req = (str... | false | false | false | false | false | 0 |
pad(char *string, int length) {
int l;
l=strlen(string);
while(l<length) {
string[l] = ' ';
l++;
}
string[l]='\0';
return string;
} | false | false | false | false | false | 0 |
draw_object (glLabelObject *object,
cairo_t *cr,
gboolean screen_flag,
glMergeRecord *record)
{
gdouble w, h;
gdouble line_width;
glColorNode *line_color_node;
glColorNode *fill_color_node;
guint line_color;
guint ... | false | false | false | false | false | 0 |
lang_for_english( const char * english )
{
iso639_lang_t * lang;
for( lang = (iso639_lang_t*) languages; lang->eng_name; lang++ )
{
if( !strcmp( lang->eng_name, english ) )
{
return lang;
}
}
return (iso639_lang_t*) languages;
} | false | false | false | false | false | 0 |
untrusted_launcher_response_callback (GtkDialog *dialog,
int response_id,
ActivateParametersDesktop *parameters)
{
GdkScreen *screen;
char *uri;
GFile *file;
switch (response_id) {
case RESPONSE_RUN:
screen = gtk_widget_get_screen (GTK_WIDGET (parameters->parent_window));
uri = nautilus_f... | false | false | false | false | false | 0 |
AslCoreSubsystemError (
ACPI_PARSE_OBJECT *Op,
ACPI_STATUS Status,
char *ExtraMessage,
BOOLEAN Abort)
{
sprintf (MsgBuffer, "%s %s", AcpiFormatException (Status), ExtraMessage);
if (Op)
{
AslCommonError (ASL_ERROR, ASL_MSG_CORE_E... | false | true | false | false | false | 1 |
hasunlimited(Dimset* dimset)
{
int i;
for(i=0;i<dimset->ndims;i++) {
Symbol* dim = dimset->dimsyms[i];
if(dim->dim.declsize == NC_UNLIMITED) return 1;
}
return 0;
} | false | false | false | false | false | 0 |
iwtable( char *dest)
{
gint i,x,y;
x=0;
y=0;
for(i=0;i<100;i++) {
dest[i]=usuario.mitabla[x][y];
x++;
if(x>=10) {
x=0;
y++;
}
}
} | false | false | false | false | false | 0 |
sixaxis_set_operational_bt(struct hid_device *hdev)
{
static const __u8 report[] = { 0xf4, 0x42, 0x03, 0x00, 0x00 };
__u8 *buf;
int ret;
buf = kmemdup(report, sizeof(report), GFP_KERNEL);
if (!buf)
return -ENOMEM;
ret = hid_hw_raw_request(hdev, buf[0], buf, sizeof(report),
HID_FEATURE_REPORT, HID_REQ_SE... | false | false | false | false | false | 0 |
redirect( value s ) {
mcontext *c = CONTEXT();
val_check(s,string);
HEADERS_NOT_SENT("Redirection");
ap_table_set(c->r->headers_out,"Location",val_string(s));
c->r->status = REDIRECT;
return val_true;
} | false | false | false | false | false | 0 |
gitg_drag_source_end_cb (GtkTreeView *tree_view,
GdkDragContext *context,
GitgDndData *data)
{
if (data->revision)
{
gdk_property_delete (gtk_widget_get_window (GTK_WIDGET (tree_view)), XDS_ATOM);
if (data->xds_destination != NULL)
{
/* Do extract it t... | false | false | false | false | false | 0 |
insertRows(int row, int count, const QModelIndex &parent)
{
beginInsertRows(parent, row, row+count-1);
for(int i = 0; i < count; ++i) {
d->m_Pmh->insertEpisode(row+i, new Internal::PmhEpisodeData);
}
endInsertRows();
return true;
} | false | false | false | false | false | 0 |
bdz_remove_edge(bdz_graph3_t * graph3, cmph_uint32 curr_edge)
{
cmph_uint32 i,j=0,vert,edge1,edge2;
for(i=0;i<3;i++){
vert=graph3->edges[curr_edge].vertices[i];
edge1=graph3->first_edge[vert];
edge2=NULL_EDGE;
while(edge1!=curr_edge&&edge1!=NULL_EDGE){
edge2=edge1;
if(graph3->edges[edge1].vertices[0]==v... | false | false | false | false | false | 0 |
l2_st6_persistent_da(struct FsmInst *fi, int event, void *arg)
{
struct layer2 *l2 = fi->userdata;
struct sk_buff *skb = arg;
skb_queue_purge(&l2->ui_queue);
stop_t200(l2, 20);
l2up(l2, DL_RELEASE_CNF, skb);
mISDN_FsmChangeState(fi, ST_L2_4);
if (l2->tm)
l2_tei(l2, MDL_STATUS_DOWN_IND, 0);
} | false | false | false | false | false | 0 |
nifti_findhdrname(const char* fname)
{
char *basename, *hdrname;
const char *ext;
char elist[2][5] = { ".hdr", ".nii" };
char extzip[4] = ".gz";
int efirst = 1; /* init to .nii extension */
int eisupper = 0; /* init to lowercase extensions */
/**- check input file(s) for sanity */
i... | false | false | false | false | false | 0 |
put_fields(GwyDataField *dfield1, GwyDataField *dfield2,
GwyDataField *result,
GwyMergeBoundaryType boundary,
gint px1, gint py1,
gint px2, gint py2)
{
GwyRectangle res_rect;
GwyCoord f1_pos;
GwyCoord f2_pos;
gint x1, x2, y1_, y2, w1, w2, h1, h2;
gint xres... | false | false | false | false | false | 0 |
cloog_matrix_alloc(unsigned NbRows, unsigned NbColumns)
{
CloogMatrix *matrix;
cloog_int_t **p, *q;
int i, j;
matrix = (CloogMatrix *)malloc(sizeof(CloogMatrix));
if (!matrix)
return NULL;
matrix->NbRows = NbRows;
matrix->NbColumns = NbColumns;
if (!NbRows || !NbColumns) {
matrix->p = NULL;
... | false | true | false | false | false | 1 |
GetPlayerGroupInfoData(ObjectGuid guid, GroupQueueInfo* ginfo)
{
// ACE_Guard<ACE_Recursive_Thread_Mutex> g(m_Lock);
QueuedPlayersMap::const_iterator qItr = m_QueuedPlayers.find(guid);
if (qItr == m_QueuedPlayers.end())
{ return false; }
*ginfo = *(qItr->second.GroupInfo);
return true;
} | false | false | false | false | false | 0 |
gs_get_att_typbuff(geosurf * gs, int desc, int to_write)
{
typbuff *tb;
geosurf *gsref;
if (gs) {
G_debug(5, "gs_get_att_typbuff(): id=%d desc=%d to_write=%d",
gs->gsurf_id, desc, to_write);
if ((tb = gsds_get_typbuff(gs->att[desc].hdata, to_write))) {
tb->tfunc = NULL;
if (desc == ATT_TOPO)... | false | false | false | false | false | 0 |
strrncmp(const gchar * const s1, const gchar * const s2, size_t n)
{
gint l1 = strlen(s1);
gint l2 = strlen(s2);
if (l1 == 0 && l2 != 0)
return (-1);
else if (l1 != 0 && l2 == 0)
return (1);
while (l1-- > 0 && l2-- > 0 && n-- > 0) {
if (s1[l1] < s2[l2])
return (-1);
else if (s1[l1] > s2[l2])
return... | false | false | false | false | false | 0 |
_slurm_listen_stream(slurm_addr_t *addr)
{
int rc;
slurm_fd_t fd;
const int one = 1;
const size_t sz1 = sizeof(one);
if ((fd = _slurm_create_socket(SLURM_STREAM)) < 0) {
error("Error creating slurm stream socket: %m");
return fd;
}
rc = _slurm_setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sz1);
if (rc < ... | false | false | false | false | false | 0 |
errinit (const char *emsgpath, char *elogpath, bool echo)
/*
This routine initializes the error reporting facilities. It attempts to
open the error message file and an error logging file.
Parameters:
emsgpath: path name for the error message file (defaults to errmsg.txt)
elogpath: path name for logging ... | false | false | false | false | true | 1 |
DtsGetFrameRate(DTS_LIB_CONTEXT *Ctx, BC_DTS_PROC_OUT *pOut)
{
if (Ctx->VidParams.FrameRate == pOut->PicInfo.frame_rate)
{
pOut->PicInfo.frame_rate = 0;
return;
}
// DebugLog_Trace(LDIL_DBG,"DtsGetFrameRate: frame_rate:%d (%d)\n", pOut->PicInfo.frame_rate, Ctx->VidParams.FrameRate);
Ctx->VidParams.FrameRate ... | false | false | false | false | false | 0 |
And(const BitField &bf)
{
size_t i;
if( !_isfull_sp(bf) && !_isempty() ){
if( _isempty_sp(bf) ){
Clear();
}else{
if( _isfull() ){
b = new unsigned char[nbytes];
#ifndef WINDOWS
if( !b ) throw 9;
#endif
memcpy(b, bf.b, nbytes);
nset = bf.nset;
}else{
... | false | false | false | false | false | 0 |
perform_file_detection(bool test_all)
{
ASSERT_IS_BACKGROUND_THREAD();
valid_paths.clear();
int result = 1;
for (path_list_t::const_iterator iter = potential_paths.begin(); iter != potential_paths.end(); ++iter)
{
if (path_is_valid(*iter, working_directory))
{
/* Push the... | false | false | false | false | false | 0 |
GenerateEngineCode(GrcManager * /*pcman*/, int fxdRuleVersion,
std::vector<gr::byte> & vbOutput)
{
if (m_vpexpConstraints.size() == 0)
{
return;
}
// 'and' all the constraints together; multiple constraints result from an -else if-
// structure.
int nBogus;
m_vpexpConstraints[0]->GenerateEngineCode(fxdRuleVe... | false | false | false | false | false | 0 |
midhsi(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];
// remap from [0..1] to [-1..1]
m = m * 2 - 1;
// add falloff (if specified)
double falloff = 1, in... | false | false | false | false | false | 0 |
acceptTCPService(client_data, sourcep, idp)
XtPointer client_data;
int *sourcep;
XtInputId *idp;
{
IMProtocolWidget ipw = (IMProtocolWidget)client_data;
IMConnection *conn;
TRACE(("IMProtocolWidget:acceptTCPService()\n"));
/*
* Accept connection request.
*/
conn = IMTCPConnection((Widget... | false | false | false | false | false | 0 |
build_fake_backend(
git_odb_backend **out,
git_error_code error_code)
{
fake_backend *backend;
backend = git__calloc(1, sizeof(fake_backend));
GITERR_CHECK_ALLOC(backend);
backend->parent.version = GIT_ODB_BACKEND_VERSION;
backend->parent.refresh = NULL;
backend->error_code = error_code;
backend->parent.re... | false | false | false | false | false | 0 |
ipmi_monitoring_sel_by_sensor_type (ipmi_monitoring_ctx_t c,
const char *hostname,
struct ipmi_monitoring_ipmi_config *config,
unsigned int sel_flags,
unsigned int *sensor_type... | false | false | false | false | false | 0 |
show_lk_list(list)
struct lk_list *list;
/*
prints the logical names of all the M F nodes that are pointed to by
the curr_node ptr of lk_list nodes in the linked list of lk_list nodes
headed by list
*/
{
struct lk_list *ptr;
ptr = list;
if (ptr = NULL) printf(" (nil list)\n");
while (ptr != NU... | false | false | false | false | false | 0 |
hsi_claim_port(struct hsi_client *cl, unsigned int share)
{
struct hsi_port *port = hsi_get_port(cl);
int err = 0;
mutex_lock(&port->lock);
if ((port->claimed) && (!port->shared || !share)) {
err = -EBUSY;
goto out;
}
if (!try_module_get(to_hsi_controller(port->device.parent)->owner)) {
err = -ENODEV;
go... | false | false | false | false | false | 0 |
ExtractMetadataFromTIFF(TIFF* const tif, Metadata* const metadata) {
int i;
toff_t exif_ifd_offset;
for (i = 0; kTIFFMetadataMap[i].tag != 0; ++i) {
MetadataPayload* const payload =
(MetadataPayload*)((uint8_t*)metadata +
kTIFFMetadataMap[i].storage_offset);
void* tag_d... | false | false | false | false | false | 0 |
open(OpenMode mode, const QuaZipNewInfo& info,
const char *password, quint32 crc,
int method, int level, bool raw,
int windowBits, int memLevel, int strategy)
{
zip_fileinfo info_z;
resetZipError();
if(isOpen()) {
qWarning("QuaZipFile::open(): already opened");
return false;
}
if((mode&Wri... | false | false | false | false | false | 0 |
show_next_lineCmd()
{
int result_code;
#if defined(VMS)
warning("`show next line' does not work on VMS");
return true;
#endif
if (_dataFILE.back().get_type() == DataFile::from_cmdfile)
return true;
// Cannot show for binary files -- don't bother with warning though
if (_dataFILE.back().get_type() !=... | false | false | false | false | false | 0 |
L51()
{register object *base=vs_base;
register object *sup=base+VM51; VC51
vs_check;
vs_top=sup;
goto TTL;
TTL:;
{register object V183;
register object V184;
V183= Cnil;
V184= Cnil;
V183= (((object)VV[127])->s.s_dbind);
V184= Cnil;
goto T582;
T582:;
if(((V183))!=Cnil){
goto T586;}
base[0]= (V184);
vs_top... | false | false | false | false | false | 0 |
get_address (GcIfaceAddress *iface,
int *timestamp,
GHashTable **address,
GeoclueAccuracy **accuracy,
GError **error)
{
GcMasterClient *client = GC_MASTER_CLIENT (iface);
GcMasterClientPrivate *priv = GET_PRIVATE (client);
if (priv->a... | false | false | false | false | false | 0 |
getLargestLegalIntTypeSize() const {
auto Max = std::max_element(LegalIntWidths.begin(), LegalIntWidths.end());
return Max != LegalIntWidths.end() ? *Max : 0;
} | false | false | false | false | false | 0 |
__log_archive_pp(dbenv, listp, flags)
DB_ENV *dbenv;
char ***listp;
u_int32_t flags;
{
DB_THREAD_INFO *ip;
ENV *env;
int ret;
env = dbenv->env;
ENV_REQUIRES_CONFIG(env,
env->lg_handle, "DB_ENV->log_archive", DB_INIT_LOG);
#undef OKFLAGS
#define OKFLAGS (DB_ARCH_ABS | DB_ARCH_DATA | DB_ARCH_LOG | DB_ARCH... | false | false | false | false | false | 0 |
set_ref_in_item(tv, copyID)
typval_T *tv;
int copyID;
{
dict_T *dd;
list_T *ll;
switch (tv->v_type)
{
case VAR_DICT:
dd = tv->vval.v_dict;
if (dd->dv_copyID != copyID)
{
/* Didn't see this dict yet. */
dd->dv_copyID = copyID;
set_ref_in_ht(&dd->dv_hashtab, copyID);
}... | false | false | false | false | false | 0 |
Squeeze()
{
Implementation::StorageT(this->Internal->Storage).swap(this->Internal->Storage);
this->DataChanged();
} | false | false | false | false | false | 0 |
SwapPlayers( ePlayerNetID * player1, ePlayerNetID * player2 )
{
tASSERT( player1 );
tASSERT( player2 );
// swap IDs
int id3 = player1->teamListID;
player1->teamListID = player2->teamListID;
player2->teamListID = id3;
// adjust pointers from teams
eTeam * team2 = player1->CurrentTeam();... | false | false | false | false | false | 0 |
callback(TBL_FIELD * fields, int count, void *foo)
{
TBL_FIELD *fp;
printf("\n\nIn callback: Count is: %d\n", count);
fp = fields;
while (fp->FieldName != 0) {
printf("Field Name: %s [%d]:", fp->FieldName, fp->Value.Type);
if (fp->Value.Type == TBL_STRING)
printf(" %s\n\n", fp->Value.Value.Strin... | false | false | false | false | false | 0 |
bits_to_int (NODE_T * p, char *str)
{
int base = 0;
unsigned bits = 0;
char *radix = NO_TEXT, *end = NO_TEXT;
RESET_ERRNO;
base = (int) a68g_strtoul (str, &radix, 10);
if (radix != NO_TEXT && TO_UPPER (radix[0]) == TO_UPPER (RADIX_CHAR) && errno == 0) {
if (base < 2 || base > 16) {
diagnostic_node... | false | false | false | false | false | 0 |
SelectSRLi64(SDNode *N, EVT OpVT) {
SDValue Op0 = N->getOperand(0);
EVT VecVT = EVT::getVectorVT(*CurDAG->getContext(),
OpVT, (128 / OpVT.getSizeInBits()));
SDValue ShiftAmt = N->getOperand(1);
EVT ShiftAmtVT = ShiftAmt.getValueType();
SDNode *VecOp0, *Shift = 0;
DebugLoc dl =... | false | false | false | false | false | 0 |
UnsetICFocusMessageProc (XIMS ims,
IMProtocol *call_data,
unsigned char *p)
{
Xi18n i18n_core = ims->protocol;
FrameMgr fm;
extern XimFrameRec unset_ic_focus_fr[];
IMChangeFocusStruct *unsetfocus;
CARD16 connect_id = call_data... | false | false | false | false | false | 0 |
int8um(PG_FUNCTION_ARGS)
{
int64 arg = PG_GETARG_INT64(0);
int64 result;
result = -arg;
/* overflow check (needed for INT64_MIN) */
if (arg != 0 && SAMESIGN(result, arg))
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("bigint out of range")));
PG_RETURN_INT64(result);
} | false | false | false | false | false | 0 |
snd_pcm_ioplug_set_param_minmax(snd_pcm_ioplug_t *ioplug, int type, unsigned int min, unsigned int max)
{
ioplug_priv_t *io = ioplug->pcm->private_data;
if (type < 0 && type >= SND_PCM_IOPLUG_HW_PARAMS) {
SNDERR("IOPLUG: invalid parameter type %d", type);
return -EINVAL;
}
if (type == SND_PCM_IOPLUG_HW_ACCESS |... | false | false | false | false | false | 0 |
main(int argc, char *argv[])
{
GError *error = NULL;
GOptionContext *context;
MainWin* win;
#ifdef ENABLE_NLS
bindtextdomain ( GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR );
bind_textdomain_codeset ( GETTEXT_PACKAGE, "UTF-8" );
textdomain ( GETTEXT_PACKAGE );
#endif
context = g_option_context_new ... | false | false | false | false | false | 0 |
tc358743_set_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
struct v4l2_subdev_format *format)
{
struct tc358743_state *state = to_state(sd);
u32 code = format->format.code; /* is overwritten by get_fmt */
int ret = tc358743_get_fmt(sd, cfg, format);
format->format.code = code;
if (ret)
r... | false | false | false | false | false | 0 |
swapCJK(UChar32 i) {
if (i >= CJK_BASE) {
if (i < CJK_LIMIT) return i - CJK_BASE;
if (i < CJK_COMPAT_USED_BASE) return i + NON_CJK_OFFSET;
if (i < CJK_COMPAT_USED_LIMIT) return i - CJK_COMPAT_USED_BASE
+ (CJK_LIMIT - CJK_BASE... | false | false | false | false | false | 0 |
glusterd_rpcsvc_notify (rpcsvc_t *rpc, void *xl, rpcsvc_event_t event,
void *data)
{
xlator_t *this = NULL;
rpc_transport_t *xprt = NULL;
glusterd_conf_t *priv = NULL;
if (!xl || !data) {
gf_log ("glusterd", GF_LOG_WARNING,
... | false | false | false | false | false | 0 |
guestfs_fstrim_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
GuestfsFstrim *self = GUESTFS_FSTRIM(object);
GuestfsFstrimPrivate *priv = self->priv;
switch (property_id) {
case PROP_GUESTFS_FSTRIM_OFFSET:
priv->offset = g_value_get_int64 (value);
break;... | false | false | false | false | false | 0 |
rfio_xyclose(lun, chopt, irc) /* close a remote fortran logical unit */
int lun;
char *chopt;
int *irc;
{
char buf[LONGSIZE]; /* network command/response buffer */
register char *p=buf; /* buffer pointer */
int status; /* Fortran status ... | false | false | false | false | false | 0 |
URLNotify (const char *url,
NPReason reason,
void *notifyData)
{
const char *reasons[] = {
"Base (undefined)",
"Done",
"Network error",
"User break"
};
D ("URLNotify URL '%s' reason %d (%s)", url ? url : "", reason, reasons[reason]);
/* If we get called when we expect a stream,
* it m... | false | false | false | false | false | 0 |
GetObservation(Faction *f, int usepassers)
{
int obs = 0;
if(Globals->IMPROVED_FARSIGHT) {
forlist(&farsees) {
Farsight *farsight = (Farsight *)elem;
if(farsight && farsight->faction == f && farsight->unit) {
int o = farsight->observation;
if(o > obs) obs = o;
}
}
}
if(usepassers &&
(Glob... | false | false | false | false | false | 0 |
check_vector_sizes(vnl_vector<double> const& a,
vnl_vector<double> const& b,
vnl_vector<double> const& c)
{
if (size_a_+size_b_ > size_e_) {
vcl_cerr << "vnl_sparse_lm: Number of unknowns("<<size_a_+size_b_<<')'
<< " greate... | false | false | false | false | false | 0 |
separator(int *nest, char **tokens)
{
char c, *s;
s = *tokens;
while ((c = *s)) {
/* #->eol = comment */
if (c == '#') {
s++;
while ((c = *s)) {
s++;
if (c == '\n')
break;
}
continue;
}
if (c == '{') {
(*nest)++;
s++;
continue;
}
if (c == '}') {
(*nes... | false | false | false | false | false | 0 |
write_fifo(struct goku_ep *ep, struct goku_request *req)
{
struct goku_udc *dev = ep->dev;
u32 tmp;
u8 *buf;
unsigned count;
int is_last;
tmp = readl(&dev->regs->DataSet);
buf = req->req.buf + req->req.actual;
prefetch(buf);
dev = ep->dev;
if (unlikely(ep->num == 0 && dev->ep0state != EP0_IN))
return -... | false | false | false | false | false | 0 |
on_ssrc_sdes (RTPSession * sess, RTPSource * source)
{
g_object_ref (source);
GST_DEBUG ("SDES changed for SSRC %08x", source->ssrc);
RTP_SESSION_UNLOCK (sess);
g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_SSRC_SDES], 0, source);
RTP_SESSION_LOCK (sess);
g_object_unref (source);
} | false | false | false | false | false | 0 |
Java_com_sun_grid_jgdi_jni_EventClientImpl_fillEvents(JNIEnv *env, jobject evcobj, jint evc_index, jobject eventList)
{
lList *elist = NULL;
lList *alp = NULL;
lListElem *ev = NULL;
sge_evc_elem_t *elem = NULL;
jgdi_result_t ret = JGDI_SUCCESS;
jobject logger = NULL;
rmon_ctx_t rmon_ctx;
DEN... | false | false | false | false | false | 0 |
queryIcons(int group_or_size, KIconLoader::Context context) const
{
d->initIconThemes();
QStringList result;
if (group_or_size >= KIconLoader::LastGroup)
{
kDebug(264) << "Illegal icon group: " << group_or_size;
return result;
}
int size;
if (group_or_size >= 0)
size... | false | false | false | false | false | 0 |
ftpSendMimeType(int& iError, const KUrl& url)
{
// Emit proper mimetype for zero sized files. #323491
if (m_size == 0) {
mimeType(QLatin1String("application/x-zerosize"));
return statusSuccess;
}
const int totalSize = ((m_size == UnknownSize || m_size > 1024) ? 1024 : m_size);
QByteArray buffer(total... | false | false | false | false | false | 0 |
restore_bias(int i, double *v)
{
int ibin = bin[i];
if (xflag) v[0] += binave[ibin][ivx];
if (yflag) v[1] += binave[ibin][ivy];
if (zflag) v[2] += binave[ibin][ivz];
} | false | false | false | false | false | 0 |
e_ews_item_is_forwarded (EEwsItem *item,
gboolean *forwarded)
{
g_return_val_if_fail (E_IS_EWS_ITEM (item), FALSE);
*forwarded = (item->priv->mapi_icon_index == 0x106);
return TRUE;
} | false | false | false | false | false | 0 |
encdesc_hashmap_distr_add(GtHashtable *hm_distri, long key)
{
unsigned long long *valueptr;
gt_assert(hm_distri != NULL);
valueptr = li_ull_gt_hashmap_get(hm_distri, key);
if (!valueptr) {
li_ull_gt_hashmap_add(hm_distri, key, (unsigned long long) 1);
return 1;
}
else {
(*valueptr) += 1;
ret... | false | false | false | false | false | 0 |
ipa_reduced_postorder (struct cgraph_node **order,
bool reduce, bool allow_overwritable,
bool (*ignore_edge) (struct cgraph_edge *))
{
struct cgraph_node *node;
struct searchc_env env;
splay_tree_node result;
env.stack = XCNEWVEC (struct cgraph_node *, cgraph_n_nodes);
env.stack_size = 0;
... | false | false | false | false | false | 0 |
eval_node_free_val_buf(
/*===================*/
que_node_t* node) /*!< in: query graph node */
{
dfield_t* dfield;
byte* data;
ut_ad(que_node_get_type(node) == QUE_NODE_SYMBOL
|| que_node_get_type(node) == QUE_NODE_FUNC);
dfield = que_node_get_val(node);
data = dfield_get_data(dfield);
if (que_node_g... | false | false | false | false | false | 0 |
dns_sock_free(dns_sock_t *sock)
{
if (sock_set_refflag(sock, SOCK_INVALID) < 0)
return;
if (SOCK_REFS(sock) != 0)
return;
sock_free(sock);
} | false | false | false | false | false | 0 |
bfa_diag_attach(struct bfa_diag_s *diag, struct bfa_ioc_s *ioc, void *dev,
bfa_cb_diag_beacon_t cbfn_beacon, struct bfa_trc_mod_s *trcmod)
{
diag->dev = dev;
diag->ioc = ioc;
diag->trcmod = trcmod;
diag->block = 0;
diag->cbfn = NULL;
diag->cbarg = NULL;
diag->result = NULL;
diag->cbfn_beacon = cbfn_beacon;
... | false | false | false | false | false | 0 |
MallocList( nbytes, no_mem_exit )
int nbytes;
int no_mem_exit;
{
register Pointer p;
register int nwords, n;
register Bucket *bin;
if( nbytes <= 0 )
return( NULL );
nwords = NWORDS( nbytes );
if( nwords >= NBINS )
return( MallocBigList( nbytes, no_mem_exit ) );
bin = &(b... | false | false | false | false | false | 0 |
start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
{
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
coef->iMCU_row_num = 0;
start_iMCU_row(cinfo);
switch (pass_mode) {
case JBUF_PASS_THRU:
if (coef->whole_image[0] != NULL)
ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
coef->pub.compress_data ... | false | false | false | false | false | 0 |
mxt_proc_t9_message(struct mxt_data *data, u8 *message)
{
struct device *dev = &data->client->dev;
struct input_dev *input_dev = data->input_dev;
int id;
u8 status;
int x;
int y;
int area;
int amplitude;
id = message[0] - data->T9_reportid_min;
status = message[1];
x = (message[2] << 4) | ((message[4] >> 4)... | false | false | false | false | false | 0 |
start_normal_thread(void *ptr)
{
ECA_CONTROL* ctrl_base = static_cast<ECA_CONTROL*>(ptr);
ctrl_base->engine_pid_rep = getpid();
DBC_CHECK(ctrl_base->engine_pid_rep >= 0);
ECA_LOG_MSG(ECA_LOGGER::system_objects, "Engine thread started with pid: " + kvu_numtostr(ctrl_base->engine_pid_rep));
ctrl_base->run_eng... | false | false | false | false | false | 0 |
genf77_defineattr(Symbol* asym)
{
unsigned long len;
Datalist* list;
Symbol* basetype = asym->typ.basetype;
Bytebuffer* code = NULL; /* capture other decls*/
list = asym->data;
len = list==NULL?0:list->length;
bbprintf0(stmt,"* define %s\n",asym->name);
codedump(stmt);
code = bbNe... | false | false | false | false | false | 0 |
ReadLine()
{
std::string str;
while(!AtEnd())
{
char c = Read<char>();
if (c == '\n')
break;
str += c;
}
return str;
} | false | false | false | false | false | 0 |
tdb1_transaction_commit(struct tdb_context *tdb)
{
const struct tdb1_methods *methods;
int i;
bool need_repack = false;
if (tdb->tdb1.transaction == NULL) {
tdb->last_error = tdb_logerr(tdb, TDB_ERR_EINVAL, TDB_LOG_USE_ERROR,
"tdb1_transaction_commit:"
" no transaction");
return -1;
}
if (tdb->tdb... | false | false | false | false | false | 0 |
sel_netif_find(const struct net *ns,
int ifindex)
{
int idx = sel_netif_hashfn(ns, ifindex);
struct sel_netif *netif;
list_for_each_entry_rcu(netif, &sel_netif_hash[idx], list)
if (net_eq(netif->nsec.ns, ns) &&
netif->nsec.ifindex == ifindex)
return netif;
return NULL;
} | false | false | false | false | false | 0 |
__ntfs_warning(const char *function, const struct super_block *sb,
const char *fmt, ...)
{
struct va_format vaf;
va_list args;
int flen = 0;
#ifndef DEBUG
if (!printk_ratelimit())
return;
#endif
if (function)
flen = strlen(function);
va_start(args, fmt);
vaf.fmt = fmt;
vaf.va = &args;
if (sb)
pr_warn(... | false | false | false | false | false | 0 |
odf_fix_en_collect (gchar const *key, G_GNUC_UNUSED GnmNamedExpr *nexpr, odf_fix_expr_names_t *fen)
{
GString *str;
gchar *here;
if (expr_name_validate (key))
return;
if (NULL != g_hash_table_lookup (fen->orig2fixed, key))
return;
str = g_string_new (key);
for (here = str->str; *here; here = g_utf8_next_cha... | false | false | false | false | false | 0 |
pine_tcptimeout(long int elapsed, long int sincelast, char *host)
{
long rv = 1L; /* keep trying by default */
unsigned long ch;
#ifdef DEBUG
dprint((1, "tcptimeout: waited %s seconds\n",
long2string(elapsed)));
if(debugfile)
fflush(debugfile);
#endif
#ifdef _WINDOWS
mswin_killspla... | false | false | false | false | false | 0 |
isl_mat_from_row_vec(__isl_take isl_vec *vec)
{
struct isl_mat *mat;
if (!vec)
return NULL;
mat = isl_mat_alloc(vec->ctx, 1, vec->size);
if (!mat)
goto error;
isl_seq_cpy(mat->row[0], vec->el, vec->size);
isl_vec_free(vec);
return mat;
error:
isl_vec_free(vec);
return NULL;
} | false | false | false | false | false | 0 |
control_event_networkstatus_changed_single(const routerstatus_t *rs)
{
smartlist_t *statuses;
int r;
if (!EVENT_IS_INTERESTING(EVENT_NS))
return 0;
statuses = smartlist_new();
smartlist_add(statuses, (void*)rs);
r = control_event_networkstatus_changed(statuses);
smartlist_free(statuses);
return r;... | false | false | false | false | false | 0 |
setImagePath(const QString &imagePath)
{
const bool isThemed = !QDir::isAbsolutePath(imagePath);
// lets check to see if we're already set to this file
if (isThemed == themed &&
((themed && themePath == imagePath) ||
(!themed && path == imagePath))) {
return false;
}
eraseR... | false | false | false | false | false | 0 |
ope_amount_cell_data_function (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
{
Transaction *ope;
gint column = GPOINTER_TO_INT(user_data);
gchar buf[G_ASCII_DTOSTR_BUF_SIZE];
gint type;
gdouble amount;
gchar *color;
// get the transaction
gtk_tree_mode... | false | false | false | false | false | 0 |
show_location(RESULT *result){
gchar msg[512];
if(result->type == RESULT_TYPE_EB){
sprintf(msg, "%s : HEADING: page=%08x offset=%03x CONTENT: page=%08x offset=%03x",
result->data.eb.book_info->subbook_title,
result->data.eb.pos_heading.page,
result->data.eb.pos_heading.offset,
result->data.eb.pos_te... | false | false | false | false | false | 0 |
db_lookup_prepare_statement (const gchar *name_hash)
{
sqlite3_stmt *lookup_statement = NULL;
gchar *lookup_sql;
int rc;
lookup_sql = g_strdup_printf (LOOKUP_STATEMENT_SQL_TEMPLATE, name_hash);
rc = sqlite3_prepare_v2 (resource_db, lookup_sql, -1, &lookup_statement, NULL);
if (rc != SQLITE_OK)
... | false | false | false | false | false | 0 |
m_vaul_compute_static_level (pIIR_ArraySubtype t)
{
// Note: the static level of the base type does not enter the
// definition.
IR_StaticLevel lev = IR_LOCALLY_STATIC;
for (pIIR_TypeList cl = t->constraint; cl; cl = cl->rest)
lev = vaul_merge_levels (lev, cl->first->static_level);
return lev;
} | false | false | false | false | false | 0 |
AddCoord(OGRILI1Layer* layer, IOM_BASKET model, IOM_OBJECT modelele, IOM_OBJECT typeobj) {
unsigned int dim = ::GetCoordDim(model, typeobj);
for (unsigned int i=0; i<dim; i++) {
OGRFieldDefn fieldDef(CPLSPrintf("%s_%d", iom_getattrvalue(modelele, "name"), i), OFTReal);
layer->GetLayerDefn()->AddFieldDefn(&f... | false | false | false | false | false | 0 |
find_temp_source(struct nct6775_data *data, int index, int count)
{
int source = data->temp_src[index];
int nr;
for (nr = 0; nr < count; nr++) {
int src;
src = nct6775_read_value(data,
data->REG_TEMP_SOURCE[nr]) & 0x1f;
if (src == source)
return nr;
}
return -ENODEV;
} | false | false | false | false | false | 0 |
brasero_track_type_set_image_format (BraseroTrackType *type,
BraseroImageFormat format)
{
g_return_if_fail (type != NULL);
if (type->type != BRASERO_TRACK_TYPE_IMAGE)
return;
type->subtype.img_format = format;
} | false | false | false | false | false | 0 |
ioctld_plugin_init(int prio)
{
const char *ioctld_sock_path;
PLUGIN_CHECK_VER("ioctld");
plugin_register(&ioctld_plugin, prio);
ioctld_sock_path = prepare_path(".socket", 1);
if (!(ioctld_pid = fork())) {
execl(IOCTLD_PATH, "ioctld", ioctld_sock_path, (void *) NULL);
exit(0);
}
ioctld_socket(ioctld_so... | false | false | false | false | false | 0 |
gen_split_261 (operands)
rtx *operands;
{
rtx operand0;
rtx operand1;
rtx operand2;
rtx operand3;
rtx operand4;
rtx operand5;
rtx operand6;
rtx operand7;
rtx _val = 0;
start_sequence ();
PUT_MODE (operands[3], QImode);
if (X_REG_P (operands[2]))
{
operands[5] = operands[1];
... | false | false | false | false | false | 0 |
clip_set_play_item_from_selection (GtkWidget *view)
{
GtkTreeIter iter;
GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (view));
GtkTreeSelection *sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
if (gtk_tree_selection_get_selected (sel, NULL, &iter))
{
GValue vi = {0};
play_ite... | false | false | false | false | false | 0 |
configure(Vector<String> &conf, ErrorHandler *errh)
{
int output = 0;
if (Args(conf, this, errh).read_p("OUTPUT", output).complete() < 0)
return -1;
if (output >= noutputs())
return errh->error("output must be < %d", noutputs());
_output = output;
return 0;
} | false | false | false | false | false | 0 |
panel_util_get_icon_name_from_g_icon (GIcon *gicon)
{
const char * const *names;
GtkIconTheme *icon_theme;
int i;
if (!G_IS_THEMED_ICON (gicon))
return NULL;
names = g_themed_icon_get_names (G_THEMED_ICON (gicon));
icon_theme = gtk_icon_theme_get_default ();
for (i = 0; names[i] != NULL; i++) {
if (gtk_ic... | false | false | false | false | true | 1 |
handleRadio(const CEGUI::EventArgs& e)
{
using namespace CEGUI;
// get the ID of the selected radio button
CEGUI::uint id = static_cast<RadioButton*>(static_cast<const WindowEventArgs&>(e).window)->getSelectedButtonInGroup()->getID();
// get the StaticImage window
Window* img = WindowManager::getSi... | false | false | false | false | false | 0 |
tsl2x7x_do_calibrate(struct device *dev,
struct device_attribute *attr, const char *buf, size_t len)
{
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
bool value;
if (strtobool(buf, &value))
return -EINVAL;
if (value)
tsl2x7x_als_calibrate(indio_dev);
tsl2x7x_invoke_change(indio_dev);
return len;
} | false | false | false | false | false | 0 |
used_types_insert (tree t)
{
while (POINTER_TYPE_P (t) || TREE_CODE (t) == ARRAY_TYPE)
if (TYPE_NAME (t))
break;
else
t = TREE_TYPE (t);
if (TREE_CODE (t) == ERROR_MARK)
return;
if (TYPE_NAME (t) == NULL_TREE
|| TYPE_NAME (t) == TYPE_NAME (TYPE_MAIN_VARIANT (t)))
t = TYPE_MAIN_VA... | false | false | false | false | false | 0 |
window_mark_chain (WINDOW *chain, int flag)
{
register WINDOW *win;
for (win = chain; win; win = win->next)
win->flags |= flag;
} | 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.