projects
/
platform
/
upstream
/
libxkbcommon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5140250
)
xkbcomp: Replace open-coded strdup
author
Daniel Stone
<daniel@fooishbar.org>
Tue, 15 Jun 2010 14:13:56 +0000
(15:13 +0100)
committer
Daniel Stone
<daniel@fooishbar.org>
Tue, 22 Jun 2010 14:56:55 +0000
(15:56 +0100)
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
src/xkbcomp/xkbpath.c
patch
|
blob
|
history
diff --git
a/src/xkbcomp/xkbpath.c
b/src/xkbcomp/xkbpath.c
index
9281421
..
b67ac46
100644
(file)
--- a/
src/xkbcomp/xkbpath.c
+++ b/
src/xkbcomp/xkbpath.c
@@
-246,14
+246,13
@@
XkbAddDirectoryToPath(const char *dir)
return False;
}
}
- includePath[nPathEntries] =
- (char *) calloc(strlen(dir) + 1, sizeof(char));
+ includePath[nPathEntries] = strdup(dir);
if (includePath[nPathEntries] == NULL)
{
WSGO("Allocation failed (includePath[%d])\n", nPathEntries);
return False;
}
-
strcpy(includePath[nPathEntries++], dir)
;
+
nPathEntries++
;
return True;
}