Re: [libposix-development] [PATCH] strncpy implementation and tests
Status: Pre-Alpha
Brought to you by:
hdante
From: Henrique A. <hd...@gm...> - 2009-07-04 14:27:52
|
2009/7/4 Tordek <ke...@gm...>: > > There is an error on the test on the definition of r; r[6] == 0, but > it's compared to d[6], which is 'g'. The assertion on line 123 shows > this to be the case, and the strncpy on 125 doesn't touch it. > > Also, on line 101, assert(c+40 == strncpy(c+40, b, 40)); seems > wrong; should't it be b+40? Yes, both were wrong. > > Fixing those errors on the test do leave the error on copying empty > strings, which should be fixed by the patch. Passes all tests on my > machine, please check. Passed here too. The patch was applied. > > P.S.: Lovely printf, helped me track down the buggers ;P Are you using printf do debug ? :-) If you need a debugger, CMake has support for automatically adding debug symbols in the targets. Run ccmake and set CMAKE_BUILD_TYPE to Debug. Then you can use a debug with the test applications. I'll add that flag to the installation instructions. I'm currently using insight, but it's not working perfectly, I'm thinking about testing nemiver. http://projects.gnome.org/nemiver/ > > -- > Guillermo O. «Tordek» Freschi. Programador, Escritor, Genio Maligno. > http://tordek.com.ar :: http://twitter.com/tordek > http://www.arcanopedia.com.ar - Juegos de Rol en Argentina > > ------------------------------------------------------------------------------ > > _______________________________________________ > Libposix-development mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libposix-development > > -- Henrique Dante de Almeida hd...@gm... |