s and guidelines are welcome.
That's good to know. Next time I'll pick such a task in global I'll
feel less hesitant. :)
Thanks,
Punit
> Thank you very much.
>
> Regards,
> Shigio
>
>
> 2017-01-24 7:43 GMT+09:00 Punit Agrawal <punitagra...@gmail.com>:
>>
&g
hurd/hurd/porting/guidelines.html#PATH_MAX_tt_MAX_PATH_tt_MAXPATHL
Punit Agrawal (6):
libutil: Drop extraneous function declarations
libutil: Staticize locally used functions
libutil: Remove usage of PATH_MAX from getrealpath
libutil: Remove usage of PATH_MAX from has_symlinkloop
lib
Get rid of unnecessary function declarations by rearranging the
definition of certain functions in the file.
---
libutil/find.c | 160 -
1 file changed, 78 insertions(+), 82 deletions(-)
diff --git a/libutil/find.c b/libutil/find.c
index
When realpath is given a NULL argument, it returns a buffer allocated
with malloc containing the path. Update getrealpath function to rely
on this behaviour instead of using PATH_MAX.
While making this change, verify that callers of getrealpath
responsibly free the returned buffer once they no
In preparation for dropping the use of PATH_MAX, convert rootdir to a
dynamically allocated array. As rootdir is used to cache state across
function calls (iterating over files), free the buffer when it is no
longer being used (find_close).
---
libutil/find.c | 23 +--
1 file
PATH_MAX is no longer used in this file. Drop the requirement for it
to be defined.
---
libutil/find.c | 4
1 file changed, 4 deletions(-)
diff --git a/libutil/find.c b/libutil/find.c
index 14d59d5..a515898 100644
--- a/libutil/find.c
+++ b/libutil/find.c
@@ -79,10 +79,6 @@
#define STRNCMP
From: Punit Agrawal <punitagra...@gmail.com>
The check for argc only tests if it is zero rather than any value less
than equal 0. This leads to segmentation fault when fed with invalid
input (Debian bug #715980).
Fix this by erroring out if argc <= 0.
[0] https://bugs.debian.or