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
set_all_column_privs(dbTable * table, void (*set_column_priv) ()) { int col, ncols; dbColumn *column; ncols = db_get_table_number_of_columns(table); for (col = 0; col < ncols; col++) { column = db_get_table_column(table, col); set_column_priv(column); } }
false
false
false
false
false
0
netlink_addr_purge_nbma(void *ctx, struct nhrp_peer *peer) { struct netlink_del_addr_msg *msg = (struct netlink_del_addr_msg *) ctx; if (nhrp_address_cmp(&peer->my_nbma_address, &msg->address) == 0) nhrp_peer_purge(peer, "address-removed"); return 0; }
false
false
false
false
false
0
__of_attach_node(struct device_node *np) { const __be32 *phandle; int sz; np->name = __of_get_property(np, "name", NULL) ? : "<NULL>"; np->type = __of_get_property(np, "device_type", NULL) ? : "<NULL>"; phandle = __of_get_property(np, "phandle", &sz); if (!phandle) phandle = __of_get_property(np, "linux,phand...
false
false
false
false
false
0
flist_remove_obj(flist *list, void *object) { flist *tl = list; while (tl && tl->object != object) { tl = tl->next; } if (tl == NULL) { return NULL; } if (tl->prev) { tl->prev->next = tl->next; } if (tl->next) { tl->next->prev = tl->prev; } if (list == tl) { list = list->next; } free(tl); ...
false
false
false
false
true
1
receive_unauthorized (gpointer p) { SelfAndContact *s = p; ExampleContactDetails *d; /* if shutting down, do nothing */ if (s->self->priv->conn == NULL) return FALSE; /* A remote contact has rejected our request to see their presence. * * In a real connection manager this would be the result of in...
false
false
false
false
false
0
SelectionGet(GtkWidget *widget, GtkSelectionData *selection_data, guint info, guint) { ScintillaGTK *sciThis = ScintillaFromWidget(widget); try { //Platform::DebugPrintf("Selection get\n"); if (SelectionOfGSD(selection_data) == GDK_SELECTION_PRIMARY) { if (sciThis->primary.Empty...
false
false
false
false
false
0
Collide() { // Update awake contacts. b2Contact* c = m_contactList; while (c) { b2Fixture* fixtureA = c->GetFixtureA(); b2Fixture* fixtureB = c->GetFixtureB(); int32 indexA = c->GetChildIndexA(); int32 indexB = c->GetChildIndexB(); b2Body* bodyA = fixtureA->GetBody(); b2Body* bodyB = fixtureB->GetBody()...
false
false
false
false
false
0
EmitRowsYUVA(const VP8LDecoder* const dec, const uint8_t* in, int in_stride, int mb_w, int num_rows) { int y_pos = dec->last_out_row_; while (num_rows-- > 0) { ConvertToYUVA((const uint32_t*)in, mb_w, y_pos, dec->output_); in += in_stride; ++y_pos; } r...
false
false
false
false
false
0
remove_file(struct dentry *parent, char *name) { struct dentry *tmp; int ret; tmp = lookup_one_len(name, parent, strlen(name)); if (IS_ERR(tmp)) { ret = PTR_ERR(tmp); goto bail; } spin_lock(&tmp->d_lock); if (simple_positive(tmp)) { __d_drop(tmp); spin_unlock(&tmp->d_lock); simple_unlink(d_inode(par...
false
false
false
false
false
0
Finish(HControlInstruction* end) { ASSERT(!IsFinished()); AddInstruction(end); end_ = end; for (HSuccessorIterator it(end); !it.Done(); it.Advance()) { it.Current()->RegisterPredecessor(this); } }
false
false
false
false
false
0
runOnMachineFunction(MachineFunction &MF) { LiveIntervals &LIS = getAnalysis<LiveIntervals>(); MachineBlockFrequencyInfo &MBFI = getAnalysis<MachineBlockFrequencyInfo>(); VirtRegMap &VRM = getAnalysis<VirtRegMap>(); calculateSpillWeightsAndHints(LIS, MF, &VRM, getAnalysis<MachineLoopInfo>(), ...
false
false
false
false
false
0
rbd_dev_image_probe(struct rbd_device *rbd_dev, int depth) { int ret; /* * Get the id from the image id object. Unless there's an * error, rbd_dev->spec->image_id will be filled in with * a dynamically-allocated string, and rbd_dev->image_format * will be set to either 1 or 2. */ ret = rbd_dev_image_id(r...
false
false
false
false
false
0
new_TypeMap(CTX ctx, kflag_t flag, kclass_t scid, kclass_t tcid, knh_Ftypemap func) { kTypeMap* tmr = new_(TypeMap); tmr->h.magicflag |= (kuintptr_t)flag; tmr->scid = scid; tmr->tcid = tcid; tmr->ftypemap_1 = (func == NULL) ? Ftypemap_null : func; if(IS_Tunbox(scid)) { TypeMap_setNDATA(tmr, 1); } return tmr; ...
false
false
false
false
false
0
gvl_file_get_value(geovol_file * vf, int x, int y, int z, void *value) { /* check status */ if (vf->status != STATUS_BUSY) { return (-1); } switch (vf->mode) { /* read value direct from g3d file */ case (MODE_DIRECT): if (0 > get_direct_value(vf, x, y, z, value)) return (-1); break; ...
false
false
false
false
false
0
drbd_next_overlap(struct drbd_interval *i, sector_t sector, unsigned int size) { sector_t end = sector + (size >> 9); struct rb_node *node; for (;;) { node = rb_next(&i->rb); if (!node) return NULL; i = rb_entry(node, struct drbd_interval, rb); if (i->sector >= end) return NULL; if (sector < i->sect...
false
false
false
false
false
0
_gcry_sexp_create (gcry_sexp_t *retsexp, void *buffer, size_t length, int autodetect, void (*freefnc)(void*) ) { gcry_err_code_t errcode; gcry_sexp_t se; if (!retsexp) return GPG_ERR_INV_ARG; *retsexp = NULL; if (autodetect < 0 || autodetect > 1 || !buffer) return GPG_ERR_INV_ARG; ...
false
false
false
false
false
0
decode_i2_frame(FourXContext *f, const uint8_t *buf, int length){ int x, y, x2, y2; const int width= f->avctx->width; const int height= f->avctx->height; uint16_t *dst= (uint16_t*)f->current_picture.data[0]; const int stride= f->current_picture.linesize[0]>>1; const uint8_t *buf_end = buf + leng...
false
false
false
false
false
0
close_accounts_of_type(struct CloseBookWindow* cbw, Account* acct, GNCAccountType acct_type) { struct CloseAccountsCB cacb; Account* root_acct; g_return_if_fail(cbw); g_return_if_fail(acct); cacb.cbw = cbw; cacb.base_acct = ...
false
false
false
false
false
0
JS_CompileUCScriptForPrincipals(JSContext *cx, JSObject *obj, JSPrincipals *principals, const jschar *chars, size_t length, const char *filename, uintN lineno) { uint32 tcflags; JSScript *script; CHECK_REQUEST(c...
false
false
false
false
false
0
eb_reverse_word_latin(char *word) { char *p1, *p2; int word_length; char c; LOG(("in: eb_reverse_word_latin(word=%s)", eb_quoted_string(word))); word_length = strlen(word); if (word_length == 0) return; for (p1 = word, p2 = word + word_length - 1; p1 < p2; p1++, p2--) { c = *p1; *p1 = *...
false
false
false
false
false
0
lcrt_fcopy(const char *fsrc, const char *fdst) { unsigned char buffer[4096]; FILE *fps, *fpd; int rv = 0, len; if (fsrc == NULL || fdst == NULL) { rv = -EINVAL; goto out; } if ((fps = fopen(fsrc, "r")) == NULL) { rv = -errno; goto out; } if ((fpd = fope...
false
false
true
false
true
1
find_file(HBF_STRUCT *hbf, const char *filename) { BM_FILE **fp; reg BM_FILE *file; FILE *f; char *bmfname; #ifdef IN_MEMORY #ifdef unix bool from_pipe; #endif #endif for (fp = &(hbf->bm_file); *fp != NULL; fp = &((*fp)->bmf_next)) { bmfname = strrchr((*fp)->bmf_name, '/'); bmfname = (bmfname) ? bmfname + 1 :...
false
false
false
false
false
0
opaque( unsigned char *dest, unsigned char *src ) { for( int p = pixels; p--; ) switch( *((int *) src) & 0xff000000 ) { case 0: src += 4; dest += 4; break; case 0xff000000: *((int *) dest) = *((int *) src); src += 4; dest += 4; break; default: { double diff; doubl...
false
false
false
false
false
0
snd_dg00x_stream_get_clock(struct snd_dg00x *dg00x, enum snd_dg00x_clock *clock) { __be32 reg; int err; err = snd_fw_transaction(dg00x->unit, TCODE_READ_QUADLET_REQUEST, DG00X_ADDR_BASE + DG00X_OFFSET_CLOCK_SOURCE, &reg, sizeof(reg), 0); if (err < 0) return err; *clock = be32_to_cpu(reg) & ...
false
false
false
false
false
0
photos_remote_display_manager_stop (PhotosRemoteDisplayManager *self) { PhotosRemoteDisplayManagerPrivate *priv = self->priv; g_return_if_fail (priv->renderer != NULL); photos_dlna_renderer_unshare_all (priv->renderer, NULL, photos_remote_display_manager_unshare_all_cb, self)...
false
false
false
false
false
0
main(int argc, char **argv) { int i,j; double ratio; #ifdef WIN32 WORD wVersionRequested = MAKEWORD(2,2); WSADATA wsaData; int err; err = WSAStartup(wVersionRequested, &wsaData); #endif for (i = 1; i < argc; ++i) { for (j = 0; options[j].name; ++j) { if (!strcmp(argv[i],options[j].name)) { if (handl...
false
false
false
false
false
0
click(int x, int y, int b) { if (y < y0-sc && x > table_width/2-TD_PW/2 && x < table_width/2+TD_PW/2) { if (b > 1) { if (penguin == PENGUIN_NORMAL) autoplay(); } else start_again(); } if (penguin == PENGUIN_DEAD || penguin == PENGUIN_COOL || y < y0-sc) return; set_penguin(PE...
false
false
false
false
false
0
StopwatchDisplay(FILE *fp, char *s, Stopwatch_t *w) { char buf[128]; /* (safely holds up to 10^14 years) */ if (s == NULL) fputs("CPU Time: ", fp); else fputs(s, fp); format_time_string(buf, w->user+w->sys, 1); #ifdef SRE_STRICT_ANSI fprintf(fp, "%.2fu %s ", w->user, buf); #else fprintf(fp, "%....
false
false
false
false
false
0
mt7601u_ampdu_stat_read(struct seq_file *file, void *data) { struct mt7601u_dev *dev = file->private; int i, j; #define stat_printf(grp, off, name) \ seq_printf(file, #name ":\t%llu\n", dev->stats.grp[off]) stat_printf(rx_stat, 0, rx_crc_err); stat_printf(rx_stat, 1, rx_phy_err); stat_printf(rx_stat, 2, rx_...
false
false
false
false
false
0
bignum_bitwise_not(bignum* x_) { int carry = 1; bignum_length_type size = BIGNUM_LENGTH(x_); int is_negative = BIGNUM_NEGATIVE_P(x_); data_root<bignum> x(x_, this); data_root<bignum> y(allot_bignum(size, is_negative ? 0 : 1), this); bignum_digit_type* scan_x = BIGNUM_START_PTR(x); bignum_digit_type* end...
false
false
false
false
false
0
gpdb_print_summary (GamePositionDb *db) { g_assert(db); gchar *result; GTree *t; int entry_count; GString *msg; msg = g_string_new(""); t = db->tree; entry_count = g_tree_nnodes(t); g_string_append_printf(msg, "The Game Position Database has %d entr%s.\n", entry_co...
false
false
false
false
false
0
measureCharWidths() { _setWidth(0); UT_return_if_fail(m_pRenderInfo); m_pRenderInfo->m_iVisDir = getVisDirection(); m_pRenderInfo->m_iOffset = getBlockOffset(); m_pRenderInfo->m_iLength = getLength(); m_pRenderInfo->m_pFont = _getFont(); getGraphics()->setFont(_getFont()); getGraphics()->measureRenderedCha...
false
false
false
false
false
0
_in_range(int rank, char* spec, int *offset) { char* range; char* p; char* upper; int high_num, low_num, passed = 0; xassert(offset); if (spec[0] == '*' && spec[1] == '\0') { *offset = rank; return 1; } for (range = strtok (spec, ","); range != NULL; range = strtok (NULL, ",")) { p = range; whil...
false
false
false
false
true
1
WriteCommonCodeRules() { // Include the dependencies for the target. std::string dependFileNameFull = this->TargetBuildDirectoryFull; dependFileNameFull += "/depend.make"; *this->BuildFileStream << "# Include any dependencies generated for this target.\n" << this->LocalGenerator->IncludeDirective << " "...
false
false
false
false
false
0
RGBIfix(Coolscan_t * scanner, unsigned char* rgbimat, unsigned char* orgbimat, int size, int *lutr, int *lutg, int *lutb, int *luti) { unsigned char *pr,*pg,*pb,*pi; unsigned char *opr,*opg,*opb,*opi; int r,g,b,i; int ii; int x; for(x=0;x<size;x++) { ...
false
false
false
false
false
0
command_SOCKSTATE(command_t * self, worker_t * worker, char *data, apr_pool_t *ptmp) { char *copy; COMMAND_NEED_ARG("Need a variable name"); if (!worker->socket) { worker_var_set(worker, copy, "UNDEF"); } if (worker_sockstate(worker) == APR_SUCCESS) { worker_var_set(w...
false
false
false
false
false
0
gf_w64_multiply_region_from_single(gf_t *gf, void *src, void *dest, gf_val_64_t val, int bytes, int xor) { int i; gf_val_64_t *s64; gf_val_64_t *d64; s64 = (gf_val_64_t *) src; d64 = (gf_val_64_t *) dest; if (val == 0) { gf_multby_zero(dest, bytes, xor); return; } if (val == 1) { gf_multby_one(src, dest...
false
false
false
false
false
0
add_controlapi_param(struct list_head * parent_list_ptr, jackctl_parameter_t * param) { struct jack_parameter * param_ptr; uint32_t i; param_ptr = malloc(sizeof(struct jack_parameter)); if (param_ptr == NULL) { jack_error("Ran out of memory trying to allocate struct jack_parameter"); ...
false
false
false
false
false
0
auth_C_InitPIN (CK_SESSION_HANDLE handle, CK_UTF8CHAR_PTR pin, CK_ULONG pin_len) { GkmWrapPrompt *prompt; CK_RV rv = CKR_OK; prompt = gkm_wrap_prompt_for_init_pin (gkm_wrap_layer_get_functions_no_prompts(), handle, pin, pin_len); for (;;) { if (prompt && !gkm_wrap_prompt_...
false
false
false
false
false
0
ifoFree_VTS_TMAPT(ifo_handle_t *ifofile) { unsigned int i; if(!ifofile) return; if(ifofile->vts_tmapt) { for(i = 0; i < ifofile->vts_tmapt->nr_of_tmaps; i++) if(ifofile->vts_tmapt->tmap[i].map_ent) free(ifofile->vts_tmapt->tmap[i].map_ent); free(ifofile->vts_tmapt->tmap); free(ifof...
false
false
false
false
false
0
ccp_finalize (void) { bool something_changed; unsigned i; do_dbg_cnt (); /* Derive alignment and misalignment information from partially constant pointers in the lattice. */ for (i = 1; i < num_ssa_names; ++i) { tree name = ssa_name (i); prop_value_t *val; unsigned int tem, align...
false
false
false
false
false
0
urlparse(s, scheme, hostp, typep, flags) CONST char *s; scheme_t *scheme; char **hostp; int *typep, flags; { CONST char *cp, *path; int i, n; /* * scheme://user:passwd@host:port/path;params?query#fragment * scheme:/path;params?query#fragment */ if (!scheme) scheme = schemelist; if (hostp) *hostp = NULL; i...
false
false
false
false
false
0
unset_breakpoint(CLASS *class, ushort line) { int i; DEBUG_BREAK *brk; for (i = 0; i < GB.Count(Breakpoint); i++) { brk = &Breakpoint[i]; if (brk->class == class && brk->line == line) { if (brk->addr) *(brk->addr) = PCODE_BREAKPOINT(0); GB.Remove(&Breakpoint, i, 1); #ifdef D...
false
false
false
false
false
0
getUserProperty(const QWidget *widget) const { if (!s_propertyMap->contains(widget->metaObject()->className())) { const QMetaObject *metaObject = widget->metaObject(); const QMetaProperty user = metaObject->userProperty(); if ( user.isValid() ) { s_propertyMap->insert( widget->metaObject()->classN...
false
false
false
false
false
0
format() const { std::ostringstream s; s<<"ITConnect("<<"server="<<server<<"; "<<"nick="<<nick<<"; "<<"serverPort="<<serverPort<<"; "<<")"; return s.str(); }
false
false
false
false
false
0
generic_suspend(struct usb_device *udev, pm_message_t msg) { int rc; /* Normal USB devices suspend through their upstream port. * Root hubs don't have upstream ports to suspend, * so we have to shut down their downstream HC-to-USB * interfaces manually by doing a bus (or "global") suspend. */ if (!udev->par...
false
false
false
false
false
0
handle_dock(struct dock_station *ds, int dock) { acpi_status status; struct acpi_object_list arg_list; union acpi_object arg; unsigned long long value; acpi_handle_info(ds->handle, "%s\n", dock ? "docking" : "undocking"); /* _DCK method has one argument */ arg_list.count = 1; arg_list.pointer = &arg; arg.typ...
false
false
false
false
false
0
gnc_build_url( URLType type, const gchar* location, const gchar* label ) { URLType lc_type = NULL; char * type_name; DEBUG(" "); lc_type = g_ascii_strdown (type, -1); type_name = g_hash_table_lookup (gnc_html_type_to_proto_hash, lc_type); g_free (lc_type); if (!type_name) type_nam...
false
false
false
false
false
0
show_indirect_byte(struct device *d, struct device_attribute *attr, char *buf) { u8 reg = 0; struct ipw_priv *priv = dev_get_drvdata(d); if (priv->status & STATUS_INDIRECT_BYTE) reg = ipw_read_reg8(priv, priv->indirect_byte); else reg = 0; return sprintf(buf, "0x%02x\n", reg); }
false
false
false
false
false
0
H5T_array_create(H5T_t *base, unsigned ndims, const hsize_t dim[/* ndims */]) { H5T_t *ret_value; /* new array data type */ unsigned u; /* local index variable */ FUNC_ENTER_NOAPI(H5T_array_create, NULL) HDassert(base); HDassert(ndims <= H5S_MAX_RANK); HDassert(dim); /* Bu...
false
false
false
false
false
0
print_option_error(const char opt, option_err err) { switch (err) { case OPT_ARG_REQUIRED: fprintf(stderr, "Option -%c requires an argument.\n", opt); break; case OPT_ADDRESS_REQUIRED: fprintf(stderr, "Option -%c requires address as argument\n", opt); break; case OPT_INT_REQUIRED: fprintf(stderr, ...
false
false
false
false
false
0
prot_free(Repl_Protocol **rpp) { Repl_Protocol *rp = NULL; if (rpp == NULL || *rpp == NULL) return; rp = *rpp; PR_Lock(rp->lock); if (NULL != rp->prp_incremental) { rp->prp_incremental->delete(&rp->prp_incremental); } if (NULL != rp->prp_total) { rp->prp_total->del...
false
false
false
false
false
0
map_sql_typecoll_to_xmlschema_types(List *tupdesc_list) { List *uniquetypes = NIL; int i; StringInfoData result; ListCell *cell0; /* extract all column types used in the set of TupleDescs */ foreach(cell0, tupdesc_list) { TupleDesc tupdesc = (TupleDesc) lfirst(cell0); for (i = 0; i < tupdesc->natts;...
false
false
false
false
false
0
brasero_data_project_is_video_project (BraseroDataProject *self) { BraseroDataProjectPrivate *priv; gboolean has_video, has_audio; BraseroFileNode *iter; priv = BRASERO_DATA_PROJECT_PRIVATE (self); /* here we check that the selection can be burnt as a video DVD. * It must have : * - a VIDEO_TS and AUDIO_TS a...
false
false
false
false
false
0
write_file(File* filePtr) { for( int i=0 ; i<MAX_RAW ; i++ ) { if( !raw_info_array[i].raw_supply_firm_array.write_file(filePtr) ) return 0; if( !raw_info_array[i].product_supply_firm_array.write_file(filePtr) ) return 0; } return 1; }
false
false
false
false
false
0
path_get_path_core(const wcstring &cmd, wcstring *out_path, const env_var_t &bin_path_var) { int err = ENOENT; debug(3, L"path_get_path( '%ls' )", cmd.c_str()); /* If the command has a slash, it must be a full path */ if (cmd.find(L'/') != wcstring::npos) { if (waccess(cmd, X_OK)==0) ...
false
false
false
false
false
0
make_iz_spectrum(gint res, gdouble xy_step, const gint16 *d16, gdouble q) { GwyDataLine *dline; GwySIUnit *siunitx, *siunity; gdouble *data; gint j; gint16 v; gdouble xstep; xstep = GINT16_FROM_LE(d16[2*res-1])-GINT16_FROM_LE(d16[1]); dline = gwy_data_line_new(res, xy_s...
false
false
false
false
false
0
eina_hash_new(Eina_Key_Length key_length_cb, Eina_Key_Cmp key_cmp_cb, Eina_Key_Hash key_hash_cb, Eina_Free_Cb data_free_cb, int buckets_power_size) { /* FIXME: Use mempool. */ Eina_Hash *new; eina_error_set(0); EINA_SAFETY_ON_NULL_RETURN_VAL(key_cmp_c...
false
false
false
false
false
0
SetXtrmBoolean(char *string, Boolean value) { char svalue[10]; if (value==False) sprintf(svalue,"False"); else sprintf(svalue,"True"); SetXtrmString(string, svalue); }
false
false
false
false
false
0
cm_reset_timeout(struct cm_context *context) { struct timeval now, then; if (context->idle_event != NULL) { cm_log(3, "Clearing previously-set idle timer.\n"); talloc_free(context->idle_event); context->idle_event = NULL; } if ((context->idle_timeout > 0) && (context->n_entries == 0)) { now = tevent_ti...
false
false
false
false
false
0
create_process(wsh_command *cmd) { int status = 0; pid_t pid = fork(); if (pid == 0) { if (execvp(cmd->args2D[0], cmd->args2D) == -1) { fprintf(stderr,"ERROR - %s ('%s')\n", "execvp error", cmd->args2D[0]); perror("wsh"); } exit(EXIT_FAILURE); ...
false
false
false
false
false
0
parseForWidthAndHeight(QXmlStreamReader & xml) { QSizeF size = TextUtils::parseForWidthAndHeight(xml); if (size.width() != 0 && size.height() != 0) return size; QIODevice * device = xml.device(); DebugDialog::debug("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); DebugDialog::debug("bad width and/or bad height in svg:"...
false
false
false
false
false
0
z_xgcd(long* a, long* b, long x, long y) { long u1=1, v1=0; long u2=0, v2=1; long t1, t2; long u3, v3; long quot, rem; long xsign = 0; long ysign = 0; if (x < 0) { x = -x; xsign = 1; } if (y < 0) { y = -y; ysign = 1; } u3 = x, v3 = y; while (v3) {...
false
false
false
false
false
0
krb5_db2_create(krb5_context context, char *conf_section, char **db_args) { krb5_error_code status = 0; krb5_db2_context *dbc; krb5_clear_error_message(context); if (inited(context)) return 0; status = configure_context(context, conf_section, db_args); if (status != 0) return s...
false
false
false
false
false
0
fat32_fat_mark_cluster_chain_free(struct fat32_fat_t *fat, uint32_t cluster) { fat32_fat_entry_t entry; enum fat32_error_t ret; while (true) { ret = fat32_fat_get_entry(fat, cluster, &entry); if (ret == FE_OK) { if (fat32_fat_entry_is_free(entry) || fat32_fat_entry_is_bad(entry)) { ...
false
false
false
false
false
0
unindent() { int idSize = int(indent_.size()); int idsSize = int(indentString_.size()); if (idsSize >= idSize) indentString_.resize (idsSize - idSize); }
false
false
false
false
false
0
boinc_init() { int retval; if (!diagnostics_is_initialized()) { retval = boinc_init_diagnostics(BOINC_DIAG_DEFAULTS); if (retval) return retval; } boinc_options_defaults(options); return boinc_init_options(&options); }
false
false
false
false
false
0
irafputi4 (irafheader, offset, inum) char *irafheader; /* IRAF image header */ int offset; /* Number of bytes to skip before number */ int inum; /* Number to put into header */ { char *cn, *chead; chead = irafheader; cn = (char *) &inum; if (headswap < 0) headswap = 0; if (headswap != machswap...
false
false
false
false
false
0
mp_mode_handler(vector strvec) { mode_t mode; struct mpentry *mpe = VECTOR_LAST_SLOT(conf->mptable); char *buff; if (!mpe) return 1; buff = set_value(strvec); if (!buff) return 1; if (sscanf(buff, "%o", &mode) == 1 && mode <= 0777) { mpe->attribute_flags |= (1 << ATTR_MODE); mpe->mode = mode; } FREE...
false
false
false
false
false
0
print_pll(struct device *dev, struct smiapp_pll *pll) { dev_dbg(dev, "pre_pll_clk_div\t%u\n", pll->pre_pll_clk_div); dev_dbg(dev, "pll_multiplier \t%u\n", pll->pll_multiplier); if (!(pll->flags & SMIAPP_PLL_FLAG_NO_OP_CLOCKS)) { dev_dbg(dev, "op_sys_clk_div \t%u\n", pll->op.sys_clk_div); dev_dbg(dev, "op_pix_c...
false
false
false
false
false
0
fobject_lookup_hinted(vmon_t *vmon, const char *path, vmon_fobject_t *hint) { vmon_fobject_t *fobject = NULL, *tmp = NULL; uint64_t inum; /* TODO maintain the fobject hash tables, they should probably be isolated/scoped based on the string before the : */ /* in reality there needs to be a list somewhere of the ...
false
false
false
false
false
0
mod_tora_do_init() { int tmp = 0; if( init_done ) return; init_done = true; memset(&config,0,sizeof(config)); config.host = DEFAULT_HOST; config.port_min = DEFAULT_PORT; config.port_max = DEFAULT_PORT; config.max_post_size = DEFAULT_MAX_POST_DATA; }
false
false
false
false
false
0
gst_video_box_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GstVideoBox *video_box = GST_VIDEO_BOX (object); g_mutex_lock (&video_box->mutex); switch (prop_id) { case PROP_LEFT: video_box->box_left = g_value_get_int (value); if (video_box->box_left...
false
false
false
false
false
0
external_diff(void) { static const char *external_diff_cmd = NULL; static int done_preparing = 0; if (done_preparing) return external_diff_cmd; external_diff_cmd = getenv("GIT_EXTERNAL_DIFF"); if (!external_diff_cmd) external_diff_cmd = external_diff_cmd_cfg; done_preparing = 1; return external_diff_cmd; }
false
false
false
false
false
0
clearit() { long i; if (previewer == tek) printf("%c\f", escape); else if (ansi || ibmpc) #ifdef WIN32 phyClearScreen(); #else printf("\033[2J\033[H"); #endif else { for (i = 1; i <= 24; i++) putchar('\n'); } #ifdef WIN32 phyClearScreen(); #endif }
false
false
false
false
false
0
gx_install_cie_abc(gs_cie_abc *pcie, gs_state * pgs) { if_debug_matrix3("[c]CIE MatrixABC =", &pcie->MatrixABC); cie_matrix_init(&pcie->MatrixABC); CIE_LOAD_CACHE_BODY(pcie->caches.DecodeABC.caches, pcie->RangeABC.ranges, &pcie->DecodeABC, DecodeABC_default, pcie, ...
false
false
false
false
false
0
server_flag_option(const char *name, int defallt) { Var v; if (get_server_option(SYSTEM_OBJECT, name, &v)) return is_true(v); else return defallt; }
false
false
false
false
false
0
soper_delete(soper_t *soper) { mowgli_node_t *n; if (!soper) { slog(LG_DEBUG, "soper_delete(): called for null soper"); return; } slog(LG_DEBUG, "soper_delete(): %s", (soper->myuser) ? entity(soper->myuser)->name : soper->name); n = mowgli_node_find(soper, &soperlist); mowgli_node_delete(n, &soperlist); ...
false
false
false
false
false
0
release_vlan_found_handle(struct vlan_found_handle *found_handle) { if (found_handle->entries != NULL) { free(found_handle->entries); found_handle->entries = NULL; } found_handle->num_of_entries = 0; found_handle->handle->outstanding_found_handles--; found_handle->handle = NULL; }
false
false
false
false
false
0
cdf_put_var1_double(int ncid, int varid, const size_t index[], const double *dp) { int status; status = nc_put_var1_double(ncid, varid, index, dp); if ( CDF_Debug || status != NC_NOERR ) Message("ncid = %d varid = %d val = %f", ncid, varid, *dp); if ( status != NC_NOERR ) Error("%s", nc_strerror(status))...
false
false
false
false
false
0
check_and_create_dir(const char *name) { struct stat stat_buffer; if (stat(name, &stat_buffer)) { /* error check if it doesn't exist or something else is wrong */ if (errno == ENOENT) { /* doesn't exist letts create it ;) */ #ifdef BSD43 if (mkdir(name, 0775)) #else if (mkdir(name, S_IRWXU|S_IRWXG|S...
false
false
false
false
false
0
gsd_wacom_stylus_finalize (GObject *object) { GsdWacomStylus *stylus; GsdWacomStylusPrivate *p; g_return_if_fail (object != NULL); g_return_if_fail (GSD_IS_WACOM_STYLUS (object)); stylus = GSD_WACOM_STYLUS (object); g_return_if_fail (stylus->priv != NULL); p = stylus...
false
false
false
false
false
0
usc_set_txidle( struct mgsl_struct *info ) { u16 usc_idle_mode = IDLEMODE_FLAGS; /* Map API idle mode to USC register bits */ switch( info->idle_mode ){ case HDLC_TXIDLE_FLAGS: usc_idle_mode = IDLEMODE_FLAGS; break; case HDLC_TXIDLE_ALT_ZEROS_ONES: usc_idle_mode = IDLEMODE_ALT_ONE_ZERO; break; case HDLC_TXIDL...
false
false
false
false
false
0
usdhi6_sg_unmap(struct usdhi6_host *host, bool force) { struct mmc_data *data = host->mrq->data; struct page *page = host->head_pg.page; if (page) { /* Previous block was cross-page boundary */ struct scatterlist *sg = data->sg_len > 1 ? host->sg : data->sg; size_t blk_head = host->head_len; if (!data->...
false
false
false
false
false
0
elfcore_netbsd_get_lwpid (Elf_Internal_Note *note, int *lwpidp) { char *cp; cp = strchr (note->namedata, '@'); if (cp != NULL) { *lwpidp = atoi(cp + 1); return TRUE; } return FALSE; }
false
false
false
false
true
1
free_clsf_DS( clsf_DS clsf) { int i_class, i_att, n_classes = 0, n_atts; class_DS class; if (G_clsf_storage_log_p == TRUE) fprintf(stdout, "free_clsf: %p\n", (void *) clsf); if (clsf->classes != NULL) { n_classes = clsf->n_classes; for (i_class=0; i_class < clsf->n_classes; i_class++) { clas...
false
false
false
false
false
0
ap_coeff_reduce(ap_coeff_t* coeff) { if (coeff->discr==AP_COEFF_INTERVAL){ if (ap_scalar_equal(coeff->val.interval->inf,coeff->val.interval->sup)){ /* We cheat with the good rules */ ap_scalar_t* scalar = coeff->val.interval->inf; ap_scalar_free(coeff->val.interval->sup); free(coeff->val.i...
false
false
false
false
false
0
save_zimage(const char *fname, /* input file name */ int numcomp, /* number of components */ int *nx, /* ptr to array of nx values (cols), one per component */ int *ny, /* ptr to array of ny values (rows), one per component */ int *nz, /* ptr to array...
false
false
false
false
false
0
dec_complex(PyObject *self, PyObject *dummy UNUSED) { PyObject *f; double x; f = PyDec_AsFloat(self); if (f == NULL) { return NULL; } x = PyFloat_AsDouble(f); Py_DECREF(f); if (x == -1.0 && PyErr_Occurred()) { return NULL; } return PyComplex_FromDoubles(x, 0); ...
false
false
false
false
false
0
connection_handler(int sd, short flags, void* cbdata) { mca_oob_tcp_pending_connection_t *new_connection; int i; mca_oob_tcp_module_t *mod; bool found; struct sockaddr modaddr; uint32_t netmask; new_connection = (mca_oob_tcp_pending_connection_t*)cbdata; opal_output_verbose(4, orte_oob...
false
false
false
false
false
0
m_cdfg_emit_expr (pIIR_Expression e, string &str, RegionStack &rstack, id_type t) { str += "/* IIR_Expression " + string(e->kind_name()) + " */"; return false; }
false
false
false
false
false
0
do_macro(Macro *macro, String *args, int offset, int used_type, int kbnumlocal) { int result, old_invis_flag, oldblock; const char *command; char numbuf[16]; if (*macro->name) { command = macro->name; } else { sprintf(numbuf, "#%d", macro->num); command = numbuf; } ...
true
true
false
false
false
1
check_flag(int flag) { if ((flag != 0) && (flag != 1)) gpwarning(GPW_RANGE, NULL); return flag & 0x1; }
false
false
false
false
false
0
cnf_read(id, buf, bufsiz) int id; /* index into cnf_map to get channel #/ptr */ int bufsiz; /* max size of receiving buffer */ char *buf; /* address of receiving buffer */ { int nread; /* the number of bytes read/received */ int sock; /* read socket */ u_long ...
false
false
false
false
true
1
get_attr(const Node *n, const string name) { pairlist p; for (p = n->attribs; p && !same(p->name, name); p = p->next) ; return p ? p->value : NULL; }
false
false
false
false
false
0
queue_insert(queue *q, int after, gssint_uint64 seqnum) { /* insert. this is not the fastest way, but it's easy, and it's optimized for insert at end, which is the common case */ int i; /* common case: at end, after == q->start+q->length-1 */ /* move all the elements (after,last] up one slot *...
false
false
false
false
false
0
gtk_source_language_finalize (GObject *object) { GtkSourceLanguage *lang; lang = GTK_SOURCE_LANGUAGE (object); if (lang->priv->ctx_data != NULL) g_critical ("context data not freed in gtk_source_language_finalize"); g_free (lang->priv->lang_file_name); g_free (lang->priv->translation_domain); g_free (lang->p...
false
false
false
false
false
0
latex_reportdesc(FILE *outf, Outchoices *od, choice rep) { fprintf(outf, "{\\em %s}\n\n", od->descstr[rep]); if (rep != REP_SIZE && rep != REP_PROCTIME) fprintf(outf, "\\smallskip\n"); /* These two reports probably have no further header text. If this is wrong, it's corrected in latex_reportspan() later....
false
false
false
false
false
0
detectThread( gpointer pData ) { gint nError = -1; routerSetStandardPorts( getActiveProfile() ); nError = routerGetPhoneSettings( getActiveProfile() ); if ( nError != 0 ) { if ( nError == 33485 ) { ShowError( TRUE, _( "Login blocked" ), _( "ffgtk has blocked login until valid password is given" ) ); } else...
false
false
false
false
false
0
afr_sh_post_nonblocking_entry_cbk (call_frame_t *frame, xlator_t *this) { afr_internal_lock_t *int_lock = NULL; afr_local_t *local = NULL; afr_self_heal_t *sh = NULL; local = frame->local; int_lock = &local->internal_lock; sh = &local->self_...
false
false
false
false
false
0