[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r7994 - GNUnet/src/util/os
From: |
gnunet |
Subject: |
[GNUnet-SVN] r7994 - GNUnet/src/util/os |
Date: |
Mon, 8 Dec 2008 09:12:17 -0700 (MST) |
Author: holindho
Date: 2008-12-08 09:12:17 -0700 (Mon, 08 Dec 2008)
New Revision: 7994
Modified:
GNUnet/src/util/os/installpath.c
Log:
even better
Modified: GNUnet/src/util/os/installpath.c
===================================================================
--- GNUnet/src/util/os/installpath.c 2008-12-08 03:30:41 UTC (rev 7993)
+++ GNUnet/src/util/os/installpath.c 2008-12-08 16:12:17 UTC (rev 7994)
@@ -118,18 +118,18 @@
return NULL;
path = &zero;
len = 0;
+ /* get the path len, including the trailing \0 */
func (path, &len);
if (len == 0)
return NULL;
- len++;
path = GNUNET_malloc (len);
- memset (path, 0x00, len);
ret = func (path, &len);
if (ret != 0)
{
GNUNET_free (path);
return NULL;
}
+ len = strlen (path);
while ((path[len] != '/') && (len > 0))
len--;
path[len] = '\0';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r7994 - GNUnet/src/util/os,
gnunet <=