From 015d577a301e156111ffaa72bf0cbbf5a0b5f5a7 Mon Sep 17 00:00:00 2001 From: didg Date: Sat, 26 Oct 2002 17:22:44 +0000 Subject: [PATCH] bugfix: set defextmap after realloc and sort. --- etc/afpd/volume.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/etc/afpd/volume.c b/etc/afpd/volume.c index 06aab153..8d48614f 100644 --- a/etc/afpd/volume.c +++ b/etc/afpd/volume.c @@ -1,5 +1,5 @@ /* - * $Id: volume.c,v 1.36.2.1 2002-10-19 23:33:36 jmarcus Exp $ + * $Id: volume.c,v 1.36.2.2 2002-10-26 17:22:44 didg Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -641,10 +641,6 @@ int user; } else { memcpy(em->em_creator, creator, sizeof( em->em_creator )); } - - if ( !*ext ) { - defextmap = em; - } } /* -------------------------- */ @@ -659,16 +655,17 @@ static void sortextmap( void) { struct extmap *em; + extmap_cnt = 0; if ((em = extmap) == NULL) { return; } - extmap_cnt = 0; while (em->em_ext) { em++; extmap_cnt++; } if (extmap_cnt) { qsort(extmap, extmap_cnt, sizeof(struct extmap), extmap_cmp); + defextmap = extmap; } } -- 2.39.2