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 |
|---|---|---|---|---|---|---|
s48_make_subcall (s48_call_t call)
{
s48_call_t new = (s48_call_t ) malloc (sizeof (struct s48_call_s));
if (new == NULL)
s48_out_of_memory_error();
memset (new, 0, sizeof (*new));
new->local_refs = make_ref_group ();
new->older_call = NULL;
new->subcall_parent = call;
new->child = NULL;
if (call->... | false | false | false | false | false | 0 |
terminal_window_screen_update (TerminalWindow *window,
GdkScreen *screen)
{
TerminalApp *app;
terminal_window_window_manager_changed_cb (screen, window);
g_signal_connect (screen, "window-manager-changed",
G_CALLBACK (terminal_window_window_manager_changed_cb), ... | false | false | false | false | false | 0 |
MngInfoFreeStruct(MngInfo *mng_info,int *have_mng_structure)
{
if (*have_mng_structure && (mng_info != (MngInfo *) NULL))
{
register long
i;
for (i=1; i < MNG_MAX_OBJECTS; i++)
MngInfoDiscardObject(mng_info,i);
if (mng_info->global_plte != (png_colorp) NULL)
MagickFr... | false | false | false | false | false | 0 |
PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const {
SelectionDAG &DAG = DCI.DAG;
SDValue Val;
switch (N->getOpcode()) {
case ISD::ADDE:
return performADDECombine(N, DAG, DCI, Subtarget);
case ISD::AND:
Val = performANDCombine(N, DAG, DCI, Subtarget);
break;
case ISD::OR:
Val = perfor... | false | false | false | false | false | 0 |
FixPointOnLine ( DiagPointInfo *diagpts,PointVector *line,
PointData *pd,InstrCt *ct,BasePoint *fv,BasePoint *pv,int *rp1,int *rp2 ) {
uint8 *instrs, *touched;
BasePoint newpv;
int ptcnt;
int pushpts[4];
touched = ct->touched;
instrs = ct->pt;
ptcnt = ct->ptcnt;
newpv = GetVector(... | false | false | false | false | false | 0 |
stringHasChar(S s,C c){I i=0;while(s[i])if(c==s[i++])R 1;R 0;} | false | false | false | false | false | 0 |
unpack_octal (GsfInfileTar *tar, const char *s, size_t len)
{
gint64 res = 0;
while (len--) {
unsigned char c = *s++;
if (c == 0)
break;
if (c < '0' || c > '7') {
tar->err = g_error_new (gsf_input_error_id (), 0,
_("Invalid tar header"));
return 0;
}
res = (res << 3) + (c - '0');
}
return... | false | false | false | false | false | 0 |
create_menu_linetype (GSCHEM_TOPLEVEL *w_current)
{
GtkWidget *menu;
GSList *group;
struct line_type {
gchar *str;
OBJECT_TYPE type;
} types[] = { { N_("Solid"), TYPE_SOLID },
{ N_("Dotted"), TYPE_DOTTED },
{ N_("Dashed"), TYPE_DASHED },
{ N_("Center")... | false | false | false | false | false | 0 |
closeActionX()
{
bd.runCount++;
QDateTime now = QDateTime::currentDateTime();
if ((bd.runCount > 5) && (bd.donateSplashed.daysTo(now) > 30)) {
Donate donate(0);
if (bd.donateSplashed.date() == QDate(2010,1,1))
donate.showNever(false);
donate.exec();
bd.donateSplashed = now;
}
saveSettin... | false | false | false | false | false | 0 |
read(bool readProperties, Properties::ReadStyle propertiesStyle)
{
ByteVector speexHeaderData = packet(0);
if(!speexHeaderData.startsWith("Speex ")) {
debug("Speex::File::read() -- invalid Speex identification header");
return;
}
ByteVector commentHeaderData = packet(1);
d->comment = new Ogg::Xip... | false | false | false | false | false | 0 |
eventListener(int *type, ...) {
int rv = 0;
va_list args;
char *buf, message[MAX_BUF], script[MAX_BUF];
object *who, *activator/*, *third*/, *event;
int query;
va_start(args, type);
who = va_arg(args, object *);
activator = va_arg(args, object *);
/*third =*/ va_arg(args, object *)... | false | false | false | false | false | 0 |
gen_more_arcs(struct csa *csa, struct arcs *arc_ptr)
{ /* Generate random arcs to meet the specified density. */
int i;
double ab[2];
ab[0] = 0.9;
ab[1] = n_node - 0.99; /* upper limit is n_node-1 because the
supernode cannot be selected */
for (i = n_... | false | false | false | false | false | 0 |
GetCostStat(unsigned litlen, unsigned dist, void* context) {
SymbolStats* stats = (SymbolStats*)context;
if (dist == 0) {
return stats->ll_symbols[litlen];
} else {
int lsym = ZopfliGetLengthSymbol(litlen);
int lbits = ZopfliGetLengthExtraBits(litlen);
int dsym = ZopfliGetDistSymbol(dist);
int... | false | false | false | false | false | 0 |
emitBPOSGE32(MachineInstr *MI, MachineBasicBlock *BB) const{
// $bb:
// bposge32_pseudo $vr0
// =>
// $bb:
// bposge32 $tbb
// $fbb:
// li $vr2, 0
// b $sink
// $tbb:
// li $vr1, 1
// $sink:
// $vr0 = phi($vr2, $fbb, $vr1, $tbb)
MachineRegisterInfo &RegInfo = BB->getParent()->getRegInf... | false | false | false | false | false | 0 |
__rpc_thread_destroy (void)
{
struct rpc_thread_variables *tvp
= __libc_tsd_get (struct rpc_thread_variables *, RPC_VARS);
if (tvp != NULL) {
__rpc_thread_svc_cleanup ();
__rpc_thread_clnt_cleanup ();
__rpc_thread_key_cleanup ();
free (tvp->clnt_perr_buf_s);
free (tvp->clntraw_private_s);
free (tvp->s... | false | false | false | false | false | 0 |
checkStatus()
{
// buffer independent dialogs are always active.
// This check allows us leave canApply unimplemented for some dialogs.
if (!isBufferDependent()) {
updateView();
return;
}
// deactivate the dialog if we have no buffer
if (!isBufferAvailable()) {
enableView(false);
return;
}
// check wh... | false | false | false | false | false | 0 |
detach(){
#ifdef HAVE_GL_H
if(xid){
FXTRACE((100,"%s::detach %p\n",getClassName(),this));
colormap=0;
freemap=FALSE;
xid=0;
}
#endif
} | false | false | false | false | false | 0 |
twl4030_col_xlate(struct twl4030_keypad *kp, u8 col)
{
/* If all bits in a row are active for all coloumns then
* we have that row line connected to gnd. Mark this
* key on as if it was on matrix position n_cols (ie
* one higher than the size of the matrix).
*/
if (col == 0xFF)
return 1 << kp->n_cols;
else... | false | false | false | false | false | 0 |
address_cycle_cat(void)
{
int b;
int i, new_cat;
b=dialog_save_changed_record(pane, record_changed);
if (b==DIALOG_SAID_2) {
cb_add_new_record(NULL, GINT_TO_POINTER(record_changed));
}
if (address_category == CATEGORY_ALL) {
new_cat = -1;
} else {
new_cat = find_sort_cat_pos(add... | false | false | false | false | false | 0 |
handle_insn_suffix( unsigned char *buf, size_t buf_len,
ia32_insn_t *raw_insn, x86_insn_t * insn ) {
ia32_table_desc_t *table_desc;
ia32_insn_t *sfx_insn;
size_t size;
unsigned int prefixes = 0;
table_desc = &ia32_tables[raw_insn->table];
size = ia32_table_lookup( buf, buf_len, raw_insn->table, &sfx_insn,... | false | false | false | false | false | 0 |
get_dominated_by (enum cdi_direction dir, basic_block bb)
{
unsigned int dir_index = dom_convert_dir_to_idx (dir);
struct et_node *node = bb->dom[dir_index], *son = node->son, *ason;
vec<basic_block> bbs = vNULL;
gcc_checking_assert (dom_computed[dir_index]);
if (!son)
return vNULL;
bbs.safe_push ((b... | false | false | false | false | false | 0 |
i915_get_extra_instdone(struct drm_device *dev, uint32_t *instdone)
{
struct drm_i915_private *dev_priv = dev->dev_private;
memset(instdone, 0, sizeof(*instdone) * I915_NUM_INSTDONE_REG);
if (IS_GEN2(dev) || IS_GEN3(dev))
instdone[0] = I915_READ(GEN2_INSTDONE);
else if (IS_GEN4(dev) || IS_GEN5(dev) || IS_GEN6(de... | false | false | false | false | false | 0 |
archive_entry_devminor(struct archive_entry *entry)
{
if (entry->ae_stat.aest_dev_is_broken_down)
return (entry->ae_stat.aest_devminor);
else
return minor(entry->ae_stat.aest_dev);
} | false | false | false | false | false | 0 |
addColumns(int number, const double * columnLower,
const double * columnUpper,
const double * objIn,
const int * columnStarts, const int * rows,
const double * elements)
{
// Create a list of CoinPackedVectors
if (number) {
... | false | false | false | false | false | 0 |
saveFile(const char *file_name,
E_TransferSyntax opt_xfer,
E_EncodingType opt_enctype,
E_GrpLenEncoding opt_glenc,
E_PaddingEncoding opt_padenc,
... | false | false | false | false | false | 0 |
ajSqlcolumnNumberIsDefined(const AjPSqlrow sqlr, ajuint column)
{
if(!sqlr)
return ajFalse;
if(column >= sqlr->Columns)
return ajFalse;
if(ajVoidGet(sqlr->Values, column) == NULL)
return ajFalse;
return ajTrue;
} | false | false | false | false | false | 0 |
winner(const Player* player)
{
kDebug() << player->name();
QString msg = i18n("%1 won!");
if (!player->isVirtual())
{
msg = i18n("<big><b>%1</b>, you won!</big>");
}
if (m_automaton->useGoals())
{
msg += i18n("<br>Winner's goal was stated like this:<br><i>%1</i><br><br>Do you want to play again?")... | false | false | false | false | false | 0 |
close_newabc()
/* output all remaining abc_text elements */
/* part of new linebreak option (-n) */
{
if (newbreaks) {
complete_all(&voice[this_voice], endmusicline);
if (linestat == midmusic) setline(endmusicline);
setline(fresh);
};
} | false | false | false | false | false | 0 |
sdecodeushort(const byte * p, int format)
{
int a = p[0], b = p[1];
return (num_is_lsb(format) ? (b << 8) + a : (a << 8) + b);
} | false | false | false | false | false | 0 |
distPtTri(const float* p, const float* a, const float* b, const float* c)
{
float v0[3], v1[3], v2[3];
rcVsub(v0, c,a);
rcVsub(v1, b,a);
rcVsub(v2, p,a);
const float dot00 = vdot2(v0, v0);
const float dot01 = vdot2(v0, v1);
const float dot02 = vdot2(v0, v2);
const float dot11 = vdot2(v1... | false | false | false | false | false | 0 |
set_location_icon (GwhBrowser *self,
const gchar *icon_uri)
{
gboolean success = FALSE;
if (icon_uri) {
GdkPixbuf *icon;
icon = gwh_pixbuf_new_from_uri (icon_uri, NULL);
if (icon) {
gtk_entry_set_icon_from_pixbuf (GTK_ENTRY (self->priv->url_entry),
... | false | false | false | false | false | 0 |
output_sif_name(ostream& out, short indent_size, short indent_level, SifOutputControl& soc,
bool quoted)
{
if (soc.outputName) {
if ( model->getSolverKeywordTypeGiven(soc.sectionName, "Name") ) {
LibFront::output_scalar(out, indent_size, indent_level, "Name =", NULL, name, quoted)... | false | false | false | false | false | 0 |
CleanupTransaction(void)
{
TransactionState s = CurrentTransactionState;
/*
* State should still be TRANS_ABORT from AbortTransaction().
*/
if (s->state != TRANS_ABORT)
elog(FATAL, "CleanupTransaction: unexpected state %s",
TransStateAsString(s->state));
/*
* do abort cleanup processing
*/
AtCleanu... | false | false | false | false | false | 0 |
rewrite(struct rfc2045 *p, int rwmode)
{
struct rfc2045src *src;
rfc2045_ac_check(p, rwmode);
src=rfc2045src_init_fd(fileno(stdin));
if (src == NULL || rfc2045_rewrite(p, src, fileno(stdout),
"reformime (" RFC2045PKG " " RFC2045VER ")"))
{
perror("reformime");
exit(1);
}
rfc2045src_deinit(src);
} | true | true | false | false | true | 1 |
get_from_entry_list(entry_t *plist, int l, int r)
{
int val = 0;
while (plist != NULL) {
if (plist->l == l && plist->r == r)
val = plist->val;
plist = plist->pnext;
}
return val;
} | false | false | false | false | false | 0 |
updateLineDash(GfxState *state) {
double *dashPattern;
int dashLength;
double dashStart;
SplashCoord dash[20];
int i;
state->getLineDash(&dashPattern, &dashLength, &dashStart);
if (dashLength > 20) {
dashLength = 20;
}
for (i = 0; i < dashLength; ++i) {
dash[i] = (SplashCoord)dashPattern[i];
... | false | false | false | false | false | 0 |
rawmidi_open_priv(struct snd_rawmidi *rmidi, int subdevice, int mode,
struct snd_rawmidi_file *rfile)
{
struct snd_rawmidi_substream *sinput = NULL, *soutput = NULL;
int err;
rfile->input = rfile->output = NULL;
if (mode & SNDRV_RAWMIDI_LFLG_INPUT) {
err = assign_substream(rmidi, subdevice,
SN... | false | false | false | false | false | 0 |
ap_update_sta_tx_rate(struct sta_info *sta, struct net_device *dev)
{
int ret = sta->tx_rate;
struct hostap_interface *iface;
local_info_t *local;
iface = netdev_priv(dev);
local = iface->local;
sta->tx_count[sta->tx_rate_idx]++;
sta->tx_since_last_failure++;
sta->tx_consecutive_exc = 0;
if (sta->tx_since_la... | false | false | false | false | false | 0 |
disk_get_scsi_pci(int fd,
unsigned char *bus,
unsigned char *device,
unsigned char *function)
{
int rc, usefd=fd;
struct stat buf;
char slot_name[8];
unsigned int b=0,d=0,f=0;
memset(&buf, 0, sizeof(buf));
rc = fstat(fd, &buf);
if (rc == -1) {
perror("stat");
return 1;
}
if (S_ISREG(buf.... | true | true | false | false | false | 1 |
iflinux_add_wireless(struct lldpd *cfg,
struct interfaces_device_list *interfaces)
{
struct interfaces_device *iface;
TAILQ_FOREACH(iface, interfaces, next) {
struct iwreq iwr = {};
strlcpy(iwr.ifr_name, iface->name, IFNAMSIZ);
if (ioctl(cfg->g_sock, SIOCGIWNAME, &iwr) >= 0) {
log_debug("interfaces", "%s... | false | false | false | false | false | 0 |
gp_itdb_pc_path_hash_remove_track(Track *track) {
struct pc_path_hash_find_track_data td;
ExtraTrackData *etr;
iTunesDB *itdb;
ExtraiTunesDBData *eitdb;
GList *tracks;
g_return_if_fail (track);
etr = track->userdata;
g_return_if_fail (etr);
itdb = track->itdb;
g_return_if_fail ... | false | false | false | false | false | 0 |
copy_result(RESULT *to, RESULT *from)
{
LOG(LOG_DEBUG, "IN : copy_result()");
g_assert(from != NULL);
g_assert(to != NULL);
if(from->heading)
to->heading = g_strdup(from->heading);
if(from->word)
to->word = g_strdup(from->word);
to->type = from->type;
if(from->type == RESULT_TYPE_EB){
to->data.eb.book_... | false | false | false | false | false | 0 |
ApacheRequest___parse(ApacheRequest *req)
{
request_rec *r = req->r;
const char *ct = apr_table_get(r->headers_in, "Content-type");
int result;
if (r->args) {
split_to_parms(req, r->args);
req->nargs = ((apr_array_header_t *)req->parms)->nelts;
}
if ((r->method_number == M_POST... | false | false | false | false | false | 0 |
nemo_icon_container_begin_loading (NemoIconContainer *container)
{
gboolean dummy;
if (nemo_icon_container_get_store_layout_timestamps (container)) {
container->details->layout_timestamp = UNDEFINED_TIME;
g_signal_emit (container,
signals[GET_STORED_LAYOUT_TIMESTAMP], 0,
NULL, &container->det... | false | false | false | false | false | 0 |
dispatch_one_script (Request *request)
{
GError *error = NULL;
gchar *argv[4];
ScriptInfo *script = g_ptr_array_index (request->scripts, request->idx);
argv[0] = script->script;
argv[1] = request->iface ? request->iface : "none";
argv[2] = request->action;
argv[3] = NULL;
if (debug)
g_message ("Script: %s %... | false | false | false | false | false | 0 |
zxid_extract_private_key(char* buf, char* name)
{
char* p;
char* e;
int typ;
EVP_PKEY* pk = 0; /* Forces d2i_PrivateKey() to alloc the memory. */
OpenSSL_add_all_algorithms();
if (p = strstr(buf, PEM_RSA_PRIV_KEY_START)) {
typ = EVP_PKEY_RSA;
e = PEM_RSA_PRIV_KEY_END;
p += sizeof(PEM_RSA_PRI... | false | false | false | false | false | 0 |
_k_colorChosen()
{
KColorDialog *dialog = dialogPtr.data();
if (!dialog) {
return;
}
if (dialog->color().isValid()) {
q->setColor(dialog->color());
} else if (m_bdefaultColor) {
q->setColor(m_defaultColor);
}
} | false | false | false | false | false | 0 |
next_string()
{
if (next_alias_arg != alias_args.begin())
{
const sstring& next_arg = *--next_alias_arg;
return (char*) next_arg.c_str(); // cast away const... hacky
}
if (--argc < 0) THROW Syntax_exception (*this, "missing string argument");
return *argv++;
} | false | false | false | false | false | 0 |
photos_remote_display_manager_renderer_lost_cb (PhotosRemoteDisplayManager *self,
PhotosDlnaRenderer *renderer,
gpointer user_data)
{
PhotosRemoteDisplayManagerPrivate *priv = self->priv;
if (... | false | false | false | false | false | 0 |
filedsn_get_dsn (char *filename, char *dsn, size_t dsn_sz)
{
char *p;
/* Cut everything up to the last slash */
p = strrchr (filename, '/');
if (p != NULL)
p++;
else
p = filename;
snprintf (dsn, dsn_sz, "%s", p);
/* Cut .dsn extension */
p = strrchr (dsn, '.');
if (p != NULL && !strcasecmp (... | false | false | false | false | false | 0 |
start_read_id( upd_fdc *f )
{
int i;
if( !f->read_id ) {
f->rev = 2;
f->read_id = 1;
}
if( f->rev ) {
i = f->current_drive->disk.i >= f->current_drive->disk.bpt ?
0 : f->current_drive->disk.i; /* start position */
if( read_id( f ) != 2 )
f->rev = 0;
i = f->current_drive->disk.b... | false | false | false | false | false | 0 |
ifdeltrav(node *p, boolean *localdl)
{
node *q;
if (*localdl)
return;
if (p->tip) {
(*localdl) = ((*localdl) || p->deleted);
return;
}
q = p->next;
do {
(*localdl) = ((*localdl) || q->deleted);
ifdeltrav(q->back, localdl);
q = q->next;
} while (p != q);
} | false | false | false | false | false | 0 |
ioctl_tree_find_equal(ioctl_tree * tree, ioctl_tree * node)
{
ioctl_tree *t;
if (node->id == tree->id && node->type->equal(node, tree))
return tree;
if (tree->child) {
t = ioctl_tree_find_equal(tree->child, node);
if (t != NULL)
return t;
}
if (tree->next) {
t = ioctl_tree_find_equal(tree-... | false | false | false | false | false | 0 |
tuple_from_array_header(const apr_array_header_t *ah)
{
PyObject *t;
int i;
char **s;
if (ah == NULL)
{
/* PYTHON 2.5: PyTuple_New uses Py_ssize_t for input parameters */
t = PyTuple_New(0);
}
else
{
/* PYTHON 2.5: PyTuple_New uses Py_ssize_t for input parameter... | false | false | false | false | false | 0 |
enet_protocol_handle_send_unreliable (ENetHost * host, ENetPeer * peer, const ENetProtocol * command)
{
ENetPacket * packet;
if (command -> header.commandLength <= sizeof (ENetProtocolSendUnreliable) ||
command -> header.channelID >= peer -> channelCount ||
peer -> state != ENET_PEER_STATE_CONN... | false | false | false | false | false | 0 |
EffectLeapForward(SpellEffectIndex eff_idx)
{
if (unitTarget->IsTaxiFlying())
{ return; }
if (m_spellInfo->rangeIndex == SPELL_RANGE_IDX_SELF_ONLY)
{
float dis = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[eff_idx]));
// before caster
float f... | false | false | false | false | false | 0 |
ParseTypeAndBasicBlock(BasicBlock *&BB, LocTy &Loc,
PerFunctionState &PFS) {
Value *V;
Loc = Lex.getLoc();
if (ParseTypeAndValue(V, PFS)) return true;
if (!isa<BasicBlock>(V))
return Error(Loc, "expected a basic block");
BB = cast<BasicBlock>(V);
return false;
} | false | false | false | false | false | 0 |
get_sane_name(struct strbuf *out, struct strbuf *name, struct strbuf *email)
{
struct strbuf *src = name;
if (name->len < 3 || 60 < name->len || strchr(name->buf, '@') ||
strchr(name->buf, '<') || strchr(name->buf, '>'))
src = email;
else if (name == out)
return;
strbuf_reset(out);
strbuf_addbuf(out, src);
} | false | false | false | false | false | 0 |
iscsit_check_received_cmdsn(struct iscsi_session *sess, u32 cmdsn)
{
u32 max_cmdsn;
int ret;
/*
* This is the proper method of checking received CmdSN against
* ExpCmdSN and MaxCmdSN values, as well as accounting for out
* or order CmdSNs due to multiple connection sessions and/or
* CRC failures.
*/
max_... | false | false | false | false | false | 0 |
uart_throttle(struct tty_struct *tty)
{
struct uart_state *state = tty->driver_data;
struct uart_port *port = state->uart_port;
upstat_t mask = 0;
if (I_IXOFF(tty))
mask |= UPSTAT_AUTOXOFF;
if (tty->termios.c_cflag & CRTSCTS)
mask |= UPSTAT_AUTORTS;
if (port->status & mask) {
port->ops->throttle(port);
... | false | false | false | false | false | 0 |
GXDrawRequestSelection(GWindow w,enum selnames sn, char *typename, int32 *len) {
GXDisplay *gd = (GXDisplay *) (w->display);
GXWindow gw = (GXWindow) w;
Display *display = gd->display;
unsigned long nitems, bytes_after;
Atom actual_type;
int actual_format;
char *prop;
char *temp;
int... | false | false | false | false | false | 0 |
start_playback( libspectrum_rzx *rzx )
{
int error;
libspectrum_snap *snap;
error = libspectrum_rzx_start_playback( rzx, 0, &snap );
if( error ) return error;
if( snap ) {
error = snapshot_copy_from( snap );
if( error ) return error;
}
/* End of frame will now be generated by the RZX code */
... | false | false | false | false | false | 0 |
f_to_kHz_MHz(double f, const char **unit)
{
if (f > 1e6) {
f /= 1e6;
*unit = "MHz";
} else if (f > 1e3) {
f /= 1000;
*unit = "kHz";
} else
*unit = "Hz";
return f;
} | false | false | false | false | false | 0 |
qlcnic_free_adapter_resources(struct qlcnic_adapter *adapter)
{
struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump;
kfree(adapter->recv_ctx);
adapter->recv_ctx = NULL;
if (fw_dump->tmpl_hdr) {
vfree(fw_dump->tmpl_hdr);
fw_dump->tmpl_hdr = NULL;
}
if (fw_dump->dma_buffer) {
dma_free_coherent(&adapter... | false | false | false | false | false | 0 |
process_agg_start(struct ieee80211_hw *hw,
struct ieee80211_hdr *hdr, u16 tid)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct ieee80211_rx_status rx_status = { 0 };
struct sk_buff *skb_delba = NULL;
skb_delba = rtl_make_del_ba(hw, hdr->addr2, hdr->addr3, tid);
if (skb_delba) {
rx_status.freq = hw->c... | false | false | false | false | false | 0 |
parent()
{
GtkTreeIter *iter = gtk_tree_iter_copy(dataiter);
char *key;
//GtkTreePath* path;
if (!gtk_tree_model_iter_parent(GTK_TREE_MODEL(tree->store), iter, dataiter))
key = NULL;
else
key = tree->iterToKey(iter);
gtk_tree_iter_free(iter);
return key;
/*path = gtk_tree_model_get_path(GTK_TREE_MODEL... | false | false | false | false | false | 0 |
child_main(void)
{
setbuf(stdout, NULL);
setbuf(stderr, NULL);
printf("Child starts\n");
cache_param = heritage.param;
AZ(pthread_key_create(&sp_key, NULL));
AZ(pthread_key_create(&name_key, NULL));
THR_SetName("cache-main");
VSM_Init(); /* First, LCK needs it. */
LCK_Init(); /* Second, locking */
WAIT... | false | false | false | false | false | 0 |
callback(glp_tree *tree, void *info){
/**********************************************************************/
struct csa *csa = info;
switch(glp_ios_reason(tree)) {
case GLP_IHEUR:
glp_ios_heur_sol(tree, csa->startsol);
break;
default: break;
}
} | false | false | false | false | false | 0 |
haswell_set_power_state(struct hda_codec *codec, hda_nid_t fg,
unsigned int power_state)
{
if (power_state == AC_PWRST_D0) {
intel_haswell_enable_all_pins(codec, false);
intel_haswell_fixup_enable_dp12(codec);
}
snd_hda_codec_read(codec, fg, 0, AC_VERB_SET_POWER_STATE, power_state);
snd_hda_codec_set_power... | false | false | false | false | false | 0 |
find_bb_boundaries (bb)
basic_block bb;
{
rtx insn = bb->head;
rtx end = bb->end;
rtx flow_transfer_insn = NULL_RTX;
edge fallthru = NULL;
if (insn == bb->end)
return;
if (GET_CODE (insn) == CODE_LABEL)
insn = NEXT_INSN (insn);
/* Scan insn chain and try to find new basic block boundaries.... | false | false | false | false | false | 0 |
mvdir1(path)
CONST char *path;
{
struct stat st;
int n;
if ((n = checkrmv(path, R_OK | W_OK | X_OK)) < 0) {
errno = EACCES;
return((n == CHK_CANCEL) ? APL_CANCEL : APL_ERROR);
}
if ((n = cpdir(path)) < 0) return(n);
if (Xlstat(path, &st) < 0) return(APL_ERROR);
if (!(st.st_mode & S_IWUSR)) {
st.st_nlink =... | false | false | false | false | false | 0 |
MakeOrFindTwoCharacterString(
uint32_t c1,
uint32_t c2) {
String* symbol;
// Numeric strings have a different hash algorithm not known by
// LookupTwoCharsSymbolIfExists, so we skip this step for such strings.
if ((!Between(c1, '0', '9') || !Between(c2, '0', '9')) &&
Heap::symbol_table()->LookupTw... | false | false | false | false | true | 1 |
z_sread_aread( int argc, zword_t * argv )
{
int i, in_size, out_size, terminator;
char *cbuf, *buffer;
/* Supply default parameters */
if ( argc < 4 )
argv[3] = 0;
if ( argc < 3 )
argv[2] = 0;
if ( argc < 2 )
argv[1] = 0;
/* Refresh status line */
if ( h_type < V4 )
z... | true | true | false | false | false | 1 |
SQLGetEnvAttr (
SQLHENV EnvironmentHandle,
SQLINTEGER Attribute,
SQLPOINTER ValuePtr,
SQLINTEGER BufferLength,
SQLINTEGER * StringLengthPtr)
{
if (Attribute == SQL_ATTR_CONNECTION_POOLING)
{
SQLRETURN retcode = SQL_SUCCESS;
/* ENTER_HENV without EnvironmentHandle check */
ODBC_LOCK ();
... | false | false | false | false | false | 0 |
_writeFieldsPragma_GCIO (
GCSubType* theSubType,
FILE* gc,
char delim
)
{
int nF, iF;
GCField* the... | false | false | false | false | false | 0 |
scsi_free_host_dev(struct scsi_device *sdev)
{
BUG_ON(sdev->id != sdev->host->this_id);
__scsi_remove_device(sdev);
} | false | false | false | false | false | 0 |
FPutFImage(
Display *dpy, Drawable d, GC gc, FImage *fim, int src_x, int src_y,
int dest_x, int dest_y, unsigned int width, unsigned int height)
{
if (fim->shminfo)
{
if (FShmPutImage(
dpy, d, gc, fim->im, src_x, src_y, dest_x, dest_y, width,
height, False))
{
}
}
else
{
XPutImage(
dpy, d, gc, ... | false | false | false | false | false | 0 |
dxf_entity_skip
(
char *dxf_entity_name
/*!< Type of the entity skipped from output. */
)
{
#if DEBUG
DXF_DEBUG_BEGIN
#endif
char answer;
if (dxf_entity_name == NULL) return (EXIT_FAILURE);
if (INTER_ACTIVE_PROMPT)
{
fprintf (stderr, " s... | false | false | false | false | false | 0 |
netup_unidvb_dma_init(struct netup_unidvb_dev *ndev, int num)
{
struct netup_dma *dma;
struct device *dev = &ndev->pci_dev->dev;
if (num < 0 || num > 1) {
dev_err(dev, "%s(): unable to register DMA%d\n",
__func__, num);
return -ENODEV;
}
dma = &ndev->dma[num];
dev_info(dev, "%s(): starting DMA%d\n", __fun... | false | false | false | false | false | 0 |
soap_next_block(struct soap *soap, struct soap_blist *b)
{ char *p;
if (!b)
b = soap->blist;
p = b->ptr;
if (p)
{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
b->ptr = *(char**)p;
SOAP_FREE(soap, p);
if (b->ptr)
return b->ptr + sizeof(char*) + sizeof(size_t);
}
return NULL;
} | false | false | false | false | false | 0 |
fm_job_set_cancellable(FmJob* job, GCancellable* cancellable)
{
if(G_UNLIKELY(job->cancellable))
{
g_signal_handlers_disconnect_by_func(job->cancellable, on_cancellable_cancelled, job);
g_object_unref(job->cancellable);
}
if(G_LIKELY(cancellable))
{
job->cancellable = (GCance... | false | false | false | false | false | 0 |
tab_positions() {
int nc = children();
if (nc != tab_count) {
clear_tab_positions();
if (nc) {
tab_pos = (int*)malloc((nc+1)*sizeof(int));
tab_width = (int*)malloc((nc+1)*sizeof(int));
}
tab_count = nc;
}
if (nc == 0) return 0;
int selected = 0;
Fl_Widget*const* a = array();
... | false | false | false | false | false | 0 |
vp_create_chunk(filesize_t from, filesize_t to,
enum dl_chunk_status status, gboolean old)
{
gnet_fi_chunks_t *chunk;
WALLOC(chunk);
chunk->from = from;
chunk->to = to;
chunk->status = status;
chunk->old = old;
#ifdef VP_DEBUG
printf("VP adding: ");
vp_print_chunk(stdout, chunk, TRUE);
#endif /* VP_DEBUG */
... | false | false | false | false | false | 0 |
function_ooh323_write(struct ast_channel *chan, const char *cmd, char *data, const char *value)
{
struct ooh323_pvt *p = ast_channel_tech_pvt(chan);
int res = -1;
ast_channel_lock(chan);
if (!p) {
ast_channel_unlock(chan);
return -1;
}
if (strcmp(ast_channel_tech(chan)->type, "OOH323")) {
ast_log(LOG_ERRO... | false | false | false | false | false | 0 |
ath_led_brightness(struct led_classdev *led_cdev,
enum led_brightness brightness)
{
struct ath_softc *sc = container_of(led_cdev, struct ath_softc, led_cdev);
u32 val = (brightness == LED_OFF);
if (sc->sc_ah->config.led_active_high)
val = !val;
ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val);
} | false | false | false | false | false | 0 |
xml_defaultSettings(JSContext *cx, uintN argc, jsval *vp)
{
JSObject *settings;
settings = JS_NewObject(cx, NULL, NULL, NULL);
if (!settings)
return JS_FALSE;
*vp = OBJECT_TO_JSVAL(settings);
return SetDefaultXMLSettings(cx, settings);
} | false | false | false | false | false | 0 |
sql_type(String &res) const
{
THD *thd= table->in_use;
CHARSET_INFO *cs=res.charset();
ulong length;
length= cs->cset->snprintf(cs,(char*) res.ptr(),
res.alloced_length(), "%s(%d)",
((type() == MYSQL_TYPE_VAR_STRING &&
!th... | false | false | false | false | false | 0 |
lan_privilege_limit_checkout (const char *section_name,
struct config_keyvalue *kv,
void *arg)
{
bmc_config_state_data_t *state_data;
struct user_access ua;
unsigned int username_not_set_yet = 0;
config_err_t ret;
assert (section_name);
assert (kv... | false | false | false | false | false | 0 |
zLoadDNAFromFasta(zDNA* dna, char* filename, char* snp_filename){
zInitSequenceSpecialized(filename,dna,zInitDNASequence,zReadDNASequence,
zCreateDNASeqBlock,BLOCK_SIZE,BLOCK_COUNT,0,-1);
dna->seq->default_char = 'N';
if(snp_filename != NULL){
zLoadSeqVariants(dna->seq,snp_filename);
}
} | false | false | false | false | false | 0 |
InitHandles () {
if (!Highlightable())
GraphicView::InitHandles();
} | false | false | false | false | false | 0 |
pw_list_entries(Vfs_handle *h)
{
int n;
Dsvec *dsv;
dsv = dsvec_init(NULL, sizeof(char *));
h->list_sort = list_qsort;
if ((n = vfs_list(h, NULL, list_compar, list_add, (void ***) dsv)) == -1)
return(NULL);
return(dsv);
} | false | false | false | false | false | 0 |
document_save(Document *doc, AeFile *f) {
int i;
aeff_write_header(f, "Aewan Document v1");
aeff_write_int(f, "layer-count", doc->layer_count);
aeff_write_string(f, "meta-info", doc->metainfo ? doc->metainfo : "");
for (i = 0; i < doc->layer_count; i++)
layer_save(doc->layers[i], f);
aeff_wri... | true | true | false | false | true | 1 |
rep_hist_load_state(or_state_t *state, char **err)
{
int all_ok = 1;
/* Assert they already have been malloced */
tor_assert(read_array && write_array);
tor_assert(dir_read_array && dir_write_array);
#define LOAD(arrname,st) \
if (rep_hist_load_bwhist_state_sec... | false | false | false | false | false | 0 |
glossaryPath(GlossaryFor rubrik) const
{
QString gp = glossaryPath();
if (gp.isEmpty())
return QString();
switch (rubrik) {
case ObservationGlossary : return Utils::isDirExists(gp + QDir::separator() + GLOSSARY_OBS);
case PrescriptionGlossary : return Utils::isDirExists(gp + QDir::s... | false | false | false | false | false | 0 |
gst_avi_mux_write_tag (const GstTagList * list, const gchar * tag,
gpointer data)
{
const struct
{
guint32 fcc;
const gchar *tag;
} rifftags[] = {
{
GST_RIFF_INFO_IARL, GST_TAG_LOCATION}, {
GST_RIFF_INFO_IART, GST_TAG_ARTIST}, {
GST_RIFF_INFO_ICMT, GST_TAG_COMMENT}, {
GST_RIFF_INFO... | false | false | false | false | false | 0 |
hasAssignSelf(const Token *first, const Token *last, const Token *rhs)
{
for (const Token *tok = first; tok && tok != last; tok = tok->next())
{
if (Token::Match(tok, "if ("))
{
const Token *tok1 = tok->tokAt(2);
const Token *tok2 = tok->tokAt(1)->link();
if ... | false | false | false | false | false | 0 |
enqueue_samples(factor_vm *parent, cell samples, cell pc, bool foreign_thread_p) volatile
{
if (atomic::load(&parent->sampling_profiler_p))
{
atomic::fetch_add(&sample_counts.sample_count, samples);
if (foreign_thread_p)
atomic::fetch_add(&sample_counts.foreign_thread_sample_count, samples);
else {
if (at... | false | false | false | false | false | 0 |
fit_link_module_and_block(Module_table *master, Block *head)
{
Block *current = NULL;
for (current = head; current; current = current->next) {
current->module = master;
if (current->inner) {
fit_link_module_and_block(master, current->inner);
}
}
} | false | false | false | false | false | 0 |
tunnel_add(const char *dev,
const char *link,
uint32_t saddr,
uint8_t ttl,
int pmtudisc)
{
struct ip_tunnel_parm p;
struct ifreq ifr;
int fd;
memset(&p, 0, sizeof(p));
p.iph.version = 4;
p.iph.ihl = 5;
p.iph.protocol = IPPROTO_IPV6;
p.iph.saddr = saddr;
p.iph.frag_off = pmtudisc ? htons(IP_DF) : 0;
... | false | true | false | false | false | 1 |
increase_hash_size(struct obj_hash_entry* hash, int size)
{
int rc;
if ( !hash ) {
my_xlog(OOPS_LOG_SEVERE, "increase_hash_size(): hash == NULL in increase_hash_size\n");
return;
}
if ( size < 0 ) {
my_xlog(OOPS_LOG_SEVERE, "increase_hash_size(): size<=0 in increase_hash_size\n");
do_exit(1);
return;
... | 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.