From c7bdf621524ab236a495f932f6e8b9e11eec0971 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Tue, 17 Jan 2006 00:54:06 +0100 Subject: [PATCH] Remove unused fsp_info struct; use sizeof(*table); fix dir entry hiliting --- src/protocol/fsp/fsp.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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("");