Commit 50e90b94 50e90b9403b13402f7239b93aa26f831de1020b8 by Sergey Poznyakoff

(util_msgset): Added some comments

1 parent e96bbfb5
......@@ -292,11 +292,13 @@ util_msgset (char *s, size_t **set, int *n, int isuid)
}
}
/* Sort the resulting message set */
qsort (*set, *n, sizeof (**set), comp_int);
/* Remove duplicates. tmp serves to avoid extra dereferences */
tmp = *set;
for (i = 0, j = 1; i < *n; i++)
if (tmp[j-1] != (*set)[i])
if (tmp[j-1] != tmp[i])
tmp[j++] = tmp[i];
*n = j;
return 0;
......