Browse code
format
Greg Wiley authored on 27/04/2017 19:28:17
Showing 1 changed files
Showing 1 changed files
... | ... |
@@ -9,7 +9,6 @@ |
9 | 9 |
* at https://github.com/cjdev/dual-control. |
10 | 10 |
*/ |
11 | 11 |
|
12 |
- |
|
13 | 12 |
#include "user.h" |
14 | 13 |
#include "test_util.h" |
15 | 14 |
#include "sys_pwd.h" |
... | ... |
@@ -22,13 +21,13 @@ private: |
22 | 21 |
std::string home_directory_; |
23 | 22 |
public: |
24 | 23 |
fake_pwd (const std::string expected_user_name) : expected_user_name_ |
25 |
- (expected_user_name), home_directory_("/somehome") {} |
|
24 |
+ (expected_user_name), home_directory_ ("/somehome") {} |
|
26 | 25 |
int getpwnam_r (const char *user_name, passwd *out, char *buffer, |
27 | 26 |
size_t buffer_sz, passwd **result) |
28 | 27 |
{ |
29 | 28 |
if (expected_user_name_ == user_name) { |
30 |
- out->pw_dir = const_cast<char *>(home_directory_.c_str()); |
|
31 |
- out->pw_name = const_cast<char *>(expected_user_name_.c_str()); |
|
29 |
+ out->pw_dir = const_cast<char *> (home_directory_.c_str()); |
|
30 |
+ out->pw_name = const_cast<char *> (expected_user_name_.c_str()); |
|
32 | 31 |
*result = out; |
33 | 32 |
} else { |
34 | 33 |
*result = 0; |
... | ... |
@@ -50,8 +49,8 @@ public: |
50 | 49 |
{ |
51 | 50 |
|
52 | 51 |
if (expected_buffer_sz_ == buffer_sz && buffer != 0) { |
53 |
- out->pw_name = const_cast<char *>(charbuf_.c_str()); |
|
54 |
- out->pw_dir = const_cast<char *>(charbuf_.c_str()); |
|
52 |
+ out->pw_name = const_cast<char *> (charbuf_.c_str()); |
|
53 |
+ out->pw_dir = const_cast<char *> (charbuf_.c_str()); |
|
55 | 54 |
*result = out; |
56 | 55 |
} else { |
57 | 56 |
*result = 0; |