PostGIS  2.5.0beta2dev-r@@SVN_REVISION@@

◆ quantile_llist_delete()

static int quantile_llist_delete ( struct quantile_llist_element element)
static

Definition at line 855 of file rt_statistics.c.

References quantile_llist_element::next, quantile_llist_element::prev, RASTER_DEBUGF, and rtdealloc().

Referenced by quantile_llist_destroy(), and rt_band_get_quantiles_stream().

855  {
856  if (NULL == element) return 0;
857 
858  /* beginning of list */
859  if (NULL == element->prev && NULL != element->next) {
860  element->next->prev = NULL;
861  }
862  /* end of list */
863  else if (NULL != element->prev && NULL == element->next) {
864  element->prev->next = NULL;
865  }
866  /* within list */
867  else if (NULL != element->prev && NULL != element->next) {
868  element->prev->next = element->next;
869  element->next->prev = element->prev;
870  }
871 
872  RASTER_DEBUGF(4, "qle @ %p destroyed", element);
873  rtdealloc(element);
874 
875  return 1;
876 }
struct quantile_llist_element * prev
Definition: librtcore.h:2413
struct quantile_llist_element * next
Definition: librtcore.h:2414
#define RASTER_DEBUGF(level, msg,...)
Definition: librtcore.h:299
void rtdealloc(void *mem)
Definition: rt_context.c:186
Here is the call graph for this function:
Here is the caller graph for this function: