Deleting a line from a file

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Wed May 14 12:14:24 EDT 2014


On Wed, 14 May 2014 21:27:06 +0530, Saket Sinha said:

>      char newFileName[PATH_MAX];

>      tabFileNew = setmntent(newFileName, "w");

And what is the new file name? You have random trash on the stack here.
(Note that this is C 101 - if you can't debug this on your own, you
probably shouldn't be messing with filesystem code until you have more
C experience)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140514/3f5d7e54/attachment.bin 


More information about the Kernelnewbies mailing list