aboutsummaryrefslogtreecommitdiffstats
path: root/epan/filesystem.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2006-05-01 08:09:39 +0000
committerGuy Harris <guy@alum.mit.edu>2006-05-01 08:09:39 +0000
commit098facb0f7b86cc838cbf32d7e57ab1a4e2110d9 (patch)
tree5261ea04c1e972b0ed81090c517645b1af72fe41 /epan/filesystem.c
parentc978ebe47c764947e945d2a17bccce2ec79c6a1a (diff)
It's g_strdup_printf(), not g_sprintf_alloc().
Declare "error", and properly terminate a string. svn path=/trunk/; revision=18054
Diffstat (limited to 'epan/filesystem.c')
-rw-r--r--epan/filesystem.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/filesystem.c b/epan/filesystem.c
index dce300ae18..24b9300599 100644
--- a/epan/filesystem.c
+++ b/epan/filesystem.c
@@ -224,6 +224,7 @@ init_progfile_dir(const char *arg0
TCHAR prog_pathname_w[_MAX_PATH+2];
size_t progfile_dir_len;
char *prog_pathname;
+ DWORD error;
TCHAR *msg_w;
guchar *msg;
size_t msglen;
@@ -272,7 +273,7 @@ init_progfile_dir(const char *arg0
/*
* OK, no \ - what do we do now?
*/
- return g_sprintf_alloc("No \\ in executable pathname \"%s\",
+ return g_strdup_printf("No \\ in executable pathname \"%s\"",
prog_pathname);
}
} else {
@@ -285,7 +286,7 @@ init_progfile_dir(const char *arg0
/*
* Gak. We can't format the message.
*/
- return g_sprintf_alloc("GetModuleFileName failed: %u (FormatMessage failed: %u)",
+ return g_strdup_printf("GetModuleFileName failed: %u (FormatMessage failed: %u)",
error, GetLastError());
}
msg = utf_16to8(msg_w);
@@ -299,7 +300,7 @@ init_progfile_dir(const char *arg0
msg[msglen - 1] = '\0';
msg[msglen - 2] = '\0';
}
- return g_sprintf_alloc("GetModuleFileName failed: %s (%u)",
+ return g_strdup_printf("GetModuleFileName failed: %s (%u)",
msg, error);
}
#else