Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Commit

Permalink
fix(utils): Add header guard
Browse files Browse the repository at this point in the history
  • Loading branch information
howjmay committed Jun 3, 2019
1 parent 53bb9e9 commit 60bb1ca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion accelerator/apis.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ status_t api_find_transactions_by_tag(
goto done;
}

char *req_tag = (char*)malloc((NUM_TRYTES_TAG + 1) * sizeof(char));
char* req_tag = (char*)malloc((NUM_TRYTES_TAG + 1) * sizeof(char));
int obj_len = strlen(obj);

if (obj_len == NUM_TRYTES_TAG) {
Expand Down
12 changes: 12 additions & 0 deletions utils/fill_nines.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#ifndef UTILS_FILL_NINES_H_
#define UTILS_FILL_NINES_H_

#include "accelerator/errors.h"
#include "cclient/types/types.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Patch input string with nines into assigned length.
*
Expand All @@ -14,3 +21,8 @@
*/
status_t fill_nines(char* new_str, const char* const old_str,
size_t new_str_len);
#ifdef __cplusplus
}
#endif

#endif // UTILS_FILL_NINES_H_

0 comments on commit 60bb1ca

Please sign in to comment.