summaryrefslogtreecommitdiff
path: root/src/UriIp4Base.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhsoting.net>2026-05-08 11:53:46 +0200
committerJörg Frings-Fürst <debian@jff-webhsoting.net>2026-05-08 11:53:46 +0200
commit5177d88bf591522d1b934e24221e16e02cd1592b (patch)
tree1d8458cb6627ccfc673f791c5f0db45f9c06f7e0 /src/UriIp4Base.c
parenta1dac799b819ba356a2faff3a98d7f5f076c24b6 (diff)
parentc3dce46c5f7cad6bc3cc91cc2c711ac089f25923 (diff)
Update upstream source from tag 'upstream/1.0.1+dfsg'
Update to upstream version '1.0.1+dfsg' with Debian dir 3248cd7c10aca9ce2c693401e326390414aefe62
Diffstat (limited to 'src/UriIp4Base.c')
-rw-r--r--src/UriIp4Base.c67
1 files changed, 29 insertions, 38 deletions
diff --git a/src/UriIp4Base.c b/src/UriIp4Base.c
index ded7c32..900234c 100644
--- a/src/UriIp4Base.c
+++ b/src/UriIp4Base.c
@@ -43,54 +43,45 @@
*/
#ifndef URI_DOXYGEN
-# include "UriIp4Base.h"
+# include "UriIp4Base.h"
#endif
-
-
void uriStackToOctet(UriIp4Parser * parser, unsigned char * octet) {
- switch (parser->stackCount) {
- case 1:
- *octet = parser->stackOne;
- break;
+ switch (parser->stackCount) {
+ case 1:
+ *octet = parser->stackOne;
+ break;
- case 2:
- *octet = parser->stackOne * 10
- + parser->stackTwo;
- break;
+ case 2:
+ *octet = parser->stackOne * 10 + parser->stackTwo;
+ break;
- case 3:
- *octet = parser->stackOne * 100
- + parser->stackTwo * 10
- + parser->stackThree;
- break;
+ case 3:
+ *octet = parser->stackOne * 100 + parser->stackTwo * 10 + parser->stackThree;
+ break;
- default:
- ;
- }
- parser->stackCount = 0;
+ default:;
+ }
+ parser->stackCount = 0;
}
-
-
void uriPushToStack(UriIp4Parser * parser, unsigned char digit) {
- switch (parser->stackCount) {
- case 0:
- parser->stackOne = digit;
- parser->stackCount = 1;
- break;
+ switch (parser->stackCount) {
+ case 0:
+ parser->stackOne = digit;
+ parser->stackCount = 1;
+ break;
- case 1:
- parser->stackTwo = digit;
- parser->stackCount = 2;
- break;
+ case 1:
+ parser->stackTwo = digit;
+ parser->stackCount = 2;
+ break;
- case 2:
- parser->stackThree = digit;
- parser->stackCount = 3;
- break;
+ case 2:
+ parser->stackThree = digit;
+ parser->stackCount = 3;
+ break;
- default:
- ;
- }
+ default:;
+ }
}