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 |
|---|---|---|---|---|---|---|
SlotExistPCommand(
void *theEnv)
{
DEFCLASS *cls;
SLOT_DESC *sd;
int inheritFlag = FALSE;
DATA_OBJECT dobj;
sd = CheckSlotExists(theEnv,"slot-existp",&cls,FALSE,TRUE);
if (sd == NULL)
return(FALSE);
if (EnvRtnArgCount(theEnv) == 3)
{
if (EnvArgTypeCheck(theEnv,"slot-existp",... | false | false | false | false | false | 0 |
cmd_idx(cmd_code code)
{
size_t i;
for (i = 0; i < N_ELEMENTS(game_cmds); i++)
{
if (game_cmds[i].cmd == code)
return i;
}
return -1;
} | false | false | false | false | false | 0 |
print_path (const char *path)
{
int len = strlen (path);
int i;
if (len == 0)
{
/* Don't emit "pat", since we may try to take the address of it,
which isn't what is intended. */
printf("PATTERN (insn)");
return;
}
/* We first write out the operations (XEXP or XVECEXP) in reverse
... | false | false | false | false | false | 0 |
expand_files(std::list<FileData> &job_files,char* session_dir) {
for(FileData::iterator i = job_files.begin();i!=job_files.end();) {
std::string url = i->lfn;
// Only ftp and gsiftp can be expanded to directories so far
if(strncasecmp(url.c_str(),"ftp://",6) &&
strncasecmp(url.c_str(),"gsiftp://",... | false | false | false | false | false | 0 |
upload()
{
char buf[0x1000];
ssize_t n = 0;
// upload file fd is closed via cleanup() in STATE_UPLOADING
if ((n = peer->recv(buf, sizeof(buf))) <= 0)
return send_error(HTTP_ERROR_400, -1);
if (write(peer->file_fd, buf, n) != n)
return send_error(HTTP_ERROR_500, -1);
peer->copied += n;
if (peer->copied ==... | false | false | false | false | false | 0 |
SetDefaultSize(int default_size, bool resizeExisting)
{
wxCHECK_RET(default_size >= 0, wxT("Edge default size must be greater than 0"));
m_default_size = default_size;
if (resizeExisting)
m_data.Clear();
else
CheckMinimize();
} | false | false | false | false | false | 0 |
test_create_pem (TestCertificate *test,
gconstpointer data)
{
GTlsCertificate *cert;
gchar *pem = NULL;
GError *error = NULL;
cert = g_tls_certificate_new_from_pem (test->cert_pem, test->cert_pem_length, &error);
g_assert_no_error (error);
g_assert (G_IS_TLS_CERTIFICATE (cert));
g_objec... | false | false | false | false | false | 0 |
e_util_fullscreen_current_any(void)
{
E_Manager *man = e_manager_current_get();
E_Container *con = e_container_current_get(man);
E_Zone *zone = e_zone_current_get(con);
E_Desk *desk;
if ((zone) && (zone->fullscreen > 0)) return EINA_TRUE;
desk = e_desk_current_get(zone);
if ((desk) && (desk->fulls... | false | false | false | false | false | 0 |
emit_constructor(pIIR_ArchitectureDeclaration a, string &str, RegionStack &rstack)
{
rstack.push(a->entity);
rstack.push(a);
pIIR_EntityDeclaration e = a->entity;
// The current C++ source code is not associated with any real
// VHDL source line
last_pos_info = emit_posinfo(NO_SOURCE_LINE, str, last_pos_in... | false | false | false | false | false | 0 |
wm8983_set_pll(struct snd_soc_dai *dai, int pll_id,
int source, unsigned int freq_in,
unsigned int freq_out)
{
int ret;
struct snd_soc_codec *codec;
struct pll_div pll_div;
codec = dai->codec;
if (!freq_in || !freq_out) {
/* disable the PLL */
snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_1,
... | false | false | false | false | false | 0 |
lancer_cmd_delete_object(struct be_adapter *adapter, const char *obj_name)
{
struct lancer_cmd_req_delete_object *req;
struct be_mcc_wrb *wrb;
int status;
spin_lock_bh(&adapter->mcc_lock);
wrb = wrb_from_mccq(adapter);
if (!wrb) {
status = -EBUSY;
goto err;
}
req = embedded_payload(wrb);
be_wrb_cmd_hdr... | false | false | false | false | false | 0 |
xfs_image(const void *buf, unsigned long long *bytes)
{
const struct xfs_sb *sb = (const struct xfs_sb *)buf;
if (__be32_to_cpu(sb->sb_magicnum) == XFS_SB_MAGIC) {
*bytes = __be64_to_cpu(sb->sb_dblocks) *
__be32_to_cpu(sb->sb_blocksize);
return 1;
}
return 0;
} | false | false | false | false | false | 0 |
RegisterOptions(const SmartPtr<RegisteredOptions>& roptions)
{
roptions->AddLowerBoundedNumberOption(
"nlp_scaling_max_gradient", "Maximum gradient after NLP scaling.",
0, true, 100.0,
"This is the gradient scaling cut-off. If the maximum"
" gradient is above this value, then gradient base... | false | false | false | false | false | 0 |
bcm2835_spi_prepare_sg(struct spi_master *master,
struct spi_transfer *tfr,
bool is_tx)
{
struct dma_chan *chan;
struct scatterlist *sgl;
unsigned int nents;
enum dma_transfer_direction dir;
unsigned long flags;
struct dma_async_tx_descriptor *desc;
dma_cookie_t cookie;
if (is_tx) {
dir = DMA_... | false | false | false | false | false | 0 |
panel_action_connect_server (GtkWidget *widget)
{
GdkScreen *screen;
GAppInfo *app_info;
GError *error;
screen = gtk_widget_get_screen (GTK_WIDGET (widget));
error = NULL;
app_info = g_app_info_create_from_commandline ("nautilus-connect-server",
_("Connect to server"),
G_APP_INFO_CR... | false | false | false | false | false | 0 |
which(int event_x, int event_y) {
int H = tab_height();
if (H < 0) {
if (event_y > y()+h() || event_y < y()+h()+H) return 0;
} else {
if (event_y > y()+H || event_y < y()) return 0;
}
if (event_x < x()) return 0;
int p[128], wp[128];
tab_positions(p, wp);
for (int i=0; i<children(); i++) {
i... | false | false | false | false | false | 0 |
EvaluateLocation(int& vtkNotUsed(subId),
double pcoords[3],
double x[3], double *weights)
{
int i;
double a0[3], a1[3], a2[3], a3[3], a4[3], a5[3], a6[3];
this->Points->GetPoint(0, a0);
this->Points->GetPoint(1, a1);
this->Point... | false | false | false | false | false | 0 |
grab_color_at_mouse (GdkScreen *screen,
gint x_root,
gint y_root,
gpointer data)
{
GdkImage *image;
guint32 pixel;
ColorPicker *colorpicker = data;
ColorPickerPrivate *priv;
GdkColormap *colormap = gdk_screen_get_system_colormap (screen);
GdkWindow *root_window = gdk_scree... | false | false | false | false | false | 0 |
cid(ElementClassT *type)
{
HashTable<ElementClassT *, int>::iterator it = class2cid.find_insert(type, -1);
if (it.value() < 0) {
it.value() = cid2class.size();
cid2class.push_back(type);
cid_hrefs.push_back(String());
}
return it.value();
} | false | false | false | false | false | 0 |
gst_rtp_depay_getcaps (GstPad * pad)
{
GstRTPDepay *src;
GstPad *other;
GstCaps *caps;
src = GST_RTP_DEPAY (GST_PAD_PARENT (pad));
other = pad == src->src_rtp ? src->sink_rtp : src->src_rtp;
caps = gst_pad_peer_get_caps (other);
if (caps == NULL)
caps = gst_caps_copy (gst_pad_get_pad_template_caps... | false | false | false | false | false | 0 |
ListMacros(void)
{
MACRO_TYPE type;
const MACRO_HEADER * head;
const MACRO * macro;
int i;
printf("%s\n", FIRST_LINE);
printf("# System initialization file is \"%s\".\n", SYSTEM_INIT_FILE);
for (type = 0; type < MACRO_TYPE_COUNT; type++)
{
head = ¯oLists[type];
for (macro = head->list; macro; mac... | false | false | false | false | false | 0 |
irc_connect_cb(AyConnection *con, AyConnectionStatus error,
void *data)
{
eb_local_account *ela = (eb_local_account *)data;
irc_local_account *ila =
(irc_local_account *)ela->protocol_local_account_data;
char buff[BUF_LEN];
if (error) {
if (error != AY_CANCEL_CONNECT) {
snprintf(buff, sizeof(buff), _("Can... | true | true | false | false | false | 1 |
sort_series (const double *x, double *y, int f,
const DATASET *dset)
{
double *z = NULL;
int n = sample_size(dset);
int i, t;
z = malloc(n * sizeof *z);
if (z == NULL) {
return E_ALLOC;
}
i = 0;
for (t=dset->t1; t<=dset->t2; t++) {
if (!na(x[t])) {
z[i++] = x[t];
}
}
... | false | true | false | false | true | 1 |
sortChildren()
{
qSort(_fragments.begin(), _fragments.end(), PadFragment::lessThan);
foreach(PadFragment *f, _fragments)
f->sortChildren();
} | false | false | false | false | false | 0 |
sig_rejoin(void)
{
GSList *tmp;
for (tmp = servers; tmp != NULL; tmp = tmp->next) {
IRC_SERVER_REC *rec = tmp->data;
if (IS_IRC_SERVER(rec) && rec->rejoin_channels != NULL)
server_rejoin_channels(rec);
}
return TRUE;
} | false | false | false | false | false | 0 |
phone_feat_id(const cst_phoneset *ps,const char* featname)
{
int i;
for (i=0; ps->featnames[i]; i++)
if (cst_streq(ps->featnames[i],featname))
return i;
/* Wonder if I should print an error here or not */
return 0;
} | false | false | false | false | false | 0 |
format_sanitized_subject(struct strbuf *sb, const char *msg)
{
size_t trimlen;
size_t start_len = sb->len;
int space = 2;
for (; *msg && *msg != '\n'; msg++) {
if (istitlechar(*msg)) {
if (space == 1)
strbuf_addch(sb, '-');
space = 0;
strbuf_addch(sb, *msg);
if (*msg == '.')
while (*(msg+1) =... | false | false | false | false | false | 0 |
process_tag (const GstTagList *list, const gchar *tag, RBXFadeStream *stream)
{
RBMetaDataField field;
GValue value = {0,};
/* process embedded images */
if (!g_strcmp0 (tag, GST_TAG_IMAGE) || !g_strcmp0 (tag, GST_TAG_PREVIEW_IMAGE)) {
GdkPixbuf *pixbuf;
pixbuf = rb_gst_process_embedded_image (list, tag);
if... | false | false | false | false | false | 0 |
toggle_show_peaks_toggled(GtkToggleButton *togglebutton, gpointer user_data)
{
GtkWidget* xyplot = NULL;
GList* data_list = NULL;
GList* current = NULL;
XYPlotWinData* data;
gboolean showPeaks = FALSE;
if(!user_data || !G_IS_OBJECT(user_data)) return;
xyplot = GTK_WIDGET(user_data);
data_list = g_object_get_d... | false | false | false | false | false | 0 |
e_ews_connection_update_items_finish (EEwsConnection *cnc,
GAsyncResult *result,
GSList **ids,
GError **error)
{
GSimpleAsyncResult *simple;
EwsAsyncData *async_data;
g_return_val_if_fail (cnc != NULL, ... | false | false | false | false | false | 0 |
popup_view_list_dump(ht_view *view, ht_text_listbox *listbox, List *structure, int depth, int *currenti, ht_view *currentv)
{
if (!view) return 0;
char str[256]; /* secure */
char *s=str;
if (!(view->options & VO_BROWSABLE)) {
depth--;
}
for (int i=0; i<depth; i++) { *(s++)=' ';*(s++)=' '; }
*s=0;
int c=vie... | false | false | false | false | false | 0 |
convert_hline_YUY2 (paintinfo * p, int y)
{
int i;
guint8 *Y = p->yp + y * p->ystride;
guint8 *U = p->up + y * p->ustride;
guint8 *V = p->vp + y * p->vstride;
guint8 *ayuv = p->tmpline;
for (i = 0; i < p->width; i++) {
Y[i * 2] = ayuv[4 * i + 1];
}
for (i = 0; i < (p->width + 1) / 2; i++) {
U[4... | false | false | false | false | false | 0 |
p_cdddar(li_object *args) {
assert_nargs(1, args);
if (!li_is_pair(li_car(args)) && !li_is_pair(li_cdr(li_car(args))) &&
!li_is_pair(li_cddr(li_car(args))) && !li_is_pair(li_cdddr(li_car(args))))
li_error("list is too short", li_car(args));
return li_cdddar(li_car(args));
} | false | false | false | false | false | 0 |
Set_mode_SDL(int *width, int *height, int fullscreen)
{
static SDL_Cursor* cur = NULL;
static byte cursorData = 0;
Screen_SDL=SDL_SetVideoMode(*width,*height,8,(fullscreen?SDL_FULLSCREEN:0)|SDL_RESIZABLE);
if(Screen_SDL != NULL)
{
// Check the mode we got, in case it was different from the one we request... | false | false | false | false | false | 0 |
ggc_alloc_string (contents, length)
const char *contents;
int length;
{
if (length == -1)
length = strlen (contents);
if (length == 0)
return empty_string;
if (length == 1 && ISDIGIT (contents[0]))
return digit_string (contents[0] - '0');
obstack_grow0 (&string_stack, contents, length);
... | false | false | false | false | false | 0 |
ARMMaterializeGV(const GlobalValue *GV, EVT VT) {
// For now 32-bit only.
if (VT != MVT::i32) return 0;
Reloc::Model RelocM = TM.getRelocationModel();
// TODO: Need more magic for ARM PIC.
if (!isThumb && (RelocM == Reloc::PIC_)) return 0;
// MachineConstantPool wants an explicit alignment.
unsigned Al... | false | false | false | false | false | 0 |
connect_b3_t90_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
PLCI *plci, APPL *appl, API_PARSE *parms)
{
word ncci;
API_PARSE *ncpi;
byte req;
dbug(1, dprintf("connect_b3_t90_a_res"));
ncci = (word)(Id >> 16);
if (plci && ncci) {
if (a->ncci_state[ncci] == INC_ACT_PENDING) {
a->ncci_state[ncci] =... | false | false | false | false | false | 0 |
gf_control_filter(FILTER_S *f, int flg)
{
GF_INIT(f, f->next);
if(flg == GF_DATA){
register unsigned char c;
register int filt_only_c0;
filt_only_c0 = f->opt ? (*(int *) f->opt) : 0;
while(GF_GETC(f, c)){
if(((c < 0x20 || c == 0x7f)
|| (c >= 0x80 && c < 0xA0 && !filt_only_c0))
&& !(ASCII_... | false | false | false | true | false | 1 |
slurm_cred_faker(slurm_cred_arg_t *arg)
{
int fd;
slurm_cred_t *cred = NULL;
xassert(arg != NULL);
cred = _slurm_cred_alloc();
slurm_mutex_lock(&cred->mutex);
cred->jobid = arg->jobid;
cred->stepid = arg->stepid;
cred->uid = arg->uid;
cred->job_mem_limit = arg->job_mem_limit;
cred->step_mem_limi... | false | true | false | false | true | 1 |
handle_timeouts(void)
{
struct timeval next_timeout_expiry;
struct fpi_timeout *next_timeout;
int r;
r = get_next_timeout_expiry(&next_timeout_expiry, &next_timeout);
if (r <= 0)
return r;
if (!timerisset(&next_timeout_expiry))
handle_timeout(next_timeout);
return 0;
} | false | false | false | false | false | 0 |
bfs_add_entry(struct inode *dir, const unsigned char *name,
int namelen, int ino)
{
struct buffer_head *bh;
struct bfs_dirent *de;
int block, sblock, eblock, off, pos;
int i;
dprintf("name=%s, namelen=%d\n", name, namelen);
if (!namelen)
return -ENOENT;
if (namelen > BFS_NAMELEN)
return -ENAMETOOLON... | false | false | false | false | false | 0 |
mmctestburst2_ast2150(struct ast_private *ast, u32 datagen)
{
u32 data, timeout;
ast_moutdwm(ast, 0x1e6e0070, 0x00000000);
ast_moutdwm(ast, 0x1e6e0070, 0x00000001 | (datagen << 3));
timeout = 0;
do {
data = ast_mindwm(ast, 0x1e6e0070) & 0x40;
if (++timeout > TIMEOUT_AST2150) {
ast_moutdwm(ast, 0x1e6e0070, ... | false | false | false | false | false | 0 |
get_str(const std::string& key, const std::string& def) const
{
const_iterator iter = this->find(key);
if (iter == this->end()) {
DENA_VERBOSE(10, fprintf(stderr, "CONFIG: %s=%s(default)\n", key.c_str(),
def.c_str()));
return def;
}
DENA_VERBOSE(10, fprintf(stderr, "CONFIG: %s=%s\n", key.c_str(),
... | false | false | false | false | false | 0 |
dwarf_get_aranges(Dwarf_Debug dbg,
Dwarf_Arange ** aranges,
Dwarf_Signed * returned_count, Dwarf_Error * error)
{
/* Count of total number of aranges. */
Dwarf_Signed arange_count = 0;
Dwarf_Arange *arange_block = 0;
/* Used to chain Dwarf_Aranges structs. */
Dwarf_Chain curr_chain = NULL;... | false | false | false | false | false | 0 |
Curl_pp_statemach(struct pingpong *pp, bool block)
{
struct connectdata *conn = pp->conn;
curl_socket_t sock = conn->sock[FIRSTSOCKET];
int rc;
long interval_ms;
long timeout_ms = Curl_pp_state_timeout(pp);
struct SessionHandle *data=conn->data;
CURLcode result = CURLE_OK;
if(timeout_ms <=0 ) {
fai... | false | false | false | false | false | 0 |
lan78xx_bind(struct lan78xx_net *dev, struct usb_interface *intf)
{
struct lan78xx_priv *pdata = NULL;
int ret;
int i;
ret = lan78xx_get_endpoints(dev, intf);
dev->data[0] = (unsigned long)kzalloc(sizeof(*pdata), GFP_KERNEL);
pdata = (struct lan78xx_priv *)(dev->data[0]);
if (!pdata) {
netdev_warn(dev->net,... | false | false | false | false | false | 0 |
RunWizard(wxWizardPageEx *firstPage)
{
wxCHECK_MSG( firstPage, false, wxT("can't run empty wizard") );
// can't return false here because there is no old page
(void)ShowPage(firstPage, true /* forward */);
m_wasModal = true;
return ShowModal() == wxID_OK;
} | false | false | false | false | false | 0 |
xgene_enet_open(struct net_device *ndev)
{
struct xgene_enet_pdata *pdata = netdev_priv(ndev);
struct xgene_mac_ops *mac_ops = pdata->mac_ops;
int ret;
ret = netif_set_real_num_tx_queues(ndev, pdata->txq_cnt);
if (ret)
return ret;
ret = netif_set_real_num_rx_queues(ndev, pdata->rxq_cnt);
if (ret)
return re... | false | false | false | false | false | 0 |
assign_continent_flood(struct tile *ptile, bool is_land, int nr)
{
struct tile_list *tlist = NULL;
const struct terrain *pterrain = NULL;
fc_assert_ret(ptile != NULL);
pterrain = tile_terrain(ptile);
/* Check if the initial tile is a valid tile for continent / ocean. */
fc_assert_ret(tile_continent(ptile)... | false | false | false | false | false | 0 |
header_source (struct _CamelSExp *f,
gint argc,
struct _CamelSExpResult **argv,
FilterMessageSearch *fms)
{
CamelMimeMessage *message;
CamelSExpResult *r;
const gchar *src;
CamelService *msg_source = NULL;
gboolean truth = FALSE;
if (fms->source) {
src = fms->source... | false | false | false | false | false | 0 |
closureIdentity( StgClosure *p )
{
switch (RtsFlags.ProfFlags.doHeapProfile) {
#ifdef PROFILING
case HEAP_BY_CCS:
return p->header.prof.ccs;
case HEAP_BY_MOD:
return p->header.prof.ccs->cc->module;
case HEAP_BY_DESCR:
return GET_PROF_DESC(get_itbl(p));
case HEAP_BY_TYPE:
return GET_PROF_TYPE(ge... | false | false | false | false | false | 0 |
createRange(Constant *Lo, Constant *Hi) {
// If the range is everything then it is useless.
if (Hi == Lo)
return nullptr;
// Return the range [Lo, Hi).
Metadata *Range[2] = {createConstant(Lo), createConstant(Hi)};
return MDNode::get(Context, Range);
} | false | false | false | false | false | 0 |
_GXCDraw_hasCairo(void) {
int initted = false, hasC;
if ( !usecairo )
return( false );
if ( !initted )
hasC = FcInit();
return( hasC );
} | false | false | false | false | false | 0 |
getForm(const Jid &j)
{
d->type = 3;
to = j;
iq = createIQ(doc(), "get", to.full(), id());
QDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:register");
iq.appendChild(query);
} | false | false | false | false | false | 0 |
wordbase(char *word, int ender)
{
char *pt1;
static char copy[WORDBUF];
if (strlen(word) > WORDBUF - 1)
return(NULL);
strcpy(copy, word);
if(strend(copy,sufx[ender])) {
pt1=strchr(copy,'\0');
pt1 -= strlen(sufx[ender]);
*pt1='\0';
strcat(copy,addr[ender]);
}
return(copy);
} | false | false | false | false | false | 0 |
drm_agp_init(struct drm_device *dev)
{
struct drm_agp_head *head = NULL;
if (!(head = kzalloc(sizeof(*head), GFP_KERNEL)))
return NULL;
head->bridge = agp_find_bridge(dev->pdev);
if (!head->bridge) {
if (!(head->bridge = agp_backend_acquire(dev->pdev))) {
kfree(head);
return NULL;
}
agp_copy_info(hea... | false | false | false | false | false | 0 |
PlotFinal(char* output) const
{
string name(output);
name += ".gpl";
ofstream out(name.c_str());
out << "set noxtics\nset noytics\n"
<< "set noborder\nset nokey\nset title '" << _fig->NAME << "'\n"
<< "#set terminal postscript eps color solid\n#set output '"
<< output << ".ps'\n"
<< "set xrange[" <... | false | false | false | false | false | 0 |
i40e_resume_port_tx(struct i40e_pf *pf)
{
struct i40e_hw *hw = &pf->hw;
int ret;
ret = i40e_aq_resume_port_tx(hw, NULL);
if (ret) {
dev_info(&pf->pdev->dev,
"Resume Port Tx failed, err %s aq_err %s\n",
i40e_stat_str(&pf->hw, ret),
i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
/* Schedule PF r... | false | false | false | false | false | 0 |
GetHillFormulaCounts( U_CHAR *nAtom, S_CHAR *nNum_H, int num_atoms,
AT_NUMB *nTautomer, int lenTautomer,
int *pnum_C, int *pnum_H, int *pnLen, int *pnNumNonHAtoms )
{
char szElement[4];
U_CHAR nPrevAtom = (U_CHAR)-2;
int bCarbon, bHydrogen, nElemLen, nFor... | false | false | false | false | false | 0 |
e_categories_selector_get_checked (ECategoriesSelector *selector)
{
GString *str;
GList *list, *category;
g_return_val_if_fail (E_IS_CATEGORIES_SELECTOR (selector), NULL);
str = g_string_new ("");
list = g_hash_table_get_values (selector->priv->selected_categories);
/* to get them always in the same order */
... | false | false | false | false | false | 0 |
m32_gen_access(struct m32_data *d,cpu_gen_t *cpu,
m_uint32_t offset,u_int op_size,u_int op_type,
m_uint64_t *data)
{
switch(offset) {
/* Action Specification */
case 0x0:
if (op_type == MTS_WRITE)
m32_action_req(d,*data);
... | false | false | false | false | false | 0 |
IsVisible(gps *objpos)
{
// For the purpose of visibility checking, we might as well exclude objects
// that are too far away to ever be visible and thereby save some checks of
// longer lines on the map, that wouldn't be necessary or helpful anyway.
//
if ((fabsf(Me.pos.x - objpos->x) > FLOOR_TILES_VISIBLE_AROUN... | false | false | false | false | false | 0 |
process_watch_cb (GPid pid,
gint status,
GitgRunner *runner)
{
runner->priv->pid = 0;
if (WIFEXITED (status))
{
gitg_io_set_exit_status (GITG_IO (runner), WEXITSTATUS (status));
}
else
{
gitg_io_set_exit_status (GITG_IO (runner), 0);
}
/* Note that we don'... | false | false | false | false | false | 0 |
CreateMaskBand( int nFlags )
{
if( poDS != NULL && poDS->oOvManager.IsInitialized() )
{
CPLErr eErr = poDS->oOvManager.CreateMaskBand( nFlags, nBand );
if (eErr != CE_None)
return eErr;
/* Invalidate existing raster band mask */
if (bOwnMask)
delete poMa... | false | false | false | false | false | 0 |
frob_nested_routerlinks(RouterT *r, const String &compname)
{
ElementClassT *t = ElementClassT::base_type("RouterLink");
int cnamelen = compname.length();
for (RouterT::type_iterator x = r->begin_elements(t); x; x++) {
Vector<String> words;
cp_argvec(x->configuration(), words);
for (int j = 0; j < wor... | false | false | false | false | false | 0 |
mul(unsigned int a, unsigned int b)
{
if (a == 0)
return 0;
if (div_down(UINT_MAX, a) < b)
return UINT_MAX;
return a * b;
} | false | false | false | false | false | 0 |
trtrace(Vmalloc_t * vm,
Vmuchar_t * oldaddr, Vmuchar_t * newaddr, size_t size,
size_t align)
#else
static void trtrace(vm, oldaddr, newaddr, size, align)
Vmalloc_t *vm; /* region call was made from */
Vmuchar_t *oldaddr; /* old data address */
Vmuchar_t *newaddr; /* new data address ... | false | false | false | false | false | 0 |
crypto_seed_rng(int startup)
{
int rand_poll_status = 0;
/* local variables */
#ifdef _WIN32
unsigned char buf[ADD_ENTROPY];
static int provider_set = 0;
static HCRYPTPROV provider;
#else
char buf[ADD_ENTROPY];
static const char *filenames[] = {
"/dev/srandom", "/dev/urandom", "/dev/random", NULL
}... | false | false | false | false | false | 0 |
panel_util_get_file_icon_name_if_mount (GFile *file)
{
GFile *compare;
GVolumeMonitor *monitor;
GList *mounts, *l;
char *ret;
ret = NULL;
/* compare with all mounts */
monitor = g_volume_monitor_get ();
mounts = g_volume_monitor_get_mounts (monitor);
for (l = mounts; l != NULL; l ... | false | false | false | false | false | 0 |
ifile_get_file(IAnjutaFile* ifile, GError **e)
{
AnjutaDesignDocument* self = ANJUTA_DESIGN_DOCUMENT(ifile);
GladeProject* project = glade_design_view_get_project(GLADE_DESIGN_VIEW(self));
const gchar* path = glade_project_get_path(project);
if (path != NULL)
return g_file_new_for_path (path);
else
return ... | false | false | false | false | false | 0 |
print(raw_ostream &OS) const {
OS << " AliasSet[" << (void*)this << ", " << RefCount << "] ";
OS << (AliasTy == MustAlias ? "must" : "may") << " alias, ";
switch (AccessTy) {
case NoModRef: OS << "No access "; break;
case Refs : OS << "Ref "; break;
case Mods : OS << "Mod "; break;
case... | false | false | false | false | false | 0 |
getNextValue(valueType)
int valueType;
{
scan_token(inputP);
if (tokenType != valueType) {
return(SCAN_ERROR);
}
return(SCAN_OK);
} | false | false | false | false | false | 0 |
triangulate(int n, const int* verts, int* indices, int* tris)
{
int ntris = 0;
int* dst = tris;
// The last bit of the index is used to indicate if the vertex can be removed.
for (int i = 0; i < n; i++)
{
int i1 = next(i, n);
int i2 = next(i1, n);
if (diagonal(i, i2, n, ... | false | false | false | false | false | 0 |
sentences() const {
static set<ElementType> excludeSet;
if ( excludeSet.empty() ){
excludeSet.insert( Quote_t );
}
return foliadoc->select<Sentence>( excludeSet );
} | false | false | false | false | false | 0 |
cfhsi_setup(struct net_device *dev)
{
int i;
struct cfhsi *cfhsi = netdev_priv(dev);
dev->features = 0;
dev->type = ARPHRD_CAIF;
dev->flags = IFF_POINTOPOINT | IFF_NOARP;
dev->mtu = CFHSI_MAX_CAIF_FRAME_SZ;
dev->priv_flags |= IFF_NO_QUEUE;
dev->destructor = free_netdev;
dev->netdev_ops = &cfhsi_netdevops;
for... | false | false | false | false | false | 0 |
VRTSerializeWarpedOverviewTransformer( void *pTransformArg )
{
CPLXMLNode *psTree;
VWOTInfo *psInfo = (VWOTInfo *) pTransformArg;
psTree = CPLCreateXMLNode( NULL, CXT_Element, "WarpedOverviewTransformer" );
CPLCreateXMLElementAndValue( psTree, "XFactor",
CPLString().P... | false | false | false | false | false | 0 |
juman_close(void)
{
int i;
for(i = 0 ; i < DicFile.number ; i++)
fclose(DicFile.dic[i]);
free(rensetu_tbl);
free(rensetu_mtr);
return TRUE;
} | false | false | false | false | false | 0 |
afr_writev_done (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
local = frame->local;
iobref_unref (local->cont.writev.iobref);
local->cont.writev.iobref = NULL;
local->transaction.unwind (frame, this);
AFR_STACK_DESTROY (frame);
return 0;
... | false | false | false | false | false | 0 |
printGraphDotFormat(ostream& fout)
{
lgraph G;
sortGraph(fTopLoop, G);
fout << "strict digraph loopgraph {" << endl;
fout << '\t' << "rankdir=LR;" << endl;
fout << '\t' << "node[color=blue, fillcolor=lightblue, style=filled, fontsize=9];" << endl;
int lnum = 0; // used for loop numbers
... | false | false | false | false | false | 0 |
grd_JN (struct GRDMATH_INFO *info, float *stack[], GMT_LONG *constant, double *factor, GMT_LONG last)
/*OPERATOR: JN 2 1 Bessel function of A (1st kind, order B). */
{
GMT_LONG i, prev;
int order = 0;
GMT_LONG simple = FALSE;
double b = 0.0;
prev = last - 1;
if (constant[last]) {
if (gmtdefs.verbose && factor... | false | false | false | false | false | 0 |
setY(UT_sint32 i)
{
bool bIsFirstBroken = false;
xxx_UT_DEBUGMSG(("fp_TableContainer: setY set to %d \n",i));
if(isThisBroken())
{
xxx_UT_DEBUGMSG(("setY: getMasterTable %x FirstBrokenTable %x this %x \n",getMasterTable(),getMasterTable()->getFirstBrokenTable(),this));
if(getMasterTable()->getFirstBrokenTable()... | false | false | false | false | false | 0 |
hsw_log_message(struct sst_hsw *hsw, u32 header)
{
u32 operation = (header & IPC_LOG_OP_MASK) >> IPC_LOG_OP_SHIFT;
struct sst_hsw_log_stream *stream = &hsw->log_stream;
int ret = 1;
if (operation != IPC_DEBUG_REQUEST_LOG_DUMP) {
dev_err(hsw->dev,
"error: log msg not implemented 0x%8.8x\n", header);
return ... | false | false | false | false | false | 0 |
quota_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
quota_local_t *local = NULL;
local = quota_local_new ();
if (local == NULL) {
goto unwind;
}
frame->local = local;
local->loc.inode = inode_ref (fd->inode);
STACK_WIND... | false | false | false | false | false | 0 |
xmlParseURIPathSegments(xmlURIPtr uri, const char **str, int slash)
{
const char *cur;
if (str == NULL)
return (-1);
cur = *str;
do {
while ((IS_PCHAR(cur)) ||
((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur))))
NEXT(cur);
while (*cur == ';') ... | false | false | false | false | false | 0 |
av_new_avfs(const char *name, struct ext_info *exts, int version,
int flags, struct vmodule *module, struct avfs **retp)
{
int ret;
struct avfs *avfs;
ret = av_check_version("CoreLib", name, version, NEED_VER, AV_VER);
if(ret < 0)
return ret;
AV_NEW_OBJ(avfs, free_avfs);
... | false | false | false | false | false | 0 |
match(const nstring &name, sub_functor_list &result)
{
for (size_t j = 0; j < length; ++j)
{
sub_functor::pointer sfp = list[j];
if (arglex_compare(sfp->name_get().c_str(), name.c_str(), 0))
{
trace(("hit \"%s\"\n", sfp->name_get().c_str()));
if (sfp->override())
... | false | false | false | false | false | 0 |
skipWhiteSpaces( StyleContext & sc ) {
while( isspace( sc.ch ) ) {
sc.SetState( SCE_MODULA_DEFAULT );
if( sc.More() )
sc.Forward();
else
return false;
}
return true;
} | false | false | false | false | false | 0 |
process(
CActionRobotMovement2D &in_poseChange,
CSensoryFrame &in_sf,
TDoorCrossingOutParams &out_estimation
)
{
// Variables for generic use:
size_t i;
out_estimation.cumulativeTurning = 0;
MRPT_START
// 1) Add new pair to the list:
// -----------------------------------------
lastObs.addAction(... | false | false | false | false | false | 0 |
generateRec(Tree sig, Tree var, Tree le)
{
int N = len(le);
vector<bool> used(N);
vector<int> delay(N);
vector<string> vname(N);
vector<string> ctype(N);
// prepare each element of a recursive definition
for (int i=0; i<N; i++) {
Tree e = sigProj(i,sig); ... | false | false | false | false | false | 0 |
pp_poll (struct file * file, poll_table * wait)
{
struct pp_struct *pp = file->private_data;
unsigned int mask = 0;
poll_wait (file, &pp->irq_wait, wait);
if (atomic_read (&pp->irqc))
mask |= POLLIN | POLLRDNORM;
return mask;
} | false | false | false | false | false | 0 |
rehash_id(struct fuse *f)
{
struct node_table *t = &f->id_table;
struct node **nodep;
struct node **next;
size_t hash;
if (t->split == t->size / 2)
return;
hash = t->split;
t->split++;
for (nodep = &t->array[hash]; *nodep != NULL; nodep = next) {
struct node *node = *nodep;
size_t newhash = id_hash(f, n... | false | false | false | false | false | 0 |
twl6040_read(struct snd_soc_codec *codec, unsigned int reg)
{
struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
struct twl6040 *twl6040 = codec->control_data;
u8 value;
if (reg >= TWL6040_CACHEREGNUM)
return -EIO;
switch (reg) {
case TWL6040_REG_HSLCTL:
case TWL6040_REG_HSRCTL:
case TWL6040_REG_... | false | false | false | false | false | 0 |
mmc_flush_cache(struct mmc_card *card)
{
int err = 0;
if (mmc_card_mmc(card) &&
(card->ext_csd.cache_size > 0) &&
(card->ext_csd.cache_ctrl & 1)) {
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
EXT_CSD_FLUSH_CACHE, 1, 0);
if (err)
pr_err("%s: cache flush error %d\n",
mmc_hostname(card->host), ... | false | false | false | false | false | 0 |
jffs2_rtime_decompress(unsigned char *data_in,
unsigned char *cpage_out,
uint32_t srclen, uint32_t destlen)
{
unsigned short positions[256];
int outpos = 0;
int pos=0;
memset(positions,0,sizeof(positions));
while (outpos<destlen) {
unsigned char value;
int backoffs;
int repeat;
value = data_... | false | false | false | false | false | 0 |
lcm(unsigned a, unsigned b)
{
if (a == b)
return a;
else
return a * b / gcd(a, b);
} | false | false | false | false | false | 0 |
next_addr( const char ** const ibufpp, int * const addr_cnt )
{
const char * const s = *ibufpp = skip_blanks( *ibufpp );
int addr = current_addr();
bool first = true; /* true == addr, false == offset */
while( true )
{
int n;
const unsigned char ch = **ibufpp;
if( isdigit( ch ) )
{
... | false | false | false | false | false | 0 |
load_module(void)
{
if (!(class_container = ao2_container_alloc(1, null_hash_fn, ao2_match_by_addr)))
return AST_MODULE_LOAD_DECLINE;
if (load_odbc_config() == -1)
return AST_MODULE_LOAD_DECLINE;
ast_cli_register_multiple(cli_odbc, ARRAY_LEN(cli_odbc));
ast_data_register_multiple(odbc_providers, ARRAY_LEN(odbc_... | false | false | false | false | false | 0 |
_evry_cb_item_changed(__UNUSED__ void *data, __UNUSED__ int type, void *event)
{
Evry_Event_Item_Changed *ev = event;
Evry_Selector *sel;
Evry_Item *it = ev->item;
if (!it || !it->plugin || !it->plugin->state)
return ECORE_CALLBACK_PASS_ON;
sel = it->plugin->state->selector;
if (sel->state && ... | false | false | false | false | false | 0 |
read_qt_bool(const guchar **p, gsize *size, gboolean *value)
{
*value = FALSE;
if (*size < sizeof(guchar))
return FALSE;
*value = !!**p;
gwy_debug("QBool data: %d", *value);
*size -= sizeof(guchar);
(*p)++;
return TRUE;
} | false | false | false | false | false | 0 |
b1pcmcia_delcard(unsigned int port, unsigned irq)
{
struct list_head *l;
avmcard *card;
list_for_each(l, &cards) {
card = list_entry(l, avmcard, list);
if (card->port == port && card->irq == irq) {
b1pcmcia_remove_ctr(&card->ctrlinfo[0].capi_ctrl);
return 0;
}
}
return -ESRCH;
} | true | true | false | false | false | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.