Displaying 2 results from an estimated 2 matches for "ad1c7c9".
2009 Aug 11
1
[PATCH libguestfs] generator.ml: constify do_mkdtemp
...e for a "const" parameter.
* src/generator.ml (mkdtemp): Declare parameter to be of type Pathname.
---
daemon/dir.c | 27 ++++++++-------------------
src/generator.ml | 8 +++-----
2 files changed, 11 insertions(+), 24 deletions(-)
diff --git a/daemon/dir.c b/daemon/dir.c
index ad1c7c9..21ae07e 100644
--- a/daemon/dir.c
+++ b/daemon/dir.c
@@ -185,31 +185,20 @@ do_is_dir (const char *path)
}
char *
-do_mkdtemp (char *template)
+do_mkdtemp (const char *template)
{
- char *r;
-
- NEED_ROOT (return NULL);
- ABS_PATH (template, return NULL);
+ char *r = strdup (template);
+ i...
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change.
I'll get back to that series shortly ;-)
It turned into a factorization and constification exercise
during which I got a taste of ocaml. Thanks to Rich Jones
for help with a few snippets in generator.ml.
The overall result is that many previously-manually-maintained
bits from daemon/*.c functions are now hoisted into the automatically-