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) ...@@ -292,11 +292,13 @@ util_msgset (char *s, size_t **set, int *n, int isuid)
292 } 292 }
293 } 293 }
294 294
295 /* Sort the resulting message set */
295 qsort (*set, *n, sizeof (**set), comp_int); 296 qsort (*set, *n, sizeof (**set), comp_int);
296 297
298 /* Remove duplicates. tmp serves to avoid extra dereferences */
297 tmp = *set; 299 tmp = *set;
298 for (i = 0, j = 1; i < *n; i++) 300 for (i = 0, j = 1; i < *n; i++)
299 if (tmp[j-1] != (*set)[i]) 301 if (tmp[j-1] != tmp[i])
300 tmp[j++] = tmp[i]; 302 tmp[j++] = tmp[i];
301 *n = j; 303 *n = j;
302 return 0; 304 return 0;
......