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
reset_xml_buf(gxml_data * xd, char ** buf, int * bsize) { if( *bsize == xd->buf_size ) { if( xd->verb > 3 ) fprintf(stderr,"-- buffer kept at %d bytes\n", *bsize); return 0; } if( xd->verb > 2 ) fprintf(stderr,"++ update buf, %d to %d bytes\n",*bsize,xd->buf_size); ...
false
false
false
false
false
0
FreeAllResources(void) { int i; for (i = currentMaxClients; --i >= 0;) { if (clientTable[i].buckets) FreeClientResources(clients[i]); } }
false
false
false
false
false
0
_nodes_in_sets(bitstr_t *req_bitmap, struct node_set * node_set_ptr, int node_set_size) { bitstr_t *scratch_bitmap = NULL; int error_code = SLURM_SUCCESS, i; for (i=0; i<node_set_size; i++) { if (scratch_bitmap) bit_or(scratch_bitmap, node_set_ptr[i].my_bitmap); else { scratch_bitmap =...
false
false
false
false
false
0
drawLayer(int layer) { g_init_bounds(); // y-axis should *not* influence position of title! draw_axis_pos(GLE_AXIS_Y0, xbl, ybl, true, DRAW_AXIS_ALL, m_box); draw_axis_pos(GLE_AXIS_Y, xbl, ybl, true, DRAW_AXIS_ALL, m_box); draw_axis_pos(GLE_AXIS_Y2, xbl+xlength, ybl, true, DRAW_AXIS_ALL, m_box); GLEMeasureBox mea...
false
false
false
false
false
0
output_dgn() { int nd, cl = 0, nl = 0, cb = 0, nb = 0; static struct version_info version_data = { VERSION_NUMBER, VERSION_FEATURES, VERSION_SANITY1, VERSION_SANITY2 }; if(++n_dgns <= 0) { yyerror("FATAL - no dungeons were defined."); exit(EXIT_FAILURE); } if (fwrite((char *)&version_data,...
false
false
false
false
false
0
floatsleep(double secs) { /* XXX Should test for MS_WINDOWS first! */ #if defined(HAVE_SELECT) && !defined(__EMX__) struct timeval t; double frac; int err; frac = fmod(secs, 1.0); secs = floor(secs); t.tv_sec = (long)secs; t.tv_usec = (long)(frac*1000000.0); Py_BEGIN_ALLOW_THREADS e...
false
false
false
false
false
0
addText(const QString & text, bool inUrl) { if (text.isEmpty()) return ""; return QString("<tspan fill='%1' >%2</tspan>\n") .arg(inUrl ? "#0000ff" : "#000000") .arg(text) ; }
false
false
false
false
false
0
checkValidity() const { if(!mWindowHandle.isValid()) { throwError("InvalidWindowError", tr("Invalid window")); return false; } return true; } }
false
false
false
false
false
0
ber_encode_tag(ErlNifEnv *env, ERL_NIF_TERM tag, unsigned int form, mem_chunk_t **curr, unsigned int *count) { unsigned int class_tag_no, head_tag; if (!enif_get_uint(env, tag, &class_tag_no)) return ASN1_ERROR; head_tag = form | ((class_tag_no & 0x30000) >> 10); class_tag_no = class_tag_no & 0xFFFF;...
false
false
false
false
true
1
tree_log2 (tree expr) { int prec; HOST_WIDE_INT high, low; STRIP_NOPS (expr); if (TREE_CODE (expr) == COMPLEX_CST) return tree_log2 (TREE_REALPART (expr)); prec = (POINTER_TYPE_P (TREE_TYPE (expr)) ? POINTER_SIZE : TYPE_PRECISION (TREE_TYPE (expr))); high = TREE_INT_CST_HIGH (expr); low = TREE_...
false
false
false
false
false
0
__ecerePropertySelfWatcher_0_parent(struct __ecereNameSpace__ecere__com__Instance * this) { struct __ecereNameSpace__ecere__gui__controls__SelectorButton * __ecerePointer___ecereNameSpace__ecere__gui__controls__SelectorButton = (struct __ecereNameSpace__ecere__gui__controls__SelectorButton *)(this ? (((char *)this) + _...
false
false
false
false
false
0
fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base, int min, int max, int flags) { #define MAX_CONVERT_PLACES 40 int signvalue = 0; unsigned long uvalue; char convert[MAX_CONVERT_PLACES]; int place = 0; int spadlen = 0; /* amount to space pad */ int zpadlen = 0; /* amount to zero pad */...
false
false
false
false
false
0
update_time (CcDateTimePanel *self) { CcDateTimePanelPrivate *priv = self->priv; char *label; char *am_pm_widgets[] = {"ampm_up_button", "ampm_down_button", "ampm_label" }; guint i; if (priv->clock_format == G_DESKTOP_CLOCK_FORMAT_24H) { /* Update the hours label */ label = g_date_time_format...
false
false
false
false
false
0
mode_in_hsync_range(const struct drm_display_mode *mode, struct edid *edid, u8 *t) { int hsync, hmin, hmax; hmin = t[7]; if (edid->revision >= 4) hmin += ((t[4] & 0x04) ? 255 : 0); hmax = t[8]; if (edid->revision >= 4) hmax += ((t[4] & 0x08) ? 255 : 0); hsync = drm_mode_hsync(mode); return (hsy...
false
false
false
false
false
0
test_attr_repo__foreach(void) { int count; count = 0; cl_git_pass(git_attr_foreach( g_repo, 0, "root_test1", &count_attrs, &count)); cl_assert(count == 2); count = 0; cl_git_pass(git_attr_foreach(g_repo, 0, "sub/subdir_test1", &count_attrs, &count)); cl_assert(count == 4); /* repoattr, rootattr, subattr, n...
false
false
false
false
false
0
gpucount(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __maybe_unused char *param, bool isjson, __maybe_unused char group) { struct api_data *root = NULL; char buf[TMPBUFSIZ]; bool io_open; int numgpu = 0; #ifdef HAVE_OPENCL numgpu = nDevs; #endif message(io_data, MSG_NUMGPU, 0, NULL, isjson); io_open ...
true
true
false
false
false
1
nfs_instantiate(struct dentry *dentry, struct nfs_fh *fhandle, struct nfs_fattr *fattr, struct nfs4_label *label) { struct dentry *parent = dget_parent(dentry); struct inode *dir = d_inode(parent); struct inode *inode; int error = -EACCES; d_drop(dentry); /* We may have been initialized further down */ ...
false
false
false
false
false
0
makeCompoundFlags(IspellDict *Conf, int affix) { uint32 flag = 0; char *str = Conf->AffixData[affix]; while (str && *str) { flag |= Conf->flagval[*(unsigned char *) str]; str++; } return (flag & FF_DICTFLAGMASK); }
false
false
false
false
false
0
ews_backend_get_destination_address (EBackend *backend, gchar **host, guint16 *port) { CamelEwsSettings *ews_settings; SoupURI *soup_uri; gchar *host_url; gboolean result = FALSE; g_return_val_if_fail (port != NULL, FALSE); g_return_val_if_fail (host != NULL, FALSE); ews_settings = ews_backen...
false
false
false
false
false
0
zrtp_getHelloHash(ZrtpContext* zrtpContext, int32_t index) { std::string ret; if (zrtpContext && zrtpContext->zrtpEngine) ret = zrtpContext->zrtpEngine->getHelloHash(index); else return NULL; if (ret.size() == 0) return NULL; char* retval = (char*)malloc(ret.size()+1); ...
false
true
false
false
false
1
tag_data_copy (TagData *td) { TagData *new_td; new_td = g_slice_new (TagData); new_td->tv = td->tv; new_td->cancellable = g_cancellable_new (); new_td->tag_id = g_strdup (td->tag_id); if (td->iter) { new_td->iter = gtk_tree_iter_copy (td->iter); } else { new_td->iter = NULL; } new_td->items = td->items...
false
false
false
false
false
0
autoItemsChildren() const { if ( !autoItemsEnabled() ) return; DiscoListItem *child = (DiscoListItem *)firstChild(); while ( child ) { child->updateItems(true); child = (DiscoListItem *)child->nextSibling(); } }
false
false
false
false
false
0
test_reset_hard__resetting_reverts_unmerged(void) { git_index *index; int entries; /* Ensure every permutation of non-zero stage entries results in the * path being cleaned up. */ for (entries = 1; entries < 8; entries++) { cl_git_pass(git_repository_index(&index, repo)); unmerged_index_init(index, entries)...
false
false
false
false
false
0
ColorSpaceDirectionFromString(const char * s) { std::string str = pystring::lower(s); if(str == "to_reference") return COLORSPACE_DIR_TO_REFERENCE; else if(str == "from_reference") return COLORSPACE_DIR_FROM_REFERENCE; return COLORSPACE_DIR_UNKNOWN; }
false
false
false
false
false
0
IFDHTransmitToICC(DWORD Lun, SCARD_IO_HEADER SendPci, PUCHAR TxBuffer, DWORD TxLength, PUCHAR RxBuffer, PDWORD RxLength, /*@unused@*/ PSCARD_IO_HEADER RecvPci) { /* * This function performs an APDU exchange with the card/slot * specified by Lun. The driver is responsible for performing any * protocol specific...
false
false
false
false
false
0
sarrayAddString(SARRAY *sa, char *string, l_int32 copyflag) { l_int32 n; PROCNAME("sarrayAddString"); if (!sa) return ERROR_INT("sa not defined", procName, 1); if (!string) return ERROR_INT("string not defined", procName, 1); if (copyflag != L_INSE...
false
false
false
false
false
0
print_parameter_statement(Lsymtab *symt) #else /* K&R style */ print_parameter_statement(symt) Lsymtab *symt; #endif /* HAVE_STDC */ { int column; int need; int i; column = print_typename(type_ERROR,"PARAMETER",0,symt); need = strlen(get_parameter_value(symt)); if ((column + need) > 72) /*...
false
false
false
false
false
0
_test_cmpstr (const char *got_desc, const char *exp_desc, const char *got, const char *expected) { if (got == expected) return TRUE; if (got == NULL) { debug_printf (1, "ERR\n %s = NULL, expected %s = \"%s\"\n", got_desc, exp_desc, expected); return FALSE; } if (expected == NU...
false
false
false
false
false
0
SEC_PKCS12AddPublicKeyIntegrity(SEC_PKCS12ExportContext *p12ctxt, CERTCertificate *cert, CERTCertDBHandle *certDb, SECOidTag algorithm, int keySize) { if(!p12ctxt) { return SECFailure; } p12ctxt->integrityInfo.pubkeyInfo.cert = cert; p12ctxt->integrityInfo.pubkeyInfo.certDb = certDb; p...
false
false
false
false
false
0
clearBuses() { foreach (Bus * bus, m_busHash.values()) { delete bus; } m_busHash.clear(); }
false
false
false
false
false
0
test_qof_object_get_type_label( Fixture *fixture, gconstpointer pData ) { g_assert( qof_object_get_type_label( NULL ) == NULL ); g_test_message( "Test with non existing object" ); g_assert( qof_object_get_type_label( "anytype" ) == NULL ); g_test_message( "Test with existing registered object" ); ...
false
false
false
false
false
0
ParseFrame(VP8Decoder* const dec, VP8Io* io) { for (dec->mb_y_ = 0; dec->mb_y_ < dec->br_mb_y_; ++dec->mb_y_) { // Parse bitstream for this row. VP8BitReader* const token_br = &dec->parts_[dec->mb_y_ & (dec->num_parts_ - 1)]; if (!VP8ParseIntraModeRow(&dec->br_, dec)) { return VP8SetError(de...
false
false
false
false
false
0
_ufobject_reset_clicked(GtkWidget * /*widget*/, _UFObjectList *list) { for (_UFObjectList::iterator iter = list->begin(); iter != list->end(); iter++) { (*iter)->Reset(); } }
false
false
false
false
false
0
runOnMachineFunction(MachineFunction &Fn) { DEBUG(dbgs() << "********** FAST REGISTER ALLOCATION **********\n" << "********** Function: " << ((Value*)Fn.getFunction())->getName() << '\n'); MF = &Fn; MRI = &MF->getRegInfo(); TM = &Fn.getTarget(); TRI = TM->getRegisterInfo(); TII...
false
false
false
false
false
0
mca_topo_base_graph_neighbors_count (ompi_communicator_t* comm, int rank, int *nneighbors) { mca_topo_base_comm_graph_2_1_0_t* graph = comm->c_topo->mtc.graph; *nneighbors = graph->index[rank]; if (rank > 0) { *nneighb...
false
false
false
false
false
0
core_tpg_add_initiator_node_acl( struct se_portal_group *tpg, const char *initiatorname) { struct se_node_acl *acl; mutex_lock(&tpg->acl_node_mutex); acl = __core_tpg_get_initiator_node_acl(tpg, initiatorname); if (acl) { if (acl->dynamic_node_acl) { acl->dynamic_node_acl = 0; pr_debug("%s_TPG[%u] - Repl...
false
false
false
false
false
0
cgraph_create_node (void) { struct cgraph_node *node = cgraph_allocate_node (); node->next = cgraph_nodes; node->pid = -1; node->order = cgraph_order++; if (cgraph_nodes) cgraph_nodes->previous = node; node->previous = NULL; node->global.estimated_growth = INT_MIN; node->frequency = NODE_FREQUENCY_...
false
false
false
false
false
0
isAcceptable(void * /*context*/, const char * /*type*/, const char * /*name*/, const UDataInfo *pInfo) { return (UBool)( pInfo->size>=20 && pInfo->isBigEndian==U_IS_BIG_ENDIAN && pInfo->charsetFamily==U_CHARSET_FAMILY && pInfo->dataFormat[0]==0x75 && /* da...
false
false
false
false
false
0
WriteAliasName(ostream& out, const std::string& str) { int codePoint; for(std::string::const_iterator i = str.begin(); GetNextCodePointAndAdvance(codePoint, i, str.end()); ) { if (!IsAnchorChar(codePoint)) return false; WriteCodePoint(out, codePoint); } return true; }
false
false
false
false
false
0
rt2800pci_eepromregister_read(struct eeprom_93cx6 *eeprom) { struct rt2x00_dev *rt2x00dev = eeprom->data; u32 reg; rt2x00mmio_register_read(rt2x00dev, E2PROM_CSR, &reg); eeprom->reg_data_in = !!rt2x00_get_field32(reg, E2PROM_CSR_DATA_IN); eeprom->reg_data_out = !!rt2x00_get_field32(reg, E2PROM_CSR_DATA_OUT); ee...
false
false
false
false
false
0
has_value_dependent_address (tree op) { /* We could use get_inner_reference here, but there's no need; this is only relevant for template non-type arguments, which can only be expressed as &id-expression. */ if (DECL_P (op)) { tree ctx = CP_DECL_CONTEXT (op); if (TYPE_P (ctx) && dependent...
false
false
false
false
false
0
dib0090_wbd_to_db(struct dib0090_state *state, u16 wbd) { wbd &= 0x3ff; if (wbd < state->wbd_offset) wbd = 0; else wbd -= state->wbd_offset; /* -64dB is the floor */ return -640 + (s16) slopes_to_scale(dib0090_wbd_slopes, ARRAY_SIZE(dib0090_wbd_slopes), wbd); }
false
false
false
false
false
0
twl4030_madc_conversion(struct twl4030_madc_request *req) { const struct twl4030_madc_conversion_method *method; int ret; if (!req || !twl4030_madc) return -EINVAL; mutex_lock(&twl4030_madc->lock); if (req->method < TWL4030_MADC_RT || req->method > TWL4030_MADC_SW2) { ret = -EINVAL; goto out; } /* Do we ...
false
false
false
false
false
0
gfire_server_detector_create(GCallback p_server_callback) { if(!p_server_callback) return NULL; gfire_server_detector *ret = g_malloc0(sizeof(gfire_server_detector)); if(!ret) return NULL; ret->mutex = g_mutex_new(); ret->server_callback = p_server_callback; return ret; }
false
false
false
false
false
0
rtsafe_memory_pool_allocate_sleepy( rtsafe_memory_pool_handle pool_handle) { void * data; do { rtsafe_memory_pool_sleepy(pool_handle); data = rtsafe_memory_pool_allocate(pool_handle); } while (data == NULL); return data; }
false
false
false
false
false
0
metadata_resize(struct era_metadata *md, void *arg) { int r; dm_block_t *new_size = arg; __le32 value; if (!valid_nr_blocks(*new_size)) { DMERR("Invalid number of origin blocks %llu", (unsigned long long) *new_size); return -EINVAL; } writeset_free(&md->writesets[0]); writeset_free(&md->writesets[1...
false
false
false
false
false
0
OnPacketReceived(const CECPacket *packet, uint32 trueSize) { packet->DebugPrint(true, trueSize); const CECPacket *reply = NULL; if (m_conn_state == CONN_FAILED) { // Client didn't close the socket when authentication failed. AddLogLineN(_("Client sent packet after authentication failed.")); CloseSocket(); }...
false
false
false
false
false
0
rfbNumCodedRectsTight(rfbClientPtr cl, int x, int y, int w, int h) { int maxRectSize, maxRectWidth; int subrectMaxWidth, subrectMaxHeight; /* No matter how many rectangles we will send if LastRect markers are use...
false
false
false
false
false
0
priority(){ register pthread_t ttid=(pthread_t)tid; if(ttid){ sched_param sched={0}; int pcy=0; pthread_getschedparam(ttid,&pcy,&sched); return sched.sched_priority; } return 0; }
false
false
false
false
false
0
perf_post_connect(worker_t *worker) { global_t *global = worker->global; perf_wconf_t *wconf = perf_get_worker_config(worker); perf_gconf_t *gconf = perf_get_global_config(global); if (gconf->on & PERF_GCONF_ON && worker->flags & FLAGS_CLIENT) { apr_time_t duration = apr_time_now() - wconf->stat.conn_time....
false
false
false
false
false
0
group_system(const char *username) { struct passwd *pwd; struct group *gr; pwd = getpwnam(username); if (pwd == NULL) return NULL; gr = getgrgid(pwd->pw_gid); if (gr == NULL) return NULL; return xstrdup(gr->gr_name); }
false
false
false
false
false
0
zFindTrellisPin(zTrellis* trellis, coor_t pin_pos){ coor_t i; zDNA* dna; zPinSearch* ps; int pin_state = -1; pin_pos += PADDING - 1; dna = trellis->dna; if(pin_pos >= dna->length){ zDie("zFindTrellisPin pin_pos must be less than the sequence length"); } if(pin_pos == 0){ zDie("zFindTrel...
false
false
false
false
false
0
c2_unlock_cqs(struct c2_cq *send_cq, struct c2_cq *recv_cq) { if (send_cq == recv_cq) spin_unlock_irq(&send_cq->lock); else if (send_cq > recv_cq) { spin_unlock(&recv_cq->lock); spin_unlock_irq(&send_cq->lock); } else { spin_unlock(&send_cq->lock); spin_unlock_irq(&recv_cq->lock); } }
false
false
false
false
false
0
NewColor (glong red, glong green, glong blue) { gboolean writeable = false, best_match = true; GdkColor *c = (GdkColor *) g_malloc (sizeof (GdkColor)); c->red = red; c->green = green; c->blue = blue; if (gdk_colormap_alloc_color (gdk_colormap_get_system (), c, writeable, be...
false
false
false
false
false
0
get_offset_to_move_fully_to_next_page(const Glib::RefPtr<const Gtk::PageSetup>& page_setup, Gtk::Unit units, double y, double height) { double top_margin = 0; double bottom_margin = 0; const double page_height = get_page_height(page_setup, units, top_margin, bottom_margin); const guint current_page = PrintLayo...
false
false
false
false
false
0
_testfunc_callback_i_if(int value, int (*func)(int)) { int sum = 0; while (value != 0) { sum += func(value); value /= 2; } return sum; }
false
false
false
false
false
0
addScriptChars(const char *locale, UnicodeSet *allowedChars, UErrorCode &status) { UScriptCode scripts[30]; int32_t numScripts = uscript_getCode(locale, scripts, sizeof(scripts)/sizeof(UScriptCode), &status); if (U_FAILURE(status)) { return; } if (status == U_USING_DEFAULT_WARNING) { ...
false
false
false
false
false
0
it_xm_read_sample_data(IT_SAMPLE *sample, unsigned char roguebytes, DUMBFILE *f) { int old; long i; long truncated_size; int n_channels; long datasize; if (!(sample->flags & IT_SAMPLE_EXISTS)) return dumbfile_skip(f, roguebytes); /* let's get rid of the sample data coming after the end of the loop */ if ((s...
false
false
false
false
false
0
validationCallback(MSValidationInterface::ValidationFunction f_,void *clientData_) { validationCallback(new DefaultValidationCallback(f_,clientData_)); }
false
false
false
false
false
0
main (int argc VL_UNUSED, char** argv VL_UNUSED) { vl_index i ; for (i = 0 ; i < 0xff ; ++i) { vl_uint8 x = (vl_uint8)i ; vl_uint8 r = vl_fast_sqrt_ui8(x) ; vl_uint8 r_ = (vl_uint8) floor(sqrt((double)x)) ; if (r != r_) abort() ; /* printf("sqrt(%5d) = %5d -- %5d\n", i, r, r_) ; */ } for (i...
false
false
false
false
false
0
cp2112_xfer_status(struct cp2112_device *dev) { struct hid_device *hdev = dev->hdev; u8 buf[2]; int ret; buf[0] = CP2112_TRANSFER_STATUS_REQUEST; buf[1] = 0x01; atomic_set(&dev->xfer_avail, 0); ret = cp2112_hid_output(hdev, buf, 2, HID_OUTPUT_REPORT); if (ret < 0) { hid_warn(hdev, "Error requesting status: ...
false
false
false
false
false
0
sis_load(const gchar *filename, G_GNUC_UNUSED GwyRunType mode, GError **error) { guchar *buffer; gsize size; GError *err = NULL; GwyDataField *dfield = NULL; GwyContainer *data = NULL; SISFile sisfile; SISImage *image; GString *key; const gchar *s; guint n; ...
false
false
false
false
false
0
isDoubleInfinite(HsDouble d) { union stg_ieee754_dbl u; u.d = d; /* Inf iff exponent is all ones, mantissa all zeros */ return ( u.ieee.exponent == 2047 /* 2^11 - 1 */ && u.ieee.mantissa0 == 0 && u.ieee.mantissa1 == 0 ); }
false
false
false
false
false
0
CHsolve(const MAT *A, const VEC *b, VEC *x) #endif { if ( A==MNULL || b==VNULL ) error(E_NULL,"CHsolve"); if ( A->m != A->n || A->n != b->dim ) error(E_SIZES,"CHsolve"); x = v_resize(x,b->dim); Lsolve(A,b,x,0.0); Usolve(A,x,x,0.0); return (x); }
false
false
false
true
false
1
SERPER (uae_u16 w) { int baud = 0, i, per; static int warned; if (serper == w) /* don't set baudrate if it's already ok */ return; ninebit = 0; serper = w; if (w & 0x8000) ninebit = 1; w &= 0x7fff; if (w < 13) w = 13; per = w; if (per == 0) per = 1; per = 3546895 / (per + 1); if (per <= 0) pe...
false
false
false
false
false
0
serial_hangup(struct tty_struct *tty) { struct usb_serial_port *port = tty->driver_data; dev_dbg(tty->dev, "%s\n", __func__); tty_port_hangup(&port->port); }
false
false
false
false
false
0
getPrev(void *entry) { unsigned long e=(unsigned long)entry; if (e > 1) { return (void*)(e-1); } else { return NULL; } }
false
false
false
false
false
0
get_gfn_special (char *fname) { int ok = 0; if (!strchr(fname, '/') && !strchr(fname, '\\')) { char *p, pkgname[64]; char *pkgpath; *pkgname = '\0'; strncat(pkgname, fname, 63); p = strstr(pkgname, ".gfn"); *p = '\0'; pkgpath = gretl_function_package_get_path(pkgname, PKG_ALL); if (pkgpath != NULL) {...
true
true
false
false
false
1
getUserHomePath() const { if (!userHomePathM.empty()) return userHomePathM + wxFileName::GetPathSeparator(); else return getUserLocalDataDir() + wxFileName::GetPathSeparator(); }
false
false
false
false
false
0
DeleteMacros(char *scope) { int i; struct cfObject *ptr; ptr = ObjectContext(scope); for (i = 0; i < CF_HASHTABLESIZE; i++) { if (ptr->hashtable[i] != NULL) { free(ptr->hashtable[i]); ptr->hashtable[i] = NULL; } } }
false
false
false
false
false
0
UpdateAI(const uint32 uiDiff) { // Waypoint Updating if (HasEscortState(STATE_ESCORT_ESCORTING) && !m_creature->getVictim() && m_uiWPWaitTimer && !HasEscortState(STATE_ESCORT_RETURNING)) { if (m_uiWPWaitTimer <= uiDiff) { if (!MoveToNextWaypoint()) { r...
false
false
false
false
false
0
main(int argc, char** argv) { args a(argc, argv); switch ( a.mode() ) { case USAGE_MODE: std::cout << argv[0] << " " << USAGE << std::endl; return 0; case HELP_MODE: std::cout << HELP << std::endl; return 0; case VERSION_MODE: std::cout << "Egg version " << VERSION << std::endl; return 0; default: ...
false
false
false
false
false
0
dInitColliders() { dIASSERT(!colliders_initialized); colliders_initialized = 1; memset (colliders,0,sizeof(colliders)); int i,j; // setup space colliders for (i=dFirstSpaceClass; i <= dLastSpaceClass; i++) { for (j=0; j < dGeomNumClasses; j++) { setCollider (i,j,&dCollideSpaceGeom); } } ...
false
false
false
false
false
0
bus_message_async_done_cb (GstBus *bus, GstMessage *message, ClutterGstPlayer *player) { ClutterGstPlayerPrivate *priv = PLAYER_GET_PRIVATE (player); if (priv->in_seek) { g_object_notify (G_OBJECT (player), "progress"); set_in_s...
false
false
false
false
false
0
apply_planegrid_center_vector(GtkWidget *Win,gpointer data) { GtkWidget** Entrys =(GtkWidget**)g_object_get_data(G_OBJECT (Win), "Entrys"); gchar* type = g_object_get_data(G_OBJECT (Win), "Type"); gint i; gint N[2]; gdouble len[2]; Point5 C; Point5 V; N[0] = get_number_of_point(Entrys[8]); if(N[0]<=0) ...
false
false
false
false
false
0
handle_delayed_names (XMLSaxParseState *state) { GList *l; for (l = state->delayed_names; l; l = l->next->next->next->next) { GnmNamedExpr *nexpr = l->data; char *pos_str = l->next->data; char *expr_str = l->next->next->data; Sheet *sheet = l->next->next->next->data; GnmParseError perr; GnmExprTop const ...
false
false
false
false
false
0
createImageFromFile(const io::path& filename) { if (!filename.size()) return 0; IImage* image = 0; io::IReadFile* file = FileSystem->createAndOpenFile(filename); if (file) { image = createImageFromFile(file); file->drop(); } else os::Printer::log("Could not open file of image", filename, ...
false
false
false
false
false
0
clone() { GLEColor* result = new GLEColor(m_Red, m_Green, m_Blue, m_Alpha); result->setTransparent(isTransparent()); result->setName(m_Name); if (isFill()) { result->setFill(getFill()->clone()); } return result; }
false
false
false
false
false
0
set_recommended_minfreekbytes(void) { long recommended_min = recommended_minfreekbytes(); if (opt_dry_run) { printf("echo \"%ld\" > %s\n", recommended_min, PROCMINFREEKBYTES); return; } DEBUG("Setting min_free_kbytes to %ld\n", recommended_min); file_write_ulong(PROCMINFREEKBYTES, (unsigned long)recommend...
false
false
false
false
false
0
getlang(s, io) CONST char *s; int io; { int i, ret; ret = NOCNV; if (s) for (i = 0; i < LANGLISTSIZ; i++) { if (!(kanjiiomode[langlist[i].lang] & io)) continue; if (Xstrstr(s, langlist[i].ident)) { ret = langlist[i].lang; break; } } # ifndef _NOKANJICONV if (io == L_INPUT && ret == NOCNV) ret = DEFCO...
false
false
false
false
false
0
ibus_bus_is_connected (IBusBus *bus) { g_return_val_if_fail (IBUS_IS_BUS (bus), FALSE); if (bus->priv->connection == NULL || g_dbus_connection_is_closed (bus->priv->connection)) return FALSE; return TRUE; }
false
false
false
false
false
0
UT_iconv_reset(UT_iconv_t cd) { // this insane code is needed by iconv brokenness. see // http://www.abisource.com/mailinglists/abiword-dev/01/April/0135.html if (XAP_EncodingManager::get_instance()->cjk_locale()) UT_iconv(cd, NULL, NULL, NULL, NULL); }
false
false
false
false
false
0
StartLine( double x, double y, double &xw, double &yw ) { // x, y are in graph units, returns xw, yw in world units // // must call StartLine before calling ContinueLine // double xmin = static_cast<GRA_doubleCharacteristic*>(xAxisCharacteristics_->Get(wxT("MIN")))->Get(); double xmax = static_cast<GRA_doub...
false
false
false
false
false
0
set_input_status(bool active) { if (active == input.get_active()) { return false; } else { input.set_active(active); return true; } }
false
false
false
false
false
0
cmd_mod_list(hypervisor_conn_t *conn,int argc,char *argv[]) { hypervisor_module_t *m; for(m=module_list;m;m=m->next) hypervisor_send_reply(conn,HSC_INFO_MSG,0,"%s",m->name); hypervisor_send_reply(conn,HSC_INFO_OK,1,"OK"); return(0); }
false
false
false
false
false
0
enumerateDlgLabels(UT_uint32 ndx, const char ** pszDesc, const char ** pszSuffixList, UT_ScriptIdType * ft) { UT_uint32 nrElements = getNumScripts(); if (ndx < nrElements) { const UT_ScriptSniffer * s = mSniffers->getNthItem (ndx); return s->getDlgLabels(pszDesc,pszSuffixList,...
false
false
false
false
false
0
format() const { String s; for ( int i = 0; i < n; i++ ) { for ( int j = 0; j < n; j++ ) { if ( j % 12 == 0 ) s += "\n "; int k = Util::intr( data(i,j) ); s += String( k, 5 ) + ","; } s += "//" + String( i, 2 ); } return s; }
false
false
false
false
false
0
MatchLabel(JSContext *cx, JSTokenStream *ts, JSParseNode *pn) { JSAtom *label; JSTokenType tt; tt = js_PeekTokenSameLine(cx, ts); if (tt == TOK_ERROR) return JS_FALSE; if (tt == TOK_NAME) { (void) js_GetToken(cx, ts); label = CURRENT_TOKEN(ts).t_atom; } else { la...
false
false
false
false
false
0
csbe_write_global_array_item_after_hook(cx, ap) csbe_context *cx; Array_table *ap; { if (!ap->import_flg) { if (opt_padding) { int pad_size; pad_size = ompfbe_get_cache_line_size() - get_element_byte_size(ap->type, ap->type_entry); ompcbe_write_padding(cx, pad_size); } } if (ap->k...
false
false
false
false
false
0
epu_debug(struct cx18 *cx, struct cx18_in_work_order *order) { char *p; char *str = order->str; CX18_DEBUG_INFO("%x %s\n", order->mb.args[0], str); p = strchr(str, '.'); if (!test_bit(CX18_F_I_LOADED_FW, &cx->i_flags) && p && p > str) CX18_INFO("FW version: %s\n", p - 1); }
false
false
false
false
false
0
mvwputch(WINDOW *w, int y, int x, nc_color FG, long ch) { wattron(w, FG); mvwaddch(w, y, x, ch); wattroff(w, FG); }
false
false
false
false
false
0
gst_oss_src_get_format (GstAudioRingBufferFormatType fmt, GstAudioFormat rfmt) { gint result; switch (fmt) { case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MU_LAW: result = AFMT_MU_LAW; break; case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_A_LAW: result = AFMT_A_LAW; break; case GST_AUDIO_RING_...
false
false
false
false
false
0
lib_npc_reply_to (sc_gameref_t game, sc_int npc, sc_int topic) { const sc_filterref_t filter = gs_get_filter (game); const sc_prop_setref_t bundle = gs_get_bundle (game); sc_vartype_t vt_key[5]; sc_int task; const sc_char *response; /* Find any associated task to control response. */ vt_key[0].string = "...
false
false
false
false
false
0
_heim_alloc_object(heim_type_t type, size_t size) { /* XXX should use posix_memalign */ struct heim_base *p = calloc(1, size + sizeof(*p)); if (p == NULL) return NULL; p->isa = type; p->ref_cnt = 1; return BASE2PTR(p); }
false
false
false
false
false
0
copied_data_alloc(gs_font *copied, stream *s, uint extra, int code) { gs_copied_font_data_t *const cfdata = cf_data(copied); uint len = stell(s); byte *fdata; if (code < 0) return code; fdata = gs_alloc_bytes(copied->memory, len + extra, "copied_data_alloc"); if (fdata == 0) ret...
false
false
false
false
false
0
parseDoctypeDeclEnd(Boolean fake) { checkDtd(defDtd()); Ptr<Dtd> tem(defDtdPointer()); endDtd(); if (fake) { startMarkup(eventsWanted().wantPrologMarkup(), Location()); #if 0 if (currentMarkup()) currentMarkup()->addDelim(Syntax::dMDC); #endif } else { startMarkup(eventsWanted().wantProlog...
false
false
false
false
false
0
ad193x_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, unsigned int rx_mask, int slots, int width) { struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(dai->codec); unsigned int channels; switch (slots) { case 2: channels = AD193X_2_CHANNELS; break; case 4: channels = AD193X_4_CHAN...
false
false
false
false
false
0
caravan_evaluate(const struct unit *caravan, const struct city *dest, const struct caravan_parameter *param, struct caravan_result *result) { if (param->ignore_transit_time) { caravan_evaluate_notransit(caravan, dest, param, result); } else { ...
false
false
false
false
false
0
report_suppressed(void) { int i = 0; printf("## Suppressed:"); for (i = 0; i < sup_total; i++) printf(" %s", mad_field_name(suppressed_fields[i])); printf("\n"); }
false
false
false
false
false
0
gnucash_sheet_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { GnucashSheet *sheet = GNUCASH_SHEET(widget); ENTER("widget=%p, allocation=%p", widget, allocation); if (GTK_WIDGET_CLASS(sheet_parent_class)->size_allocate) (*GTK_WIDGET_CLASS (sheet_parent_class)->size_allocate) ...
false
false
false
false
false
0