Skip to content

Commit

Permalink
More changes resulting from pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-y committed Jun 14, 2012
1 parent a8df98c commit d043013
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 14 deletions.
4 changes: 0 additions & 4 deletions README.amiga

This file was deleted.

7 changes: 2 additions & 5 deletions src/amiga/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@

int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offset)
{
int mprot = 0;
int mflag = 0;

GIT_MMAP_VALIDATE(out, len, prot, flags);

out->data = NULL;
Expand All @@ -27,12 +24,12 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offs
return -1;
}

if(out->data = malloc(len)) {
if((out->data = malloc(len))) {
p_lseek(fd, offset, SEEK_SET);
p_read(fd, out->data, len);
}

if (!out->data || out->data == MAP_FAILED) {
if (!out->data || (out->data == MAP_FAILED)) {
giterr_set(GITERR_OS, "Failed to mmap. Could not write data");
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/netops.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ int gitno_connect(git_transport *t, const char *host, const char *port)
#else
memcpy(&hints.ai_addr.sin_addr, hints.ai_hostent->h_addr_list[p], hints.ai_hostent->h_length);
hints.ai_addr.sin_family = hints.ai_hostent->h_addrtype;
hints.ai_addr.sin_port = honts.ai_port;
hints.ai_addr.sin_port = hints.ai_port;
if (connect(s, (struct sockaddr *)&hints.ai_addr, sizeof(struct sockaddr_in)) == 0)
#endif
break;
Expand Down
4 changes: 2 additions & 2 deletions src/path.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ int git_path_direach(
de_buf = git__malloc(sizeof(struct dirent));
#endif

while (p_readdir_r(dir, de_buf, de) == 0 && de != NULL) {
while (p_readdir_r(dir, de_buf, &de) == 0 && de != NULL) {
int result;

if (is_dot_or_dotdot(de->d_name))
Expand Down Expand Up @@ -574,7 +574,7 @@ int git_path_dirload(
path_len -= prefix_len;
need_slash = (path_len > 0 && path[path_len-1] != '/') ? 1 : 0;

while ((error = p_readdir_r(dir, de_buf, de)) == 0 && de != NULL) {
while ((error = p_readdir_r(dir, de_buf, &de)) == 0 && de != NULL) {
char *entry_path;
size_t entry_len;

Expand Down
5 changes: 3 additions & 2 deletions src/posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ extern int p_gettimeofday(struct timeval *tv, struct timezone *tz);
#endif

#ifndef NO_READDIR_R
#define p_readdir_r(d,e,r) readdir_r(d,e,&r)
#define p_readdir_r(d,e,r) readdir_r(d,e,r)
#else
GIT_INLINE(int) p_readdir_r(DIR *dirp, struct dirent *entry, struct direct **result)
#include <dirent.h>
GIT_INLINE(int) p_readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result)
{
GIT_UNUSED(entry);
*result = readdir(dirp);
Expand Down
Binary file removed src/ppc/sha1ppc.S.obj
Binary file not shown.

0 comments on commit d043013

Please sign in to comment.