diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-04-25 00:45:42 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-04-25 00:45:42 +0000 |
commit | 84f65e6be63307373949bc4490fcd40b34794903 (patch) | |
tree | 2e3f32b61105335dc10ab21344f18a729f8f1483 /source3/nmbd | |
parent | 644f22ac6141f58f2badd3a9761ac156831c16a3 (diff) | |
download | samba-84f65e6be63307373949bc4490fcd40b34794903.tar.gz samba-84f65e6be63307373949bc4490fcd40b34794903.tar.bz2 samba-84f65e6be63307373949bc4490fcd40b34794903.zip |
don't qsort a list less than 2 entries
(This used to be commit 6faa3c23ae6d8aab52f8d6689e04bde9b3029804)
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/nmbd_incomingrequests.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/nmbd/nmbd_incomingrequests.c b/source3/nmbd/nmbd_incomingrequests.c index 7c46204445..c59c045bad 100644 --- a/source3/nmbd/nmbd_incomingrequests.c +++ b/source3/nmbd/nmbd_incomingrequests.c @@ -383,7 +383,9 @@ subnet %s - name not found.\n", nmb_namestr(&nmb->question.question_name), } /* Remove duplicate names. */ - qsort( buf0, names_added, 18, QSORT_CAST status_compare ); + if (names_added > 1) { + qsort( buf0, names_added, 18, QSORT_CAST status_compare ); + } for( i=1; i < names_added ; i++ ) { |