[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[debian-hurd-Patches][312483] sound/hexter-0.6.1



Patches item #312483, was changed at 01/05/2010 16:18 by Samuel Thibault
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=410472&aid=312483&group_id=30628

>Status: Closed
Priority: 3
Submitted By: Gokturk Yuksek (gokturk-guest)
Assigned to: Nobody (None)
Summary: sound/hexter-0.6.1 
Category: posix
Group: unreviewed
>Resolution: Fixed


Initial Comment:
Proposed patch solves PATH_MAX problem by calling 'snprintf' function with (NULL, 0, ...)  parameters to calculate how many characters to read (including the \0 character), and then calling it again with an allocated buffer to do actual operation.

Build log is also attached.

----------------------------------------------------------------------

>Comment By: Samuel Thibault (sthibault)
Date: 09/04/2011 15:48

Message:
Fixed nowadays.


----------------------------------------------------------------------

Comment By: Samuel Thibault (sthibault)
Date: 03/05/2010 23:08

Message:
Looks good, please submit.


----------------------------------------------------------------------

Comment By: Gokturk Yuksek (gokturk-guest)
Date: 03/05/2010 21:40

Message:
I attached the simpler version of the patch. Unfortunately, alioth neither lets me remove previously attached files nor overwrite them so i attached with a new name.

----------------------------------------------------------------------

Comment By: Samuel Thibault (sthibault)
Date: 02/05/2010 12:29

Message:
+1 for the '/' and again +1 for the '\0'

It's simpler because glibc doesn't have to run snprintf twice.


----------------------------------------------------------------------

Comment By: Gokturk Yuksek (gokturk-guest)
Date: 02/05/2010 11:11

Message:
Why +1+1? If i'm not mistaken, strlen() returns the length of the string without the null character so strlen() + 1 should give the real length of the string and snprintf(..., "%s/") should exactly fit into the buffer.

I don't know why i couldn't see the simpler solution, thanks for the catch up though :)

----------------------------------------------------------------------

Comment By: Samuel Thibault (sthibault)
Date: 01/05/2010 16:41

Message:
Mmm, wouldn't it be simpler to allocate strlen(project_directory)+1+1?


----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=410472&aid=312483&group_id=30628


Reply to: