Skip to content

Commit

Permalink
Revert "cleanup: mhl_str_dir_plus_file(): int -> size_t (suggested by…
Browse files Browse the repository at this point in the history
… Andrew Borodin)"

This reverts commit 80a6897.
  • Loading branch information
winnieXY committed Feb 10, 2009
1 parent b87a08c commit d6da1ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mhl/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ static inline char* mhl_str_dir_plus_file(const char* dirname, const char* filen
filename++;

/* skip trailing slashes on dirname */
size_t dnlen = strlen(dirname);
while ((dnlen != 0) && (dirname[dnlen-1]=='/'))
int dnlen = strlen(dirname);
while (dnlen && (dirname[dnlen-1]=='/'))
dnlen--;

size_t fnlen = strlen(filename);
int fnlen = strlen(filename);
char* buffer = mhl_mem_alloc_z(dnlen+fnlen+2); /* enough space for dirname, /, filename, zero */
char* ptr = buffer;

Expand Down

0 comments on commit d6da1ea

Please sign in to comment.