From 1e81afcd4c4e4a258892185326731b2d3bcd409d Mon Sep 17 00:00:00 2001
From: Mark Grondona <mgrondona@llnl.gov>
Date: Fri, 17 Oct 2003 18:19:27 +0000
Subject: [PATCH]  o update to latest hostlist.c from lsd-tools project

---
 src/common/hostlist.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/hostlist.c b/src/common/hostlist.c
index 303b5de8235..230f85eee7b 100644
--- a/src/common/hostlist.c
+++ b/src/common/hostlist.c
@@ -1,7 +1,7 @@
 /*****************************************************************************\
  *  $Id$
  *****************************************************************************
- *  $LSDId: hostlist.c,v 1.13 2003/10/01 16:40:44 grondo Exp $
+ *  $LSDId: hostlist.c,v 1.14 2003/10/14 20:11:54 grondo Exp $
  *****************************************************************************
  *  Copyright (C) 2002 The Regents of the University of California.
  *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
@@ -2040,7 +2040,7 @@ _get_bracketed_list(hostlist_t hl, int *start, const size_t n, char *buf)
     len = snprintf(buf, n, "%s", hr[i]->prefix);
 
     if ((len < 0) || (len > n))
-        return -1;
+        return n; /* truncated, buffer filled */
 
     if (bracket_needed && len < n && len >= 0)
         buf[len++] = '[';
-- 
GitLab