[GitHub] trafficserver pull request #1325: #1323 Restores the NULL string where appro...

2017-01-13 Thread zwoop
Github user zwoop closed the pull request at:

https://github.com/apache/trafficserver/pull/1325


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1325: #1323 Restores the NULL string where appro...

2017-01-13 Thread zwoop
Github user zwoop commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1325#discussion_r96107247
  
--- Diff: lib/records/RecUtils.cc ---
@@ -419,7 +419,7 @@ RecDataSetFromString(RecDataT data_type, RecData 
*data_dst, const char *data_str
 data_src.rec_float = atof(data_string);
 break;
   case RECD_STRING:
-if (data_string && strcmp((data_string), "nullptr") == 0) {
+if (data_string && (strlen(data_string) == 4) && 
strncmp((data_string), "NULL", 4) == 0) {
--- End diff --

Because amc wanted me to use strncmp(), so if you don't check the length, 
then it'd also match  any string starting with NULL.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1325: #1323 Restores the NULL string where appro...

2017-01-13 Thread jpeach
Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1325#discussion_r96091697
  
--- Diff: lib/records/RecUtils.cc ---
@@ -419,7 +419,7 @@ RecDataSetFromString(RecDataT data_type, RecData 
*data_dst, const char *data_str
 data_src.rec_float = atof(data_string);
 break;
   case RECD_STRING:
-if (data_string && strcmp((data_string), "nullptr") == 0) {
+if (data_string && (strlen(data_string) == 4) && 
strncmp((data_string), "NULL", 4) == 0) {
--- End diff --

Why do you need the extra `strlen` here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1325: #1323 Restores the NULL string where appro...

2017-01-13 Thread zwoop
GitHub user zwoop opened a pull request:

https://github.com/apache/trafficserver/pull/1325

#1323 Restores the NULL string where appropriate



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zwoop/trafficserver #1323

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafficserver/pull/1325.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1325


commit 03a69cf56428c284238e17212531d972a3974c7a
Author: Leif Hedstrom 
Date:   2017-01-13T15:30:15Z

#1323 Restores the NULL string where appropriate




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---