diff --git a/src/protocol/fsp/fsp.c b/src/protocol/fsp/fsp.c index 1d4e50d2..4f7663b2 100644 --- a/src/protocol/fsp/fsp.c +++ b/src/protocol/fsp/fsp.c @@ -63,10 +63,6 @@ struct module fsp_protocol_module = struct_module( ); -struct fsp_info { - int init; -}; - static void fsp_error(unsigned char *error) { @@ -113,16 +109,16 @@ sort_and_display_entries(FSP_DIR *dir) memcpy(&table[size], &fentry, sizeof(fentry)); size++; } - qsort(table, size, sizeof(fentry), + qsort(table, size, sizeof(*table), (int (*)(const void *, const void *)) compare); for (i = 0; i < size; i++) { printf("%10d\t", table[i].size, table[i].name); - if (fentry.type == FSP_RDTYPE_DIR && *dircolor) { + if (table[i].type == FSP_RDTYPE_DIR && *dircolor) { printf("", dircolor); } printf("%s", table[i].name); - if (fentry.type == FSP_RDTYPE_DIR && *dircolor) { + if (table[i].type == FSP_RDTYPE_DIR && *dircolor) { printf(""); } puts("");