Merge lp:~stewart/drizzle/unix-socket-PATH_MAX into lp:drizzle

Proposed by Stewart Smith
Status: Merged
Approved by: Brian Aker
Approved revision: 2607
Merged at revision: 2606
Proposed branch: lp:~stewart/drizzle/unix-socket-PATH_MAX
Merge into: lp:drizzle
Diff against target: 12 lines (+1/-1)
1 file modified
plugin/mysql_unix_socket_protocol/protocol.cc (+1/-1)
To merge this branch: bzr merge lp:~stewart/drizzle/unix-socket-PATH_MAX
Reviewer Review Type Date Requested Status
Drizzle Trunk Pending
Review via email: mp+133820@code.launchpad.net

Description of the change

simple fix, PATH_MAX rather than 1024*4

To post a comment you must log in.
Revision history for this message
Olaf van der Spek (olafvdspek) wrote :

What's PATH_MAX?
Is it standard C? POSIX?

Revision history for this message
Stewart Smith (stewart) wrote :

Olaf van der Spek <email address hidden> writes:
> What's PATH_MAX?
> Is it standard C? POSIX?

It's POSIX... and while if you go and check out
http://insanecoding.blogspot.com.au/2007/11/pathmax-simply-isnt.html
you'll end up weeping a bit, using PATH_MAX is better than a hardcoded
constant at least.

--
Stewart Smith

Revision history for this message
Olaf van der Spek (olafvdspek) wrote :

Why don't we use std::string?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugin/mysql_unix_socket_protocol/protocol.cc'
2--- plugin/mysql_unix_socket_protocol/protocol.cc 2012-10-20 23:08:23 +0000
3+++ plugin/mysql_unix_socket_protocol/protocol.cc 2012-11-11 11:00:27 +0000
4@@ -63,7 +63,7 @@
5
6 extern "C" {
7
8- char at_exit_socket_file[1024 * 4]= { 0 };
9+ char at_exit_socket_file[PATH_MAX]= { 0 };
10
11 static void remove_socket_file(void)
12 {

Subscribers

People subscribed via source and target branches

to all changes: