diff options
author | jbj <devnull@localhost> | 2001-04-29 22:43:01 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-04-29 22:43:01 +0000 |
commit | 81ac89f4e6f176f9095e73b34d94d4ccf12da237 (patch) | |
tree | 85ef09056d85954efdee78fa6875611d460b538d /lib/falloc.c | |
parent | c83cfd5ed5b9637a090e57bef5aca5d5b96d00f4 (diff) | |
download | librpm-tizen-81ac89f4e6f176f9095e73b34d94d4ccf12da237.tar.gz librpm-tizen-81ac89f4e6f176f9095e73b34d94d4ccf12da237.tar.bz2 librpm-tizen-81ac89f4e6f176f9095e73b34d94d4ccf12da237.zip |
- more boring lclint annotations and fiddles.
CVS patchset: 4725
CVS date: 2001/04/29 22:43:01
Diffstat (limited to 'lib/falloc.c')
-rw-r--r-- | lib/falloc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/falloc.c b/lib/falloc.c index 3a5936fdd..55387c623 100644 --- a/lib/falloc.c +++ b/lib/falloc.c @@ -62,8 +62,10 @@ FD_t fadOpen(const char * path, int flags, mode_t perms) /* XXX Fstrerror */ return NULL; + /*@-modobserver -observertrans@*/ memcpy(fadio, fdio, sizeof(*fadio)); fadio->_open = fadOpen; + /*@=modobserver =observertrans@*/ fdSetIo(fd, fadio); fadSetFirstFree(fd, 0); @@ -80,6 +82,7 @@ FD_t fadOpen(const char * path, int flags, mode_t perms) fadSetFirstFree(fd, 0); fadSetFileSize(fd, sizeof(newHdr)); } else { + memset(&newHdr, 0, sizeof(newHdr)); if (Pread(fd, &newHdr, sizeof(newHdr), 0) != sizeof(newHdr)) { Fclose(fd); return NULL; @@ -310,6 +313,7 @@ void fadFree(FD_t fd, unsigned int offset) nextFreeOffset = fadGetFirstFree(fd); prevFreeOffset = 0; } else { + memset(&prevFreeHeader, 0, sizeof(prevFreeHeader)); if (Pread(fd, &prevFreeHeader, sizeof(prevFreeHeader), prevFreeOffset) != sizeof(prevFreeHeader)) return; @@ -325,16 +329,19 @@ void fadFree(FD_t fd, unsigned int offset) } if (nextFreeOffset) { + memset(&nextFreeHeader, 0, sizeof(nextFreeHeader)); if (Pread(fd, &nextFreeHeader, sizeof(nextFreeHeader), nextFreeOffset) != sizeof(nextFreeHeader)) return; } + memset(&header, 0, sizeof(header)); if (Pread(fd, &header, sizeof(header), offset) != sizeof(header)) return; footerOffset = offset + header.size - sizeof(footer); + memset(&footer, 0, sizeof(footer)); if (Pread(fd, &footer, sizeof(footer), footerOffset) != sizeof(footer)) return; @@ -389,6 +396,7 @@ int fadNextOffset(FD_t fd, unsigned int lastOffset) if (offset >= fadGetFileSize(fd)) return 0; + memset(&header, 0, sizeof(header)); if (Pread(fd, &header, sizeof(header), offset) != sizeof(header)) return 0; |