aboutsummaryrefslogtreecommitdiff
path: root/src/noscrypt.h
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-04-03 18:10:08 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-04-03 18:10:08 -0400
commitb11bc0bac955fd5c6db65f0da48456bf5e748805 (patch)
tree5af4a40a27bbf210e7c813010a54a6befcee0788 /src/noscrypt.h
parent9915bd41799a72413e6b400e150aa9f5fa797e25 (diff)
fix: Fix c89 compatabilty comments and struct assignment
Diffstat (limited to 'src/noscrypt.h')
-rw-r--r--src/noscrypt.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/noscrypt.h b/src/noscrypt.h
index 0f9344a..6a40171 100644
--- a/src/noscrypt.h
+++ b/src/noscrypt.h
@@ -36,31 +36,31 @@
#define _NC_IS_WINDOWS
#endif
-//Set api export calling convention (allow used to override)
+/* Set api export calling convention (allow used to override) */
#ifndef NC_CC
#ifdef _NC_IS_WINDOWS
- //STD for importing to other languages such as .NET
+ /* STD for importing to other languages such as .NET */
#define NC_CC __stdcall
#else
#define NC_CC
#endif
-#endif // !NC_CC
+#endif /* !NC_CC */
-#ifndef NC_EXPORT //Allow users to disable the export/impoty macro if using source code directly
+#ifndef NC_EXPORT /* Allow users to disable the export/impoty macro if using source code directly */
#ifdef NOSCRYPT_EXPORTING
#ifdef _NC_IS_WINDOWS
#define NC_EXPORT __declspec(dllexport)
#else
#define NC_EXPORT __attribute__((visibility("default")))
- #endif // _NC_IS_WINDOWS
+ #endif /* _NC_IS_WINDOWS */
#else
#ifdef _NC_IS_WINDOWS
#define NC_EXPORT __declspec(dllimport)
#else
#define NC_EXPORT
- #endif // _NC_IS_WINDOWS
- #endif // !NOSCRYPT_EXPORTING
-#endif // !NC_EXPORT
+ #endif /* _NC_IS_WINDOWS */
+ #endif /* !NOSCRYPT_EXPORTING */
+#endif /* !NC_EXPORT */
/*
* CONSTANTS
@@ -225,10 +225,10 @@ that caused the error.
*/
NC_EXPORT void NC_CC NCParseErrorCode(NCResult result, int* code, uint8_t* argPosition)
{
- //convert result to a positive value
+ /* convert result to a positive value*/
NCResult asPositive = -result;
- //Get the error code from the lower 8 bits and the argument position from the upper 8 bits
+ /* Get the error code from the lower 8 bits and the argument position from the upper 8 bits*/
*code = -(asPositive & NC_ERROR_CODE_MASK);
*argPosition = (asPositive >> NC_ARG_POSITION_OFFSET) & 0xFF;
}
@@ -560,4 +560,4 @@ NC_EXPORT NCResult NCComputeMac(
uint8_t hmacOut[NC_ENCRYPTION_MAC_SIZE]
);
-#endif // !NOSCRYPT_H
+#endif /* !NOSCRYPT_H */