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 |
|---|---|---|---|---|---|---|
Free_SinglePos( HB_GPOS_SubTable* st )
{
HB_UShort n, count, format;
HB_SinglePos* sp = &st->single;
HB_ValueRecord* v;
format = sp->ValueFormat;
switch ( sp->PosFormat )
{
case 1:
Free_ValueRecord( &sp->spf.spf1.Value, format );
break;
case 2:
if ( sp->spf.spf2.Value )
{... | false | false | false | false | false | 0 |
audio_probe(struct btd_device *device, GSList *uuids)
{
struct btd_adapter *adapter = device_get_adapter(device);
bdaddr_t src, dst;
struct audio_device *audio_dev;
adapter_get_address(adapter, &src);
device_get_address(device, &dst, NULL);
audio_dev = manager_get_device(&src, &dst, TRUE);
if (!audio_dev) {
... | false | false | false | false | false | 0 |
ubi_calc_data_len(const struct ubi_device *ubi, const void *buf,
int length)
{
int i;
ubi_assert(!(length & (ubi->min_io_size - 1)));
for (i = length - 1; i >= 0; i--)
if (((const uint8_t *)buf)[i] != 0xFF)
break;
/* The resulting length must be aligned to the minimum flash I/O size */
length = ALI... | false | false | false | false | false | 0 |
summary_set_row_tag(SummaryView *summaryview, GtkCMCTreeNode *row, gboolean refresh, gboolean set, gint id)
{
GtkCMCTree *ctree = GTK_CMCTREE(summaryview->ctree);
MsgInfo *msginfo;
gchar *tags_str = NULL;
msginfo = gtk_cmctree_node_get_row_data(ctree, row);
cm_return_val_if_fail(msginfo, FALSE);
procmsg_msginfo_... | false | false | false | false | false | 0 |
on_inspect_format(GArray *nodes)
{
const char *s = parse_lead_value(nodes);
const char *value = parse_find_value(nodes, "value");
gint format;
for (format = FORMAT_NATURAL; format < FORMAT_COUNT; format++)
if (!strcmp(inspect_formats[format], s))
break;
iff (format < FORMAT_COUNT, "bad format")
{
const c... | false | false | false | false | false | 0 |
parseCondition(const Token &tok, std::list<ExecutionPath *> & checks)
{
unsigned int parlevel = 0;
for (const Token *tok2 = &tok; tok2; tok2 = tok2->next()) {
if (tok2->str() == "(")
++parlevel;
else if (tok2->str() == ")") {
if (parlevel == 0)
break;
... | false | false | false | false | false | 0 |
path_outside_repo(const char *path)
{
/*
* We have already done setup_git_directory_gently() so we
* know we are inside a git work tree already.
*/
const char *work_tree;
size_t len;
if (!is_absolute_path(path))
return 0;
work_tree = get_git_work_tree();
len = strlen(work_tree);
if (strncmp(path, work_t... | false | false | false | false | false | 0 |
run( QWidget* parentWidget ) const
{
if (!d) {
kWarning() << "null item";
return;
}
(void) new KRun( targetUrl(), parentWidget, d->m_fileMode, d->m_bIsLocalUrl );
} | false | false | false | false | false | 0 |
my_telmon(RESULT * result, RESULT * arg1)
{
char *val = NULL;
if (configure_telmon() < 0) {
SetResult(&result, R_STRING, "");
return;
}
if (parse_telmon() < 0) {
SetResult(&result, R_STRING, "");
return;
}
val = hash_get(&TELMON, R2S(arg1), NULL);
if (val == NULL)
val = "";
SetRe... | false | false | false | false | false | 0 |
getReservedRegs(const MachineFunction &MF) const {
BitVector Reserved(getNumRegs());
const XCoreFrameLowering *TFI = getFrameLowering(MF);
Reserved.set(XCore::CP);
Reserved.set(XCore::DP);
Reserved.set(XCore::SP);
Reserved.set(XCore::LR);
if (TFI->hasFP(MF)) {
Reserved.set(XCore::R10);
}
return R... | false | false | false | false | false | 0 |
pow5mult
(struct dtoa_context* C, Bigint *b, int k)
{
Bigint *b1, *p5, *p51;
int i;
static const int p05[3] = { 5, 25, 125 };
if ((i = k & 3))
b = multadd(C, b, p05[i-1], 0);
if (!(k >>= 2))
return b;
if (!(p5 = C->p5s)) {
/* first time */
p5 = C->p5s = i2b(C, 625);
p5->next = 0;
}
for(;;) {
if ... | false | false | false | false | false | 0 |
SetContext(vtkRenderWindow* renWin)
{
if (this->Context == renWin)
{
return;
}
this->DestroyTexture();
vtkOpenGLRenderWindow* openGLRenWin = vtkOpenGLRenderWindow::SafeDownCast(renWin);
this->Context = openGLRenWin;
if (openGLRenWin)
{
if (!this->LoadRequiredExtensions(openGLRenWin->GetE... | false | false | false | false | false | 0 |
glfwGetMouseButton(GLFWwindow* handle, int button)
{
_GLFWwindow* window = (_GLFWwindow*) handle;
assert(window != NULL);
_GLFW_REQUIRE_INIT_OR_RETURN(GLFW_RELEASE);
if (button < GLFW_MOUSE_BUTTON_1 || button > GLFW_MOUSE_BUTTON_LAST)
{
_glfwInputError(GLFW_INVALID_ENUM, "Invalid mouse but... | false | false | false | false | false | 0 |
main(int argc, char* argv[])
{
/* Initialize/setup */
int init_ret = doInit(argc, argv);
if (init_ret == 0)
{
/* Main loop */
/* Notify other apps that FreeDink is playing */
log_path(/*true*/1);
/* Windows event loop */
int last_console_active = 0;
while(!g_b_kill... | false | false | false | false | false | 0 |
textui_cmd_disarm(void)
{
int y, x, dir;
dir = DIR_UNKNOWN;
/* Easy Disarm */
if (OPT(easy_open))
{
int num_traps, num_chests;
/* Count visible traps */
num_traps = count_feats(&y, &x, is_trap, TRUE);
/* Count chests (trapped) */
num_chests = count_chests(&y, &x, TRUE);
/* See if only one target *... | false | false | false | false | false | 0 |
champlain_marker_animate_out_with_delay (ChamplainMarker *marker,
guint delay)
{
gfloat y;
g_return_if_fail (CHAMPLAIN_IS_MARKER (marker));
clutter_actor_get_position (CLUTTER_ACTOR (marker), NULL, &y);
clutter_actor_set_opacity (CLUTTER_ACTOR (marker), 200);
clutter_actor_save_easing_state (CLUTTER_AC... | false | false | false | false | false | 0 |
readBTHeaderRec(io_func* io) {
BTHeaderRec* headerRec;
headerRec = (BTHeaderRec*) malloc(sizeof(BTHeaderRec));
if(!READ(io, sizeof(BTNodeDescriptor), sizeof(BTHeaderRec), headerRec)) {
free(headerRec);
return NULL;
}
FLIPENDIAN(headerRec->treeDepth);
FLIPENDIAN(headerRec->rootNode);
FLIP... | false | false | false | false | false | 0 |
add_compress_arg (FrCommand *comm)
{
FrArchive *archive = FR_ARCHIVE (comm);
if (_g_mime_type_matches (archive->mime_type, "application/x-compressed-tar"))
fr_process_add_arg (comm->process, "-z");
else if (_g_mime_type_matches (archive->mime_type, "application/x-bzip-compressed-tar"))
fr_process_add_arg (comm... | false | false | false | false | false | 0 |
_file_list_add_file (GthFindDuplicates *self,
GthFileData *file_data)
{
GFile *parent;
char *parent_name;
GTimeVal timeval;
GtkTreeIter iter;
parent = g_file_get_parent (file_data->file);
if (parent != NULL)
parent_name = g_file_get_parse_name (parent);
else
parent_name = NULL... | false | false | false | false | false | 0 |
getUnit() const {
g_assert(_unit_menu != NULL);
return _unit_menu->getUnit();
} | false | false | false | false | false | 0 |
ccombo_activate (GtkTreeView *list, gboolean button)
{
SheetObjectView *sov = g_object_get_data (G_OBJECT (list), SOV_ID);
GocItem *view = GOC_ITEM (sov);
GnmPane *pane = GNM_PANE (view->canvas);
GnmCComboViewClass *klass = GNM_CCOMBO_VIEW_GET_CLASS (sov);
if ((klass->activate) (sheet_object_view_get... | false | false | false | false | false | 0 |
lwgeom_release(LWGEOM *lwgeom)
{
uint32 i;
LWCOLLECTION *col;
#ifdef INTEGRITY_CHECKS
if ( ! lwgeom )
lwerror("lwgeom_release: someone called on 0x0");
#endif
/* Drop bounding box (always a copy) */
if ( lwgeom->bbox ) {
LWDEBUG(3, "lwgeom_release: releasing bbox.");
lwfree(lwg... | false | false | false | true | false | 1 |
set_m_pipe()
{
close(player_child_tem2);
player_child_tem2 = -1;
fd_set fd_set_write;
FD_ZERO(&fd_set_write);
FD_SET(player_child_tem, &fd_set_write);
EC_THROW( -1 == select (player_child_tem + 1, NULL, &fd_set_write, NULL, NULL));
} | false | false | false | false | false | 0 |
orte_write_hnp_contact_file(char *filename)
{
FILE *fp;
char *my_uri;
fp = fopen(filename, "w");
if (NULL == fp) {
opal_output( 0, "Impossible to open the file %s in write mode\n",
filename );
ORTE_ERROR_LOG(ORTE_ERR_FILE_OPEN_FAILURE);
return ORTE_ERR_FILE_... | false | false | false | false | true | 1 |
ue_filter4(User_expr *expr, int *result)
{
if (ue_tmatches(expr, T_LPAREN)) {
if (ue_filter1(expr, result) == -1)
return(-1);
if (ue_tmatches(expr, T_RPAREN))
return(0);
return(-1);
}
if (ue_eval(expr, result) == -1)
return(-1);
return(0);
} | false | false | false | false | false | 0 |
G3d_readWriteWindow(struct Key_Value *windowKeys, int doRead, int *proj,
int *zone, double *north, double *south, double *east,
double *west, double *top, double *bottom, int *rows,
int *cols, int *depths, double *ew_res, double *ns_res,
double *tb_res)
{
int returnVal;
int (*windowInt) ... | false | false | false | false | false | 0 |
findWord(char *s, int16_t length) {
uint32_t i;
for(i=0; i<wordCount; ++i) {
if(length==words[i].length && 0==uprv_memcmp(s, words[i].s, length)) {
return words+i;
}
}
return NULL;
} | false | false | false | false | false | 0 |
digest_client_request(struct digest_client_request_options *opt,
int argc, char **argv)
{
char *server_nonce, *client_nonce = NULL, server_identifier;
ssize_t snoncelen, cnoncelen = 0;
if (opt->server_nonce_string == NULL)
errx(1, "server nonce missing");
if (opt->password_string == NULL)
err... | false | false | false | false | false | 0 |
is_isert_tx_desc(struct isert_conn *isert_conn, void *wr_id)
{
void *start = isert_conn->rx_descs;
int len = ISERT_QP_MAX_RECV_DTOS * sizeof(*isert_conn->rx_descs);
if ((wr_id >= start && wr_id < start + len) ||
(wr_id == isert_conn->login_req_buf))
return false;
return true;
} | false | false | false | false | false | 0 |
ref_matrix22_mul (struct matrix *R,
const struct matrix *A,
const struct matrix *B, mp_ptr tp)
{
mp_size_t an, bn, n;
mp_ptr r00, r01, r10, r11, a00, a01, a10, a11, b00, b01, b10, b11;
if (A->n >= B->n)
{
r00 = R->e00; a00 = A->e00; b00 = B->e00;
r01 = R->e01; a01 = A->e01; b01 = B->e01;
... | false | false | false | false | false | 0 |
DvechmatGetEig(void* AA, int rank, double *eigenvalue, double vv[], int n, int indz[], int *nind){
dvechmat* A=(dvechmat*)AA;
int i,info;
double dd;
if (A->Eig.neigs>0){
info=EigMatGetEig(&A->Eig,rank,&dd,vv,n);DSDPCHKERR(info);
*nind=n;
*eigenvalue=dd*A->alpha;
for (i=0;i<n;i++){ indz[i]=i;}
... | false | false | false | false | false | 0 |
output(struct merge_options *o, int v, const char *fmt, ...)
{
int len;
va_list ap;
if (!show(o, v))
return;
strbuf_grow(&o->obuf, o->call_depth * 2 + 2);
memset(o->obuf.buf + o->obuf.len, ' ', o->call_depth * 2);
strbuf_setlen(&o->obuf, o->obuf.len + o->call_depth * 2);
va_start(ap, fmt);
len = vsnprintf(... | false | false | false | false | true | 1 |
loggingCallback_verbose(const int logLevel, const char *const message)
{
switch(logLevel)
{
case MDynamicAudioNormalizer::LOG_LEVEL_NFO:
PRINT2_NFO(FMT_CHAR, message);
break;
case MDynamicAudioNormalizer::LOG_LEVEL_WRN:
PRINT2_WRN(FMT_CHAR, message);
break;
case MDynamicAudioNormalizer::LOG_LEVEL_ERR:
PR... | false | false | false | false | false | 0 |
xerrset(void)
{
LVAL expr,flag,val;
XLCONTEXT cntxt;
/* get the expression and the print flag */
expr = xlgetarg();
flag = (moreargs() ? xlgetarg() : s_true);
xllastarg();
/* establish an execution context */
xlbegin(&cntxt,CF_ERROR,flag);
/* check for error */
if (setjmp(cntx... | false | false | false | false | false | 0 |
InitAux()
{
if (fInit) {
jack_log("JackClient::Init calling client thread init callback");
fInit(fInitArg);
}
} | false | false | false | false | false | 0 |
nemo_entry_set_text (NemoEntry *entry, const gchar *text)
{
g_return_if_fail (NEMO_IS_ENTRY (entry));
entry->details->user_edit = FALSE;
gtk_entry_set_text (GTK_ENTRY (entry), text);
entry->details->user_edit = TRUE;
g_signal_emit (entry, signals[SELECTION_CHANGED], 0);
} | false | false | false | false | false | 0 |
gwlist_search_all(List *list, void *pattern, int (*cmp)(void *, void *))
{
List *new_list;
void *item;
long i;
new_list = gwlist_create();
lock(list);
item = NULL;
for (i = 0; i < list->len; ++i) {
item = GET(list, i);
if (cmp(item, pattern))
gwlist_append(new_l... | false | false | false | false | false | 0 |
echo_message (TpTextChannel *channel,
TpMessage *message,
gboolean pending)
{
gchar *text;
gchar *up;
TpMessage *reply;
TpChannelTextMessageFlags flags;
const gchar *comment = "";
text = tp_message_to_text (message, &flags);
if (flags & TP_CHANNEL_TEXT_MESSAGE_FLAG_NON_TEXT_CONTENT)
{
... | false | false | false | false | false | 0 |
calcmove(node *root) { // return best move after root
expandnode(root);
if (!root->son) return(0); // no move due to loss
if (debug) printf("calcmove() initial nodes = %d\n",nodes);
evaluated = 0;
if (root->son->brother) {
int x;
for (x = 1; abs(root->value)<28000 && fullexpand(root,x); x++);
piec... | false | false | false | false | false | 0 |
process_stdin(f_state *s)
{
f_info *i = (f_info *)malloc(sizeof(f_info));
i->file_name = strdup("stdin");
s->input_file = "stdin";
i->handle = stdin;
i->is_stdin = TRUE;
/* We can't compute the size of this stream, we just ignore it*/
i->total_bytes = 0;
audit_start(s, i);
search_stream(s, i);
free(i->fil... | false | false | false | false | false | 0 |
setup_sample_model(const CsvParser::type_row_strings& row)
{
m_sample_model = Gtk::ListStore::create(m_sample_columns);
m_sample_view->set_model(m_sample_model);
// Create field vector that contains the fields into which to import
// the data.
m_fields.resize(row.size());
// Start with a column showing th... | false | false | false | false | false | 0 |
RecordTransactionAbortPrepared(TransactionId xid,
int nchildren,
TransactionId *children,
int nrels,
RelFileNode *rels)
{
XLogRecData rdata[3];
int lastrdata = 0;
xl_xact_abort_prepared xlrec;
XLogRecPtr recptr;
/*
* Catch the scenario where we aborted partway through
... | false | false | false | false | false | 0 |
OnEditHighlightMode(wxCommandEvent& event)
{
cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
if (ed)
{
EditorColourSet* theme = Manager::Get()->GetEditorManager()->GetColourSet();
if (theme)
{
HighlightLanguage lang = theme->GetHighlightLangua... | false | false | false | false | false | 0 |
krb5_auth_con_setpermetypes(krb5_context context,
krb5_auth_context auth_context,
const krb5_enctype *permetypes)
{
krb5_enctype *newpe;
krb5_error_code ret;
ret = k5_copy_etypes(permetypes, &newpe);
if (ret != 0)
return ret;
free(aut... | false | false | false | false | false | 0 |
plpgsql_HashTableInsert(PLpgSQL_function *function,
PLpgSQL_func_hashkey *func_key)
{
plpgsql_HashEnt *hentry;
bool found;
hentry = (plpgsql_HashEnt *) hash_search(plpgsql_HashTable,
(void *) func_key,
HASH_ENTER,
&found);
if (found)
elog(WARNING, "trying to insert a fu... | false | false | false | false | false | 0 |
midgard_query_storage_new (const gchar *classname)
{
g_return_val_if_fail (classname != NULL, NULL);
GType type = g_type_from_name (classname);
if (!type) {
g_warning ("Class %s is not registered in GType system", classname);
return NULL;
}
GObjectClass *klass = G_OBJECT_CLASS (g_type_class_peek (type));
if... | false | false | false | false | false | 0 |
find_attack(loc_t loc, char *obj_list, char *terrain)
{
loc_t new_loc, best_loc;
int i, best_val;
char *p;
best_loc = loc; /* nothing found yet */
best_val = INFINITY;
for (i = 0; i < 8; i++) {
new_loc = loc + dir_offset[i];
if (map[new_loc].on_board /* can we move here? */
&& strchr (t... | false | false | false | false | false | 0 |
switch_device(snd_use_case_mgr_t *uc_mgr,
const char *old_device,
const char *new_device)
{
struct use_case_device *xold, *xnew;
struct transition_sequence *trans;
struct list_head *pos;
int err, seq_found = 0;
if (uc_mgr... | false | false | false | false | false | 0 |
readcmd(String *s)
{
int retcode;
if(flist != 0)
fileclose(flist);
flist = fileopen();
addr.r.p1 = 0, addr.r.p2 = flist->b.nc;
retcode = plan9(flist, '<', s, FALSE);
fileupdate(flist, FALSE, FALSE);
flist->seq = 0;
if (flist->b.nc > BLOCKSIZE)
error(Etoolong);
Strzero(&genstr);
Strinsure(&genstr, flist-... | false | false | false | false | false | 0 |
HTS_name2num(const char *buff)
{
size_t i;
for (i = strlen(buff) - 1; '0' <= buff[i] && buff[i] <= '9' && i >= 0; i--);
i++;
return (size_t) atoi(&buff[i]);
} | false | false | false | false | false | 0 |
qmonShareTreeCut(Widget w, XtPointer cld, XtPointer cad)
{
Widget tree = (Widget)cld;
ListTreeItem *item = NULL;
ListTreeMultiReturnStruct ret;
tSTNUserData *data;
DENTER(GUI_LAYER, "qmonShareTreeCut");
ListTreeGetHighlighted(tree, &ret);
if (ret.count <= 0) {
DEXIT;
return;
}
i... | false | false | false | false | false | 0 |
SetLogEventMask(const char *events)
{
ExceptionInfo
*exception;
LogInfo
*log_info;
ssize_t
option;
exception=AcquireExceptionInfo();
log_info=(LogInfo *) GetLogInfo("*",exception);
exception=DestroyExceptionInfo(exception);
option=ParseCommandOption(MagickLogEventOptions,MagickTrue,events);... | false | false | false | false | false | 0 |
read_block(FILE *in, int offset, int size, void *buf)
{
int len;
if (size < 0) {
printc_err("coff: invalid size: %d\n", size);
return -1;
}
if (fseek(in, offset, SEEK_SET) < 0) {
printc_err("coff: can't seek to offset %d: %s\n",
offset, strerror(errno));
return -1;
}
len = fread(buf, 1, size, in);
... | false | false | false | false | false | 0 |
hp_supply_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{
struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
/* Enable the headphone amp */
snd_soc_update_bits(codec, WM8995_POWER_MANAGEMENT_1,
WM8995_HPOUT1L_E... | false | false | false | false | false | 0 |
is_explored(int xLoc1, int yLoc1, int xLoc2, int yLoc2)
{
if( config.explore_whole_map )
return 1;
int xLoc, yLoc;
Location* locPtr;
for( yLoc=yLoc1 ; yLoc<=yLoc2 ; yLoc++ )
{
locPtr = get_loc(xLoc1, yLoc);
for( xLoc=xLoc1 ; xLoc<=xLoc2 ; xLoc++, locPtr++ )
{
if( !locPtr... | false | false | false | false | false | 0 |
yy_lac (yytype_int16 *yyesa, yytype_int16 **yyes,
YYSIZE_T *yyes_capacity, yytype_int16 *yyssp, int yytoken)
{
yytype_int16 *yyes_prev = yyssp;
yytype_int16 *yyesp = yyes_prev;
YYDPRINTF ((stderr, "LAC: checking lookahead %s:", yytname[yytoken]));
if (yytoken == YYUNDEFTOK)
{
YYDPRINTF ((stder... | false | false | false | false | true | 1 |
mmap( void *start, pfs_size_t length, int prot, int flags, off_t offset ) {
void *result;
result = ::mmap((caddr_t)start,length,prot,flags,fd,offset);
debug(D_LOCAL,"= %d %s",(PTRINT_T)result,(((PTRINT_T)result>=0) ? "" : strerror(errno)) );
return result;
} | false | false | false | false | false | 0 |
list_doaction (gftp_window_data * wdata)
{
intptr_t list_dblclk_action;
GList *templist, *filelist;
gftp_file *tempfle;
int num, success;
char *directory;
gftp_lookup_request_option (wdata->request, "list_dblclk_action",
&list_dblclk_action);
filelist = wdata->files;
tem... | false | false | false | false | false | 0 |
quiesce_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
struct iatt *postbuf)
{
call_stub_t *stub = NULL;
quiesce_local_t *local = NULL;
local = frame->local;
frame->local = NUL... | false | false | false | false | false | 0 |
apol_infoflow_analysis_do_more(const apol_policy_t * p, apol_infoflow_graph_t * g, const char *type, apol_vector_t ** v)
{
const qpol_type_t *start_type;
int retval = -1;
if (v != NULL) {
*v = NULL;
}
if (p == NULL || g == NULL || type == NULL || v == NULL) {
ERR(p, "%s", strerror(EINVAL));
goto cleanup;
}
... | false | false | false | false | false | 0 |
next() {
// FIXME: It's not this simple when affixes are involved
WordEntry * w = real_->next();
if (!w) return 0;
return w->word;
} | false | false | false | false | false | 0 |
parse_options(char *arg, LHAOptions *options)
{
for (; *arg != '\0'; ++arg) {
switch (*arg) {
// Force overwrite of existing files.
case 'f':
options->overwrite_policy = LHA_OVERWRITE_ALL;
break;
// -i option turns off paths for extract.
case 'i':
options->use_path = 0;
break;
// Dry... | false | false | false | false | false | 0 |
pcpu_chunk_relocate(struct pcpu_chunk *chunk, int oslot)
{
int nslot = pcpu_chunk_slot(chunk);
if (chunk != pcpu_reserved_chunk && oslot != nslot) {
if (oslot < nslot)
list_move(&chunk->list, &pcpu_slot[nslot]);
else
list_move_tail(&chunk->list, &pcpu_slot[nslot]);
}
} | false | false | false | false | false | 0 |
StoreValueToMemory(const GenericValue &Val,
GenericValue *Ptr, Type *Ty) {
const unsigned StoreBytes = getDataLayout().getTypeStoreSize(Ty);
switch (Ty->getTypeID()) {
default:
dbgs() << "Cannot store value of type " << *Ty << "!\n";
break;
case Type::IntegerTyI... | false | false | false | false | false | 0 |
get_dac_if_single(struct hda_codec *codec, hda_nid_t pin)
{
struct hda_gen_spec *spec = codec->spec;
int i;
hda_nid_t nid_found = 0;
for (i = 0; i < spec->num_all_dacs; i++) {
hda_nid_t nid = spec->all_dacs[i];
if (!nid || is_dac_already_used(codec, nid))
continue;
if (is_reachable_path(codec, nid, pin)) ... | false | false | false | false | false | 0 |
gretl_mkdir (const char *path)
{
int err;
errno = 0;
err = g_mkdir_with_parents(path, 0755);
if (err) {
fprintf(stderr, "%s: %s\n", path, strerror(errno));
err = 1;
}
return err;
} | false | false | false | false | false | 0 |
base32_decode(const char *base32,xstring& out)
{
unsigned data=0;
int data_bits=0;
int pad_bits=0;
while(*base32) {
char c=*base32++;
if(c=='=' && data_bits<=pad_bits)
return;
if(pad_bits>0 && c!='=')
return;
int v=base32_char_to_value(c);
if(v==-1)
return;
data|=((... | false | false | false | false | false | 0 |
print_rules()
{
rulerec *r = this;
int i = 0;
if ( r != NULL )
{
for ( ; r != NULL; r = r->next )
{
fprintf(codefile,
"{\"%s\", ",
r->rulename);
if ( r->conditionname == NULL )
fprintf(codefile, "NULL, ");
else fprintf (codefile, "&%s, ", r->conditionnam... | false | false | false | false | false | 0 |
buffer_alloc(size_t size)
{
struct buffer *buffer = malloc(sizeof(*buffer) + size);
if (buffer != NULL) {
buffer->size = size;
memset(buffer->data, 0, buffer->size);
return buffer;
}
return NULL;
} | false | false | false | false | false | 0 |
DeclareFunctionVar(Handle<String> name) {
ASSERT(is_function_scope() && function_ == NULL);
Variable* function_var =
new Variable(this, name, Variable::CONST, true, Variable::NORMAL);
function_ = new(isolate_->zone()) VariableProxy(isolate_, function_var);
return function_var;
} | false | false | false | false | false | 0 |
ib_destroy_cq(struct ib_cq *cq)
{
if (atomic_read(&cq->usecnt))
return -EBUSY;
return cq->device->destroy_cq(cq);
} | false | false | false | false | false | 0 |
uinput_ff_upload_from_user(const char __user *buffer,
struct uinput_ff_upload *ff_up)
{
if (INPUT_COMPAT_TEST) {
struct uinput_ff_upload_compat ff_up_compat;
if (copy_from_user(&ff_up_compat, buffer,
sizeof(struct uinput_ff_upload_compat)))
return -EFAULT;
ff_up->request_id = ff_up_compat.r... | false | false | false | false | false | 0 |
brasero_status_dialog_wait_for_ready_state (BraseroStatusDialog *dialog)
{
BraseroStatusDialogPrivate *priv;
BraseroBurnResult result;
BraseroStatus *status;
priv = BRASERO_STATUS_DIALOG_PRIVATE (dialog);
status = brasero_status_new ();
result = brasero_burn_session_get_status (priv->session, status);
if (res... | false | false | false | false | false | 0 |
setZipError(int zipError) const
{
QuaZipFilePrivate *fakeThis = const_cast<QuaZipFilePrivate*>(this); // non-const
fakeThis->zipError = zipError;
if(zipError == UNZ_OK)
{
q->setErrorString(QString());
}
else
{
q->setErrorString(QString("ZIP/UNZIP API error %1").arg(zipError))... | false | false | false | false | false | 0 |
insert_into_options(string)
char *string;
{
int x;
char ** argv;
int argc;
int max_arg;
char *tmp;
char **tmp_argv;
int cgt; /* whether a call to get token has been done with the string yet */
cgt = 0;
/* allocate a temporary argv */
CheckMem(
argv = (char **) malloc(sizeof(char *) * 5) /... | false | false | false | true | false | 1 |
setLocale(const Locale& loc, UErrorCode& status) {
if (U_FAILURE(status)) {
return;
}
locale = loc;
msgPattern.clear();
delete numberFormat;
offset = 0;
numberFormat = NULL;
pluralRulesWrapper.reset();
init(NULL, UPLURAL_TYPE_CARDINAL, status);
} | false | false | false | false | false | 0 |
close(u_int32_t _flags)
{
DB_LOGC *logc = this;
int ret;
DbEnv *dbenv2 = DbEnv::get_DbEnv(logc->env->dbenv);
ret = logc->close(logc, _flags);
if (!DB_RETOK_STD(ret))
DB_ERROR(dbenv2, "DbLogc::close", ret, ON_ERROR_UNKNOWN);
return (ret);
} | false | false | false | false | false | 0 |
save (int fd,
const string &filename) {
// create an XML DOM
RepoXMLDoc doc;
doc.create ("ac-project");
doc.root ().set_str_prop ("version", ac_version ());
RepoXMLNode files = doc.root ().make_child ("files");
// first insert all files
for (list<File>::iterator i = _files.begin (); i != _files.end ();... | false | false | false | false | false | 0 |
addkey(int k_index, int k_table, int keycode)
{
int i;
if (keycode == CODE_FOR_UNKNOWN_KSYM)
/* is safer not to be silent in this case,
* it can be caused by coding errors as well. */
lkfatal(_("addkey called with bad keycode %d"), keycode);
if (k_index < 0 || k_index >= NR_KEYS)
lkfatal(_("addkey called... | false | false | false | false | false | 0 |
is_unique_insn_expansion (TransitionRule *r)
{
if (!r->to_instr || r->to_instr->next != NULL)
return FALSE;
if (r->to_instr->typ != INSTR_INSTR)
return FALSE;
return TRUE;
} | false | false | false | false | false | 0 |
ComputeElementSize() const {
// compute the size of a single data element
uint64_t uiBitsPerElement = 0;
for (size_t i = 0;i<ulElementDimension;i++)
for (size_t j = 0;j<ulElementDimensionSize[i];j++)
uiBitsPerElement += ulElementBitSize[i][j];
return uiBitsPerElement;
} | false | false | false | false | false | 0 |
set(unsigned int key, std::string s) {
if(!m_instance)return false;
f0r_param_string*v=const_cast<f0r_param_string*>(s.c_str());
f0r_set_param_value(m_instance, &v, key);
return true;
} | false | false | false | false | false | 0 |
se401_get_feature(struct gspca_dev *gspca_dev, u16 selector)
{
int err;
if (gspca_dev->usb_err < 0)
return gspca_dev->usb_err;
if (USB_BUF_SZ < 2) {
pr_err("USB_BUF_SZ too small!!\n");
gspca_dev->usb_err = -ENOBUFS;
return gspca_dev->usb_err;
}
err = usb_control_msg(gspca_dev->dev,
usb_rcvctrlp... | false | false | false | false | false | 0 |
gsql_session_lock (GSQLSession *session)
{
GSQL_TRACE_FUNC;
GSQLWorkspace *workspace;
g_return_val_if_fail (GSQL_IS_SESSION (session), FALSE);
if (!g_mutex_trylock (session->private->lock))
{
workspace = gsql_session_get_workspace (session);
gsql_message_add (workspace,
GSQL_MESSAGE_WARNING, ... | false | false | false | false | false | 0 |
yy_HtmlBlockOpenMenu(yycontext *ctx)
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
yyprintf((stderr, "%s\n", "HtmlBlockOpenMenu")); if (!yymatchChar(ctx, '<')) goto l1062; if (!yy_Spnl(ctx)) goto l1062;
{ int yypos1063= ctx->pos, yythunkpos1063= ctx->thunkpos; if (!yymatchString(ctx, "menu")) goto l1064;... | false | false | false | false | false | 0 |
pxa_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req)
{
struct pxa_ep *ep;
struct udc_usb_ep *udc_usb_ep;
struct pxa27x_request *req;
unsigned long flags;
int rc = -EINVAL;
if (!_ep)
return rc;
udc_usb_ep = container_of(_ep, struct udc_usb_ep, usb_ep);
ep = udc_usb_ep->pxa_ep;
if (!ep || is_ep0(e... | false | false | false | false | false | 0 |
test_object_set_property (GObject *gobject,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
switch (prop_id)
{
case PROP_BLAH:
{
const TestBoxed *blah = g_value_get_boxed (value);
TEST_... | false | false | false | false | false | 0 |
zprint_num(void)
{
char buf[7];
int i = 0;
long v = (int16_t)zargs[0];
if(v < 0) v = -v;
do
{
buf[i++] = '0' + (v % 10);
} while(v /= 10);
if((int16_t)zargs[0] < 0) buf[i++] = '-';
while(i--) put_char(buf[i]);
} | true | true | false | false | false | 1 |
reiserfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
loff_t offset)
{
struct file *file = iocb->ki_filp;
struct inode *inode = file->f_mapping->host;
size_t count = iov_iter_count(iter);
ssize_t ret;
ret = blockdev_direct_IO(iocb, inode, iter, offset,
reiserfs_get_blocks_direct_io);
/*
* I... | false | false | false | false | false | 0 |
RemoveFunctionParser(
void *theEnv,
char *functionName)
{
struct FunctionDefinition *fdPtr;
fdPtr = FindFunction(theEnv,functionName);
if (fdPtr == NULL)
{
EnvPrintRouter(theEnv,WERROR,"Function parsers can only be removed from existing functions.\n");
return(0);
}
fdPtr->parse... | false | false | false | false | false | 0 |
poolAppend(STRING_POOL *pool, const ENCODING *enc,
const char *ptr, const char *end)
{
if (!pool->ptr && !poolGrow(pool))
return NULL;
for (;;) {
const enum XML_Convert_Result convert_res = XmlConvert(enc, &ptr, end, (ICHAR **)&(pool->ptr), (ICHAR *)pool->end);
if ((convert_res == XML_CONVERT... | false | false | false | false | false | 0 |
webauthldap_managedbind(MWAL_LDAP_CTXT* lc)
{
int rc;
struct stat keytab_stat;
int fd;
int princ_specified;
if (lc->sconf->debug)
ap_log_error(APLOG_MARK, APLOG_INFO, 0, lc->r->server,
"webauthldap(%s): begins ldap bind", lc->r->user);
rc = webauthldap_bind(lc, 0);... | false | false | false | false | true | 1 |
set_status_data_free (gpointer data)
{
SetStatusData *status_data = data;
g_free (status_data->primary_status);
g_free (status_data->detail_status);
g_slice_free (SetStatusData, data);
} | false | false | false | false | false | 0 |
rcar_unreg_slave(struct i2c_client *slave)
{
struct rcar_i2c_priv *priv = i2c_get_adapdata(slave->adapter);
WARN_ON(!priv->slave);
rcar_i2c_write(priv, ICSIER, 0);
rcar_i2c_write(priv, ICSCR, 0);
priv->slave = NULL;
pm_runtime_put(rcar_i2c_priv_to_dev(priv));
return 0;
} | false | false | false | false | false | 0 |
video_set_cur_state(struct thermal_cooling_device *cooling_dev, unsigned long state)
{
struct acpi_device *device = cooling_dev->devdata;
struct acpi_video_device *video = acpi_driver_data(device);
int level;
if (state >= video->brightness->count - 2)
return -EINVAL;
state = video->brightness->count - state;
... | false | false | false | false | false | 0 |
sighandler_alarm(int sig)
{
int other = 0;
char dtmf[2];
dtmf[1] = '\0';
while (dialextra && *dialextra != '\0' && *dialextra != ',') {
dtmf[0] = *dialextra;
printlog(LOG_INFO, "Dialing DTMF '%s'\n", dtmf);
iax_send_dtmf(session[0], *dialextra);
dialextra++;
}
while (dialextra && *dialextra ... | true | true | false | false | false | 1 |
Load_Lookup( HB_Lookup* l,
HB_Stream stream,
HB_Type type )
{
HB_Error error;
HB_UShort n, m, count;
HB_UInt cur_offset, new_offset, base_offset;
HB_SubTable* st;
HB_Bool is_extension = FALSE;
base_offset = FILE_Pos();
if ( ACCESS_Frame( 6L ) )
r... | false | false | false | false | false | 0 |
connman_network_set_strength(struct connman_network *network,
uint8_t strength)
{
DBG("network %p strengh %d", network, strength);
network->strength = strength;
return 0;
} | false | false | false | false | false | 0 |
handle_cli_core_show_channeltype(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
struct chanlist *cl = NULL;
char buf[512];
switch (cmd) {
case CLI_INIT:
e->command = "core show channeltype";
e->usage =
"Usage: core show channeltype <name>\n"
" Show details about the specified channel type, <... | false | false | false | false | false | 0 |
genbank_print_lines(fp, string, flag, separators)
FILE *fp;
char *string;
int flag;
const char *separators;
{
int first_time=1, indi, indj, indk /*,indl*/;
int ibuf, len;
len = Lenstr(string)-1;
/* indi: first char of the line */
/* num of char, excluding the... | 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.