[SCM] Samba Shared Repository - branch master updated
Rusty Russell
rusty at samba.org
Mon Jun 20 21:53:02 MDT 2011
The branch, master has been updated
via 894b027 lib/ccan/tally.h: update for FreeBSD compile.
from 233a622 s4-param Autogenerate the loadparm_globals and loadparm_service tables
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 894b0273fcff28dfaef80ce7be1bcc35d47aed65
Author: Rusty Russell <rusty at rustcorp.com.au>
Date: Tue Jun 21 11:20:07 2011 +0930
lib/ccan/tally.h: update for FreeBSD compile.
Based on commit 0284423676209380a2e07086b9b356096a2f93e6 from CCAN:
Author: Rusty Russell <rusty at rustcorp.com.au>
Date: Tue Jun 21 10:43:31 2011 +0930
tally: fix FreeBSD compile, memleak in tests.
Posix says ssize_t is in sys/types.h; on Linux stdlib.h is enough.
Autobuild-User: Rusty Russell <rusty at rustcorp.com.au>
Autobuild-Date: Tue Jun 21 05:52:12 CEST 2011 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
lib/ccan/tally/tally.c | 2 +-
lib/ccan/tally/tally.h | 3 ++-
lib/ccan/tally/test/run-mean.c | 1 +
lib/ccan/tally/test/run-median.c | 1 +
lib/ccan/tally/test/run-min-max.c | 1 +
lib/ccan/tally/test/run-mode.c | 1 +
lib/ccan/tally/test/run-renormalize.c | 1 +
7 files changed, 8 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/ccan/tally/tally.c b/lib/ccan/tally/tally.c
index 0d01907..b1839be 100644
--- a/lib/ccan/tally/tally.c
+++ b/lib/ccan/tally/tally.c
@@ -1,4 +1,3 @@
-#include "config.h"
#include <ccan/tally/tally.h>
#include <ccan/build_assert/build_assert.h>
#include <ccan/likely/likely.h>
@@ -7,6 +6,7 @@
#include <string.h>
#include <stdio.h>
#include <assert.h>
+#include <stdlib.h>
#define SIZET_BITS (sizeof(size_t)*CHAR_BIT)
diff --git a/lib/ccan/tally/tally.h b/lib/ccan/tally/tally.h
index e715717..650e265 100644
--- a/lib/ccan/tally/tally.h
+++ b/lib/ccan/tally/tally.h
@@ -1,6 +1,7 @@
#ifndef CCAN_TALLY_H
#define CCAN_TALLY_H
-#include <stdlib.h>
+#include "config.h"
+#include <sys/types.h>
struct tally;
diff --git a/lib/ccan/tally/test/run-mean.c b/lib/ccan/tally/test/run-mean.c
index a4a67cf..b43dea6 100644
--- a/lib/ccan/tally/test/run-mean.c
+++ b/lib/ccan/tally/test/run-mean.c
@@ -25,5 +25,6 @@ int main(void)
ok1(tally_mean(tally) == 0);
}
+ free(tally);
return exit_status();
}
diff --git a/lib/ccan/tally/test/run-median.c b/lib/ccan/tally/test/run-median.c
index f461c2e..b12fd8a 100644
--- a/lib/ccan/tally/test/run-median.c
+++ b/lib/ccan/tally/test/run-median.c
@@ -40,6 +40,7 @@ int main(void)
ok1(median - (ssize_t)err <= i/2
&& median + (ssize_t)err >= i/2);
}
+ free(tally);
return exit_status();
}
diff --git a/lib/ccan/tally/test/run-min-max.c b/lib/ccan/tally/test/run-min-max.c
index ffb0f2e..c92f6d3 100644
--- a/lib/ccan/tally/test/run-min-max.c
+++ b/lib/ccan/tally/test/run-min-max.c
@@ -16,5 +16,6 @@ int main(void)
ok1(tally_max(tally) == i);
ok1(tally_min(tally) == -i);
}
+ free(tally);
return exit_status();
}
diff --git a/lib/ccan/tally/test/run-mode.c b/lib/ccan/tally/test/run-mode.c
index 7216738..cd2f230 100644
--- a/lib/ccan/tally/test/run-mode.c
+++ b/lib/ccan/tally/test/run-mode.c
@@ -41,5 +41,6 @@ int main(void)
ok1(mode - (ssize_t)err <= 0 && mode + (ssize_t)err >= 0);
}
+ free(tally);
return exit_status();
}
diff --git a/lib/ccan/tally/test/run-renormalize.c b/lib/ccan/tally/test/run-renormalize.c
index 7c14152..8fe9dbc 100644
--- a/lib/ccan/tally/test/run-renormalize.c
+++ b/lib/ccan/tally/test/run-renormalize.c
@@ -21,5 +21,6 @@ int main(void)
ok1(tally->counts[0] == 2);
ok1(tally->counts[1] == 0);
+ free(tally);
return exit_status();
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list