Use correct sizeof operand in qsort call
authorPeter Eisentraut
Mon, 12 Mar 2012 18:56:13 +0000 (20:56 +0200)
committerPeter Eisentraut
Mon, 12 Mar 2012 18:56:13 +0000 (20:56 +0200)
Probably no practical impact, since all pointers ought to have the
same size, but it was wrong nonetheless.  Found by Coverity.

src/backend/utils/adt/tsrank.c

index fb7dcc955f7a704a9d4356697c7e75ef9af27cf9..38e384c6505cfa9dc2cb88a70894b16b433bf1fc 100644 (file)
@@ -175,7 +175,7 @@ SortAndUniqItems(TSQuery q, int *size)
    if (*size < 2)
        return res;
 
-   qsort_arg(res, *size, sizeof(QueryOperand **), compareQueryOperand, (void *) operand);
+   qsort_arg(res, *size, sizeof(QueryOperand *), compareQueryOperand, (void *) operand);
 
    ptr = res + 1;
    prevptr = res;