diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2011-12-25 20:23:53 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2011-12-25 20:23:53 +0000 |
commit | 81e44312b4976d5516f129f36a67fe381bcb6883 (patch) | |
tree | 01f7dcdce2275ab6026f0f56762500fc8fa0a54b /UsersTable.c | |
parent | 93233a67ea124b8127b50b45cd91c95ca022f8e7 (diff) |
Use strdup explicitly
Diffstat (limited to 'UsersTable.c')
-rw-r--r-- | UsersTable.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/UsersTable.c b/UsersTable.c index 1c56da46..f05b815c 100644 --- a/UsersTable.c +++ b/UsersTable.c @@ -5,11 +5,12 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ +#include "config.h" #include "UsersTable.h" #include "Hashtable.h" -#include "String.h" #include <stdio.h> +#include <string.h> #include <strings.h> #include <pwd.h> #include <sys/types.h> @@ -40,7 +41,7 @@ char* UsersTable_getRef(UsersTable* this, unsigned int uid) { if (name == NULL) { struct passwd* userData = getpwuid(uid); if (userData != NULL) { - name = String_copy(userData->pw_name); + name = strdup(userData->pw_name); Hashtable_put(this->users, uid, name); } } |