Chromium Code Reviews| Index: src/trusted/service_runtime/name_service/default_name_service.c |
| =================================================================== |
| --- src/trusted/service_runtime/name_service/default_name_service.c (revision 5616) |
| +++ src/trusted/service_runtime/name_service/default_name_service.c (working copy) |
| @@ -6,14 +6,18 @@ |
| #include "native_client/src/trusted/service_runtime/name_service/default_name_service.h" |
| +#include "native_client/src/shared/platform/nacl_log.h" |
|
noelallen_use_chromium
2011/06/14 02:25:45
include order?
bsy
2011/06/14 20:30:03
Done.
|
| #include "native_client/src/trusted/service_runtime/include/sys/fcntl.h" |
| #include "native_client/src/trusted/desc/nacl_desc_rng.h" |
| +#include "native_client/src/trusted/manifest_name_service_proxy/manifest_proxy.h" |
| +#include "native_client/src/trusted/service_runtime/sel_ldr_thread_interface.h" |
| + |
| int NaClDefaultNameServiceInit(struct NaClNameService *ns) { |
| /* |
| * Create an CSPRNG and enter it into the name server. |
| */ |
| - struct NaClDescRng *rng = NULL; |
| + struct NaClDescRng *rng = NULL; |
|
noelallen_use_chromium
2011/06/14 02:25:45
Did you mean to dbl space here?
bsy
2011/06/14 20:30:03
i use emacs tab to line up identifiers -- this is
|
| rng = (struct NaClDescRng *) malloc(sizeof *rng); |
| if (NULL == rng) { |
| @@ -34,7 +38,7 @@ |
| CreateDescEntry)(ns, |
| "SecureRandom", NACL_ABI_O_RDWR, |
| (struct NaClDesc *) rng); |
| - NaClDescUnref((struct NaClDesc *) rng); |
| + rng = NULL; |
|
noelallen_use_chromium
2011/06/14 02:25:45
You immediately return, this is a NOP.
bsy
2011/06/14 20:30:03
i know. the compiler will also know. i do simila
|
| return 1; |