Displaying 7 results from an estimated 7 matches for "parse_error_if_negative".
2020 Mar 26
0
[PATCH nbdkit 5/9 patch split 2/5] lib: Move code for parsing, passwords and paths into libnbdkit.so.
...AX
- if (r < INT64_MIN || r > INT64_MAX)
- errno = ERANGE;
-#endif
- PARSE_COMMON_TAIL;
-}
-
-/* Functions for parsing unsigned integers. */
-
-/* strtou* functions have surprising behaviour if the first character
- * (after whitespace) is '-', so reject this early.
- */
-#define PARSE_ERROR_IF_NEGATIVE \
- do { \
- while (isspace (*str)) \
- str++; \
- if (*str == '-') {...
2019 Sep 23
0
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...> + errno = ERANGE;
> +#endif
> + PARSE_COMMON_TAIL;
> +}
> +
> +/* Functions for parsing unsigned integers. */
> +
> +/* strtou* functions have surprising behaviour if the first character
> + * (after whitespace) is '-', so deny this.
> + */
> +#define PARSE_ERROR_IF_NEGATIVE \
> + do { \
> + const char *p = str; \
> + while (isspace (*p)) \
> + p++;...
2019 Sep 21
2
[PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...1)
+#endif
+ if (r < SSIZE_MIN || r > SSIZE_MAX)
+ errno = ERANGE;
+#endif
+ PARSE_COMMON_TAIL;
+}
+
+/* Functions for parsing unsigned integers. */
+
+/* strtou* functions have surprising behaviour if the first character
+ * (after whitespace) is '-', so deny this.
+ */
+#define PARSE_ERROR_IF_NEGATIVE \
+ do { \
+ const char *p = str; \
+ while (isspace (*p)) \
+ p++;...
2020 Mar 26
9
[PATCH nbdkit 5/9 patch split 1/5] Create libnbdkit.so.
This is the previous 5/9 patch posted earlier today, split into
reviewable chunks. This passes bisection with -x 'make && make
check', but I didn't work very hard on the commit messages, so I refer
you back to the original patch to explain how it works:
https://www.redhat.com/archives/libguestfs/2020-March/msg00248.html
Rich.
2019 Sep 23
2
[PATCH nbdkit v2] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...AX
+ if (r < INT64_MIN || r > INT64_MAX)
+ errno = ERANGE;
+#endif
+ PARSE_COMMON_TAIL;
+}
+
+/* Functions for parsing unsigned integers. */
+
+/* strtou* functions have surprising behaviour if the first character
+ * (after whitespace) is '-', so reject this early.
+ */
+#define PARSE_ERROR_IF_NEGATIVE \
+ do { \
+ while (isspace (*str)) \
+ str++; \
+ if (*str == '-') {...
2019 Sep 23
2
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...> + PARSE_COMMON_TAIL;
> > +}
> > +
> > +/* Functions for parsing unsigned integers. */
> > +
> > +/* strtou* functions have surprising behaviour if the first character
> > + * (after whitespace) is '-', so deny this.
> > + */
> > +#define PARSE_ERROR_IF_NEGATIVE \
> > + do { \
> > + const char *p = str; \
> > + while (isspace (*p)) \
&g...
2020 Mar 26
15
[PATCH nbdkit 0/9] Create libnbdkit.so
This creates libnbdkit.so as discussed in the following thread:
https://www.redhat.com/archives/libguestfs/2020-March/thread.html#00203
test-delay-shutdown.sh fails for unclear reasons.
This series starts by reverting "tests: Don't strand hung nbdkit
processes" which is because several other tests fail randomly unless I
revert this patch. I didn't investigate this yet so it