PATCH: Sort SX vars

Derek Atkins warlord at MIT.EDU
Sat Feb 20 11:18:44 EST 2010


Jesse Weinstein <jesse at wefu.org> writes:

> +static gint
> +_compare_GncSxVariables(gconstpointer a, gconstpointer b)
> +{
> +  return strcmp(((const GncSxVariable*)a)->name, ((const GncSxVariable*)b)->name);
> +}

You should probably use safe_strcmp() here (in case ->name is NULL).
Or maybe even a utf8-capable comparison operator.

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list