瀏覽代碼

mhd_str: added function attributes for mhd_bin_to_hex{,_z}()

Evgeny Grin (Karlson2k) 1 年之前
父節點
當前提交
d4c0091c05
共有 2 個文件被更改,包括 8 次插入4 次删除
  1. 4 2
      src/mhd2/mhd_str.c
  2. 4 2
      src/mhd2/mhd_str.h

+ 4 - 2
src/mhd2/mhd_str.c

@@ -1549,7 +1549,8 @@ mhd_uint8_to_str_pad (uint8_t val,
 }
 
 
-MHD_INTERNAL size_t
+MHD_INTERNAL MHD_FN_PAR_NONNULL_ALL_
+MHD_FN_PAR_IN_SIZE_ (1, 2) MHD_FN_PAR_OUT_ (3) size_t
 mhd_bin_to_hex (const void *restrict bin,
                 size_t size,
                 char *restrict hex)
@@ -1569,7 +1570,8 @@ mhd_bin_to_hex (const void *restrict bin,
 }
 
 
-MHD_INTERNAL size_t
+MHD_INTERNAL MHD_FN_PAR_NONNULL_ALL_
+MHD_FN_PAR_IN_SIZE_ (1, 2) MHD_FN_PAR_OUT_ (3) size_t
 mhd_bin_to_hex_z (const void *restrict bin,
                   size_t size,
                   char *restrict hex)

+ 4 - 2
src/mhd2/mhd_str.h

@@ -471,7 +471,8 @@ mhd_uint8_to_str_pad (uint8_t val,
 MHD_INTERNAL size_t
 mhd_bin_to_hex (const void *restrict bin,
                 size_t size,
-                char *restrict hex);
+                char *restrict hex)
+MHD_FN_PAR_NONNULL_ALL_ MHD_FN_PAR_IN_SIZE_ (1, 2) MHD_FN_PAR_OUT_ (3);
 
 /**
  * Convert @a size bytes from input binary data to lower case
@@ -485,7 +486,8 @@ mhd_bin_to_hex (const void *restrict bin,
 MHD_INTERNAL size_t
 mhd_bin_to_hex_z (const void *restrict bin,
                   size_t size,
-                  char *restrict hex);
+                  char *restrict hex)
+MHD_FN_PAR_NONNULL_ALL_ MHD_FN_PAR_IN_SIZE_ (1, 2) MHD_FN_PAR_OUT_ (3);
 
 /**
  * Convert hexadecimal digits to binary data.