[cs631apue] Sorting working on Linux, but not Unix

Jason Ajmo jajmo at stevens.edu
Sat Sep 30 13:20:52 EDT 2017


After lots of reading, printing, and testing, I have finally found the bug.

In my sort function, instead of returning s1->st_size > s2->st_size, I had
to return return s1->st_size - s2->st_size.

I have absolutely no idea why this was working on Linux and not NetBSD.

On Fri, Sep 29, 2017 at 6:12 PM Jan Schaumann <jschauma at stevens.edu> wrote:

> Jason Ajmo <jajmo at stevens.edu> wrote:
> > And only that one directory, apparently:
>
> Sounds like possibly something related to the directory traversal order?
>
> Also sounds like a wonderfully odd problem to debug, so when you've
> figured out the problem, please share what it was. :-)
>
> -Jan
> _______________________________________________
> cs631apue mailing list
> cs631apue at lists.stevens.edu
> https://lists.stevens.edu/mailman/listinfo/cs631apue
>
-- 
Jason Ajmo
Stevens Institute of Technology
B.S. Cybersecurity '17
M.S. Computer Science '18
0x56FA3123
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20170930/d65ed605/attachment.html>


More information about the cs631apue mailing list