projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Port: Add Solaris string compat
[lttng-tools.git]
/
src
/
common
/
utils.c
diff --git
a/src/common/utils.c
b/src/common/utils.c
index 3c9e70ddad6439ee362d9187c751151eca60d32a..aaf577bcfd1a47e172f9c49be4657e3c15d319c5 100644
(file)
--- a/
src/common/utils.c
+++ b/
src/common/utils.c
@@
-24,7
+24,6
@@
#include <fcntl.h>
#include <limits.h>
#include <stdlib.h>
#include <fcntl.h>
#include <limits.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
@@
-37,6
+36,7
@@
#include <common/common.h>
#include <common/runas.h>
#include <common/compat/getenv.h>
#include <common/common.h>
#include <common/runas.h>
#include <common/compat/getenv.h>
+#include <common/compat/string.h>
#include "utils.h"
#include "defaults.h"
#include "utils.h"
#include "defaults.h"
@@
-92,9
+92,9
@@
char *utils_partial_realpath(const char *path, char *resolved_path, size_t size)
}
/* Cut the part we will be trying to resolve */
}
/* Cut the part we will be trying to resolve */
- cut_path = strndup(path, next - path);
+ cut_path =
lttng_
strndup(path, next - path);
if (cut_path == NULL) {
if (cut_path == NULL) {
- PERROR("strndup");
+ PERROR("
lttng_
strndup");
goto error;
}
goto error;
}
@@
-230,9
+230,9
@@
char *utils_expand_path(const char *path)
while ((next = strstr(absolute_path, "/./"))) {
/* We prepare the start_path not containing it */
while ((next = strstr(absolute_path, "/./"))) {
/* We prepare the start_path not containing it */
- start_path = strndup(absolute_path, next - absolute_path);
+ start_path =
lttng_
strndup(absolute_path, next - absolute_path);
if (!start_path) {
if (!start_path) {
- PERROR("strndup");
+ PERROR("
lttng_
strndup");
goto error;
}
/* And we concatenate it with the part after this string */
goto error;
}
/* And we concatenate it with the part after this string */
@@
-250,9
+250,9
@@
char *utils_expand_path(const char *path)
}
/* Then we prepare the start_path not containing it */
}
/* Then we prepare the start_path not containing it */
- start_path = strndup(absolute_path, previous - absolute_path);
+ start_path =
lttng_
strndup(absolute_path, previous - absolute_path);
if (!start_path) {
if (!start_path) {
- PERROR("strndup");
+ PERROR("
lttng_
strndup");
goto error;
}
goto error;
}
This page took
0.027128 seconds
and
4
git commands to generate.