diff options
author | jbj <devnull@localhost> | 1999-10-04 19:40:03 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-10-04 19:40:03 +0000 |
commit | cabcec362682a5bd68d5acc2191333cb903a2e4e (patch) | |
tree | 5f0d997e93e252f38bacceac68d9c223bb237b29 /build/names.c | |
parent | 767f75648fb05790ddb3200cba8ddf730a136dd2 (diff) | |
download | librpm-tizen-cabcec362682a5bd68d5acc2191333cb903a2e4e.tar.gz librpm-tizen-cabcec362682a5bd68d5acc2191333cb903a2e4e.tar.bz2 librpm-tizen-cabcec362682a5bd68d5acc2191333cb903a2e4e.zip |
lclint annotations from build.
CVS patchset: 3366
CVS date: 1999/10/04 19:40:03
Diffstat (limited to 'build/names.c')
-rw-r--r-- | build/names.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/build/names.c b/build/names.c index 5e3b47d7d..806bb617c 100644 --- a/build/names.c +++ b/build/names.c @@ -5,18 +5,18 @@ #include "rpmbuild.h" static uid_t uids[1024]; -static char *unames[1024]; +/*@owned@*/ /*@null@*/ static char *unames[1024]; static int uid_used = 0; static gid_t gids[1024]; -static char *gnames[1024]; +/*@owned@*/ /*@null@*/ static char *gnames[1024]; static int gid_used = 0; /* * getUname() takes a uid, gets the username, and creates an entry in the * table to hold a string containing the user name. */ -char *getUname(uid_t uid) +const char *getUname(uid_t uid) { struct passwd *pw; int x; @@ -48,7 +48,7 @@ char *getUname(uid_t uid) * getUnameS() takes a username, gets the uid, and creates an entry in the * table to hold a string containing the user name. */ -char *getUnameS(const char *uname) +const char *getUnameS(const char *uname) { struct passwd *pw; int x; @@ -81,7 +81,7 @@ char *getUnameS(const char *uname) * getGname() takes a gid, gets the group name, and creates an entry in the * table to hold a string containing the group name. */ -char *getGname(gid_t gid) +const char *getGname(gid_t gid) { struct group *gr; int x; @@ -113,7 +113,7 @@ char *getGname(gid_t gid) * getGnameS() takes a group name, gets the gid, and creates an entry in the * table to hold a string containing the group name. */ -char *getGnameS(const char *gname) +const char *getGnameS(const char *gname) { struct group *gr; int x; @@ -153,7 +153,7 @@ time_t *const getBuildTime(void) return &buildTime; } -char *const buildHost(void) +const char *const buildHost(void) { static char hostname[1024]; static int gotit = 0; @@ -161,7 +161,7 @@ char *const buildHost(void) if (! gotit) { gethostname(hostname, sizeof(hostname)); - if ((hbn = gethostbyname(hostname))) { + if ((hbn = /*@-unrecog@*/ gethostbyname(hostname) /*@=unrecog@*/ )) { strcpy(hostname, hbn->h_name); } else { rpmMessage(RPMMESS_WARNING, _("Could not canonicalize hostname: %s\n"), |